[Resolved] Hook to Insert Notice on Specific CPT Category

Home Forums Support [Resolved] Hook to Insert Notice on Specific CPT Category

Home Forums Support Hook to Insert Notice on Specific CPT Category

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1686797
    Natalie

    Hi

    I’m trying to add a short notice (generate_before_content) on a CPT (job_listing) for a specific category (Jobs for Youth or jobs_for-youth). I’ve tried something like this below with my job category but it’s not working:

    https://generatepress.com/forums/topic/header-sidebar-position/#post-287551

    If I assign it to a specific post I can get it to work.

    Thanks

    #1686861
    David
    Staff
    Customer Support

    Hi there,

    how was the CPT template created ? If its not using a GP Template then it won’t have the GP template hooks.

    #1686865
    Natalie

    David

    Right now it’s using the default single page template. So if i was to assign all jobs to one of my existing layout elements it would take effect? Curious to know why, if I select a specific job, it will work using the default page template.

    #1686899
    David
    Staff
    Customer Support

    If its an Archive then you should see the following Display Rules:

    CPT Name Category Archive -> Category Term

    If its for a Single Post you should see:

    CPT Name Category -> Category Term

    #1686930
    Natalie

    David

    It’s single. I’m using a job listing plugin (WP Job Manager) that creates the category taxonomy out of the box but it’s not visible when selecting Jobs. Oddly, other taxonomies I’ve created for the CPT on my own are visible, so I’m not able to select category. So I thought I might be able to use a little php to do so.

    #1687221
    Natalie

    I decided to add another taxonomy for notices and it appeared in the dropdown.

    All good…

    #1687231
    David
    Staff
    Customer Support

    Glad to hear you found a solution!

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