-
CrazyDiamondParticipant
I have main blog page on http://photourism.ru/ with all posts visible
I want to make secondary blog page on http://photourism.ru/shop and display there only posts from category “Shop”.
Then i want to exclude everything with category “Shop” from main blog page.As far as i understand i should:
0. Make new page category “Shop”
1. Make new blog template named “Shop” by copying template-blog.php as template-shop.php
2. Edit template-shop.php
— Template Name: Shop
— $pinboard_page_template = ‘template-shop.php’;
3. Make new top level page “Shop” with that template (http://photourism.ru/shop)
4. Add ‘php query_posts(“cat=shop”);’ to my template-shop.phpAnd i believe that should be enough to display posts from “Shop” category on http://photourism.ru/shop. But it doesnt)
What have i miss?(excluding “shop” posts from main blog page is next objective)
- This topic was modified 11 years, 6 months ago by CrazyDiamond.
- This topic was modified 11 years, 6 months ago by CrazyDiamond.
AlexanderParticipantFrom what you want to archive I’m not sure I understand why you need a new template for that? A category seems to me suffiecient for your needs?!
Anyway, maybe your query is misbuild?
Try to add:
(?php $args[‘cat’] = ‘31,53’; ?)
before the query, whereas ’31’ and ’53’ are the categories you want to see. A “-” before a category number excludes it. You might also jeopardize the portfolio with your procedure, but that’s another story.
Cheers,
Alexander @ http://www.mouseclick.comCrazyDiamondParticipant>> A category seems to me suffiecient for your needs?!
Is it possible to do without making new template?My problem was because of using category slug. I didnt knew there is some ID also. With ID it works.
You must be logged in to reply to this topic.