Disable elements for all posts in a category?

Home Forums Support Disable elements for all posts in a category?

Home Forums Support Disable elements for all posts in a category?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #112029
    Are Martin

    The disable elements box that appears on posts and pages is a very useful feature. However, I was wondering if it is possible to add this option to the edit-category page as well?

    I need to disable an element for all posts in a specific category and it would be a timesaver if it was possible to disable the element for the entire category instead of ticking the box on each individual post.

    It would be great if this was possible!

    Regards

    Are Martin Kallåk

    #112036
    Tom
    Lead Developer
    Lead Developer

    Hi Are,

    If the edit category page allowed metaboxes, I would definitely do this, but unfortunately it doesn’t.

    Instead, you can use some pretty simple CSS.

    What element are you trying to disable?

    #112037
    Are Martin

    Hi Tom,

    Thanks for quick reply! 🙂

    I´m trying to disable the secondary navigation for an entire category…

    #112038
    Tom
    Lead Developer
    Lead Developer

    First, go to “Posts > Categories” – notice the “slugs” for each category?

    Use this CSS with your desired category slug:

    .category-slug .secondary-navigation {
          display: none;
    }
    #112042
    Are Martin

    Wow, that simple!?

    Thanks a lot! 🙂

    and if I wanted to disable the secondary navigation for all archive pages I guess it would be:

    .archives .secondary-navigation {
          display: none;
    }

    correct?

    #112043
    Tom
    Lead Developer
    Lead Developer

    Almost!

    .archive .secondary-navigation {
          display: none;
    }

    No “s” 🙂

    #112048
    Are Martin

    Perfect! Thanks a lot! 🙂

    #112053
    Tom
    Lead Developer
    Lead Developer

    You’re welcome! 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.