Home Forums Pure Theme Discussion & Support Hiding 'special' category for slider images

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  Nick Truscott 4 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2693

    Nick Truscott
    Participant
    Post count: 67

    For the slider images in this site I have created 5 custom images of the required size, and made 5 ‘features’, each one has one of the custom images as the ‘featured image’ (obviously) and each feature has to be assigned to a category (again, obvious, right?) – so as these ‘features’ simply exist to hold the images and the redirect URL, I assigned them to a new category called ‘sliders’. Still OK so far?

    BTW, the slider works perfectly, images look great, etc. etc. etc….

    Elsewhere in the site I want to use the wp category widget to show a list of post categories (nothing unusual there, right?). However, as you can see here: http://frrme.small-beginnings.net/category/news/videos-press-tv-media/ the category list shows the category called ‘sliders’ which, of course, is of no interest to anyone, doesn’t have text – I don’t want it to have text or do anything or even be available to site visitors.

    Any suggestion on how to get around this? or should I just make a text widget instead with links to the categories I want to show?

    Cheers
    Nick

    #2703

    themeweaver
    Keymaster
    Post count: 730

    Well, at present the features post type uses the standard category taxonomy. We have a plugin version of this functionality (in use on churchuna), which has its own taxonomy. This may find its way into the themes.

    But ‘utility’ categories are a common niggle when using WordPress. People uses categories to help manage display of content and you often want to hide them from lists, there a few way to do this in code using wp_list_categories(), with the exclude= parameter. This is relatively simple stuff but there are also few of plugins that can do it for you

    (totally untested by themeloom though – USE WITH CARE):
    http://wordpress.org/extend/plugins/wp-hide-categories/
    http://wordpress.org/extend/plugins/easy-categories-management-widget/
    ..many more in the repository

    #2705

    Nick Truscott
    Participant
    Post count: 67

    Cheers Tim,

    Any chance you can give me an idiots example of how to customise (presumably in the child functions.php)
    wp_list_categories()
    to exclude=”123″

    I really don’t want to add more plugins than I need to (or that the client will ultimately have to look after).

    #2708

    themeweaver
    Keymaster
    Post count: 730

    If you don’t use a widget you will need to create a custom sidebar file for your child theme or a custom widget! But the code to create a list of categories is this:

    wp_list_categories('orderby=name&exclude=276&title_li=');

    where 276 is the cat id.

    #2709

    Nick Truscott
    Participant
    Post count: 67

    Thanks Tim

    Excellent example of thinking simply too simple.

    :-(

    Mark this as resolved/closed mate – I wont bother you about it any more!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.