Hola soy nuevo por aqui,un saludo para todos.
Estoy creando un nuevo blog en el que he colocado esto:
< ?php query_posts('category_name=apartamentos') ? >
en una copia del index.php a la que he cambiado el nombre y le he colocado una llamada:
< ?php
/*
Template Name: apartamentos
*/
? >
y hasta aqui todo va bien, solo aparecen los post de la categoria apartamentos. El problema es que cuando pincho en entradas mas antiguas se abre la nueva pagina como pagina 2: ?page_id=247&paged=2 pero los post siguen siendo los de la pagina primera.En la pagina principal donde se utiliza index.php no ocurre el problema y pagina perfectamente.
Os pido una ayudita con este problema y os envio un cordial saludo.
El codigo completo es este:
< ?php
/*
Template Name: apartamentos
*/
? >
< ?php get_header
(); ? >
< style type=
"text/css" >
< !--
.Estilo2
{
color:
#4C4C4C;
font-weight: bold;
font-family: Verdana,
"BitStream vera Sans",Helvetica,Sans-serif;
}
-- >
< /style >
< script type=
"text/javascript" >
< !--
function MM_swapImgRestore
() { //v3.0
var i,x,a=document.MM_sr;
for(i=
0;a&&i< a.length&&
(x=a
[i
])&&x.oSrc;i++
) x.src=x.oSrc;
}
function MM_preloadImages
() { //v3.0
var d=document;
if(d.images
){ if(!d.MM_p
) d.MM_p=
new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
for(i=
0; i< a.length; i++
)
if (a
[i
].indexOf
("#")!=
0){ d.MM_p
[j
]=
new Image; d.MM_p
[j++
].src=a
[i
];
}}
}
function MM_findObj
(n, d
) { //v4.01
var p,i,x;
if(!d
) d=document;
if((p=n.indexOf
("?")) >
0&&parent.frames.length
) {
d=parent.frames
[n.substring
(p+
1)].document; n=n.substring
(0,p
);
}
if(!
(x=d
[n
])&&d.all
) x=d.all
[n
];
for (i=
0;!x&&i< d.forms.length;i++
) x=d.forms
[i
][n
];
for(i=
0;!x&&d.layers&&i< d.layers.length;i++
) x=MM_findObj
(n,d.layers
[i
].document
);
if(!x && d.getElementById
) x=d.getElementById
(n
);
return x;
}
function MM_swapImage
() { //v3.0
var i,j=
0,x,a=MM_swapImage.arguments; document.MM_sr=
new Array;
for(i=
0;i<
(a.length-
2);i+=
3)
if ((x=MM_findObj
(a
[i
]))!=
null){document.MM_sr
[j++
]=x;
if(!x.oSrc
) x.oSrc=x.src; x.src=a
[i+
2];
}
}
//-- >
< /script >
< body >
< ?php
$options = get_option
('inove_options');
if (function_exists('wp_list_comments')) {
add_filter
('get_comments_number',
'comment_count',
0);
}
? >
< ?php
if ($options['notice'] &&
$options['notice_content']) : ? >
< div
class=
"post" id=
"notice" >
< div
class=
"content" >
< ?php
echo($options['notice_content']); ? >
< div
class=
"fixed" >< /div >
< /div >
< /div >
< ?php
endif; ? >
< ?php query_posts
('category_name=apartamentos') ? >
< ?php
if (have_posts
()) : ? >
< ?php
while (have_posts
()) : the_post
(); update_post_caches
($posts); ? >
< div
class=
"post" id=
"post-< ?php the_ID(); ? >" >
< h2 ><a>
" rel="bookmark
" >< ?php the_title(); ? ></a>< /h2 >
< div class="info
" >
< div class="fixed
" >< /div >
< /div >
< div class="content
" >
< ?php the_content(__('Read more...', 'inove')); ? >
< div class="fixed
" >< /div >
< /div >
< /div >
< ?php endwhile; ? >
< ?php else : ? >
< div class="errorbox
" >
< ?php _e('Sorry, no posts matched your criteria.', 'inove'); ? >
< /div >
< ?php endif; ? >
< div id="pagenavi
" >
< ?php if(function_exists('wp_pagenavi')) : ? >
< ?php wp_pagenavi() ? >
< ?php else : ? >
< span class="newer
" >< ?php previous_posts_link(__('Siguientes', 'inove')); ? >< /span >
< span class="older
" >< ?php next_posts_link(__('Anteriores', 'inove')); ? >< /span >
< ?php endif; ? >
< div class="fixed
" >< /div >
< /div >
< ?php get_footer(); ? >