the template page i created is named category-portfolio.php
probably a tricky name as this interferes with the default template hierachy naming convention for custom category archive templates; http://codex.wordpress.org/Template_Hierarchy#Category_display
what Template Name:
have you added at the start of the template?
http://codex.wordpress.org/Page_Templates#Custom_Page_Template
did you upload the new template into the folder of your theme?
you should be able to find the new template in the list on the right, under:
dashboard – appearance – editor
when your theme is seleted at the top right.
yes i uploaded the file to the theme folder
yes alchymyth you are right, i found the error – the template name was wrong. thanx !
now the only problem i have is that the page portfolio opens but dont show the category posts
following the tutorial which i mentioned , it says to use the code
<?php $archive_query = new WP_Query('cat=7&showposts=1000');
while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
changing the number 7 with my category id numeber – which i found its the number 3
i changed this , and my portfolio page is like this http://www.connectto.com.br/websites/portfolio/
it shows a list with the post titles, but dont show the post images, its not correct at all.. the background isnt expanding with the content… still with something wrong ?
is there any different way to do that ? show all posts from a category in this page .. actually as all my posts are just from one category in this site, i want my portfolio page to be like my home page http://www.connectto.com.br/websites/
alchymyth , really thanx for your help – hope this is my last question hehe, thanx for your excelent work !
can you post he full code of the template?
please use the pastebin, http://codex.wordpress.org/Forum_Welcome#Posting_Code
right now, this is the line (line 48 in the pastebin) that creates the output for each post:
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></li>
as you can see, this just outputs the linked title.
you could try and replace that line with:
<li>
<?php get_template_part( 'content', get_post_format() ); ?>
</li>
that would create the same output per post as any other archive page in Twenty Eleven.
(not tested for layout effects when this is used in an unordered list)
the question is:
do you use the unordered list on purpose?
no, i dont even know whats “unordered list” actually – i just found this example tutorial and did the same in my page
now the posts are visible, but the background still with error – what make me think – im i doing this in a totally wrong way ?
http://www.connectto.com.br/websites/portfolio/
i mean – i see its working now, but , its not similar to my homepage – with background , pagination, etc…
id like to have an internal page (portfolio) that show category portfolio posts in the same way my home page does .. with all details, bg, pagination, images etc..
then i will make a diferent homepage without posts
am i doing the wrong way ?
is there a better way to do this ? or should i keep editing this page (as im doing with your heklp – thanx) and it will be ok ?