Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jon Christopher

    (@jchristopher)

    Yes, you can wrap your code in in_category().

    Thread Starter Alec Rust

    (@alecrust)

    I’m aware I can do this in my template file, but the same doesn’t seem to work within functions.php. I’d like to prevent the “Attachments” box from appearing under the post editor within the admin panel, unless the post is within a particular category.

    Plugin Author Jon Christopher

    (@jchristopher)

    Ah ha! I completely mis-read that, I apologize. I’m working on a number of location parameters not only for things like this but also taking into account a number of other possibilities (e.g. post ID, parent post ID, page template, etc) but those are not ready yet. Shooting for 3.5!

    Thread Starter Alec Rust

    (@alecrust)

    No problem, poor wording on my part! Thanks for the info.

    KS

    (@karl19)

    Being able to define which pages attachments should show on would be a great feature. Oftentimes we only use it for a couple of pages at most (sometimes only homepage), and it’d be useful to set it to only show on those few pages in the admin.

    Plugin Author Jon Christopher

    (@jchristopher)

    I absolutely agree, and am putting serious thought into the implementation because I very often want to get quite complex with my location rules. This feature is currently top on my list and will be included in version 3.5 as soon as it’s ready!

    Plugin Author Jon Christopher

    (@jchristopher)

    I’m only marking this as resolved because it’s more of a feature request as opposed to a support question, you can follow this feature’s progress on GitHub:

    https://github.com/jchristopher/attachments/issues/41

    Plugin Author Jon Christopher

    (@jchristopher)

    I’m only marking this as resolved because it’s more of a feature request as opposed to a support question, you can follow this feature’s progress on GitHub:

    https://github.com/jchristopher/attachments/issues/41

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Display only if post in particular category?’ is closed to new replies.