Support » Plugin: TPG Get Posts » [Plugin: TPG Get Posts] Preventing Sub-Category Posts from being displayed?

  • Resolved PKimpton


    Preventing Sub-Category Slugs/Posts name from being displayed?
    I have my Posts category structure setup to match my Page Folder structure.
    For example, I have;
    Page Structure Layout of: Computers – Dell – Latitude
    I want to be able to have my post categories in the same structure layout with post category “Dell” under “Computers”, likewise, “Latitude” under “Dell” under “Computers”.
    The trouble is that any post I place in the slug/category “Latitude” also appear in the “computers” and “Dell” lists.
    How do I tell it to only display the category I choose and NOT the sub categories?
    [tpg_get_posts category_name=”latitude”] show Latitude posts (this is ok)
    [tpg_get_posts category_name=”dell”] shows dell & Latitude posts!!
    [tpg_get_posts category_name=”computers”] shows computers, dell and latitude posts!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author cswaim


    I will set up a similar structure and see what is happening with this. At the moment, I have 2 projects with tight deadlines, so it may be a couple of weeks before I get this checked out.

    In the meantime, if you use the category, does it work? The category is the number associated with a category name. If you would try that and let me know the results, that would help me find the error.


    For now, I’ve simply moved them out of a structure for the areas I dont want replicating but it would have been nice to keep the structure orderly. I was just hoping there would have been a command I could add to [tpg_get_posts category_name=”computers”] maybe something like [tpg_get_posts category_name=”computers” view_subcats=”no”]

    All the best

    Plugin Author cswaim


    The selection to do this is a category__in=(nn,nn,nn). This parameter requires an array be passed to the wp query. I implemented this in the 2.0 premium version as it was more than a simple change. I hope if you still need this functionality, you will consider the upgrade.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: TPG Get Posts] Preventing Sub-Category Posts from being displayed?’ is closed to new replies.