• Resolved shreyarajwade

    (@shreyarajwade)


    I have created a bunch of custom post types (Employee Directory, Offices, etc.) which has categories. However, these custom post type ‘categories’ do no show up under custom sidebar ‘Filter’ menu in order for me to select categories and display.
    Do custom Sidebars work for custom post type?? If so, how do I make sure that the custom categories show up?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello @shreyarajwade

    I hope you’re doing well!

    Please edit the sidebar location, click at “As Sidebar for selected Post Types” and add a custom post type as shown on the scresnhot below:
    https://take.ms/f1NMj

    Expand For Archives > Archive Type, tick on As Sidebar for selected Archive Types and choose Category Archive , where Category is the name of your custom post type’s category.

    Please see this screenshot:
    https://take.ms/4SO8q

    I hope this helps!

    Cheers,
    Nastia

    I am having a similar question: how to differentiate the sidebars based on the value of the taxonomy associated to the custom post type?

    So for the archive page for CPT 1, Location A (location = taxomomy) it should be another sidebar than for CPT 1, Location B.

    Hello there @eddypiv

    This should be handled by the 2nd part of Nastia’s reply above:

    Expand For Archives > Archive Type, tick on As Sidebar for selected Archive Types and choose Category Archive , where Category is the name of your custom post type’s category.

    Please see this screenshot:
    https://take.ms/4SO8q

    Please do let me know if I miss something else on this.

    It’s also always advisable to create new topic, even if issue seems to be related.

    Thank you,
    Dimitris

    Hi Dimitris,

    What I am looking for is differentiating the widget per country.
    Nastia’s reply stops by country in general, but I don’t see how to specify the widget for a specific country.

    Regards,
    Eddy

    Hello @eddypiv

    For that you’ll need to setup Visibility options per widget, not sidebar, as shown below. I’ve tested that using WooCommerce so it caught the Product Categories taxonomy.
    https://monosnap.com/file/fEuqqJLRbCifRbOtIo14JnH9FwW9b4

    Thank you,
    Dimitris

    Hi,
    I see what you mean. Tried it, but didn’t get it to work. Looks like I can generate an archive list within the sidebar, but I’d rather have that list in the post contents area.

    Anyway, it triggered me to another solution, that’s working for me.
    I list it here, perhaps somebody else may benefit from it.

    I am using the Recent Posts Widget Extended plugin, and it supports the archive listing based on custom post type and value of custom taxonomy, as widget but also as shortcode.
    With the shortcode I can have the list in the post contents area, with the sidebar for that custom taxonomy set by the page containing the shortcode.

    Thanks for your help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom Sidebar for Custom Post Types’ is closed to new replies.