- Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236
CrazyDiamond
ParticipantDeprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 2432Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236Warning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220I 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 12 years, 6 months ago by CrazyDiamond.
- This topic was modified 12 years, 6 months ago by CrazyDiamond.
AdvertismentDeprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236Alexander
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220From 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.comDeprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236CrazyDiamond
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220>> 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.