Creating pages that only display posts of specific categries

WordPress Business Themes Forums Responsive Themes Directory Theme Creating pages that only display posts of specific categries

Discontinued - The forum content is out of date. For theme support please use our support desk here.

Creating pages that only display posts of specific categries

June 3, 2014
Michael Michael
  • Michael
    Michael
    Newbie 7 points

    I would like to know how I can create pages that will only read/recognize/display blog posts of a certain category instead of displaying all posts of all categories at once.

    Please observe the problem in action:

    Go to http://buyblacknyc.com/
    Hover over the “Growth” link near the top
    Click the “self-development” tab
    Then click the “business development” tab.

    Notice there is no change between the two.

    Both pages are displaying all posts of all categories.
    I would like to know how to create pages that selectively display posts based on their category.

    Currently, both pages are under the parent page “Growth”, structured by the [Growth] template.
    Nothing (no code, text, etc) is in the main body. Parent and template are the only things I have touched from the back end.

    Any advice would be appreciated !
    Give Thanks

    June 3, 2014 at 9:22 pm
  • zarko
    zarko
    Senior Member 360 points

    hi Michael,

    Currently, both pages are under the parent page “Growth”, structured by the [Growth] template.

    Do you mean you have put this shortcode in static page or you created actual Template page with name Growth?

    June 3, 2014 at 10:10 pm
  • Michael
    Michael
    Newbie 7 points

    That was a typo, the page is structured by the [Blog] Template.

    June 8, 2014 at 10:07 pm
  • Jennifer
    Jennifer
    Senior Member 119 points

    I’m trying to do this also. It seems that when a page gets assigned with the [BLOG} template, it pulls in all Posts, no matter the category. Worse, when you do that and look at the display/archive page, clicking on a category will give you a list of posts in that category as if they are product listings, which is all wrong.

    Anyone worked around it yet? The goal is to have different normal-looking landing pages for different blog post categories. They just need to look like a blog archive page.

    Thanks, Jennifer

    August 2, 2014 at 11:23 am
  • May
    May
    Senior Member 111 points

    I agree, I’m also trying to find out how to display certain blog categories only.

    Seems there is no way which is a bit silly as you need the different blog categories for the menu item.

    August 4, 2014 at 2:22 pm
  • Mario
    Mario
    Senior Member 136 points

    http://www.premiumpress.com/docs/#CATEGORIES

    [CATEGORIES] Shortcode
    Short Description

    This shortcode is used to display a list of categories.

    [CATEGORIES SHOW=”123,456″ HIDE=”678,890″ COUNT=”1″]

    Example would be: [CATEGORIES SHOW=”123,456″ HIDE=”678,890″ COUNT=”1″]

    Hope this is what you trying to achieve

    August 4, 2014 at 5:08 pm
  • Jennifer
    Jennifer
    Senior Member 119 points

    No, it’s not what we are talking about (but thanks!). We don’t need a list of categories- we need a page that displays all the archive excerpts from Blog Cat A, and another page that displays archive excerpts from Blog Category B, etc.

    I have come up with a slightly complex workaround, and it’s imperfect, but better than nothing.

    If you create multiple categories in your Posts section, then scroll over them to see the link, you’ll see tag_id= the number after that is your category ID.

    Then, you need to copy the index.php file inside your theme, and rename it category-XX.php (with XX being the tag ID. Put it in the same folder with index.php (maybe it can go in your child theme so it won’t get overwritten by theme updates- I’m not quite sure how to do that, but it would be ideal)

    Then, you can go into that new file and add css classes to certain div tags that will allow you to style that page in its own way. By default, it looks like a search results page, which isn’t ideal. It should look like a blog archive page. That’s why it’s imperfect. My php isn’t good enough to really make it look great, but at least I can make it acceptable. If I could add the blog author and date of publication in there, then I’d really be happy.

    Mark, you asked for my blog link in another thread on this topic a few days ago. I’m working on a bigger glitch right now, but I’ll send it soon and reference that other thread (which says, as of now, there’s no way to accomplish this goal).

    August 4, 2014 at 6:39 pm
  • Jennifer
    Jennifer
    Senior Member 119 points

    I’ve now added more on this topic on the other thread, along with a suggested solution.

    http://www.premiumpress.com/forums/topic/blog-category-issues/#post-56474

    August 6, 2014 at 1:56 am
  • Mark Fail
    Mark Fail
    Super Guru 12,814 points

    I’ll take alook tonight for you, I don’t think a page per category will help as it’s not scalable so I’ll see what can be done.

    August 6, 2014 at 7:37 am
  • Mark
    Mark
    Titan 737 points

    I don’t understand why you want to create a ‘page’ for each of the blog categories, when the categories already can be accessed by their own url. And if you want to change the look, you can simply use the admin > Theme Options > Page Setup > Content Pages > Fallback Results Layout

    Mark

    August 6, 2014 at 8:46 am
  • Jennifer
    Jennifer
    Senior Member 119 points

    It doesn’t work because the listings pages take that format on as well. Listings pages and Blog Category landing pages need layouts that are independent of each other.

    August 6, 2014 at 9:38 am
  • Mark Fail
    Mark Fail
    Super Guru 12,814 points

    hi Jennifer

    thanks, iv adjusted 6.6.2 to include a better setup for blog categories. It’ll show just like the normal blog page but for each category.

    August 6, 2014 at 11:19 am
Viewing 12 posts - 1 through 12 (of 12 total)

Didn't find what you were after?

Chat with us now

or contact our support team