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.php
And 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 12 years, 1 month ago by CrazyDiamond.
-
This topic was modified 12 years, 1 month ago by CrazyDiamond.
From 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.com
>> 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.