Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    Is your custom post type set to hierarchical? The plugin only displays on the single pages of hierarchical post types (see here).

    When registering your post type, specify ‘hierarchical’ => true. More info.

    You can override this limitation using the be_subpages_widget_display_override filter.

    Let’s say you have a hierarchical post type called ‘portfolio’. The widget already displays on the single portfolio pages, but you want it on the portfolio archive as well. Add this to your theme’s functions.php file: https://gist.github.com/billerickson/04078200eb760535d1c260cd59b44f07

    You’ll also need to modify the query it runs, because it assumes you’re on a single page and uses that to determine the subpages. Use the be_subpages_widget_args filter to modify the query arguments (see here)

    Thread Starter Ricardo

    (@rhormazar)

    Thank you for your answer. It didn’t solve my problem, but the plugin is not meant to do so. I was looking at it all wrong. The archive page is the parent of the custom posts on my navigation, but it is not represented through the backend, meaning that this plugin does not recognize it.

    I just ended up hand-coding “siblings” of the CPT archive until I figure something else out. For everything else (what should be working), this plugin is perfect.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can't get it to display on CPT’ is closed to new replies.