Custom Post Type (post_type attribute) Not Working – Showing All Post Types
-
We have a display-posts shortcode on our homepage that we have had there for years, it uses the custom post type “featured-work”. Normally it works fine but after the last round of updates (wordpress 6.x, plugins, divi theme, etc) it seems to only show all post types including regular posts, events, and featured-work. The shortcode didn’t change. Looks like this:
[display-posts post_type="featured-work" image_size="medium" wrapper="ul" excerpt_more_link="true" excerpt_length="30" excerpt_more="Read More..." category_display="true"]I made a test page with variations of the shortcode with and without quotes around parameters, with different values for post_type, using taxonomy attribute or not, and they all just output the same thing showing all recent posts from all post type, no difference. It’s as if it’s just querying all post types and ignoring the post type entirely…
What’s also interesting, is that inside the DIVI Visual Builder where it shows the page editable, it runs shortcodes when you’re not editing the text, and in THAT place, it shows the correct display of only featured-work post types, but published as a page it reverts to the all-post-types.
Any ideas?
The page I need help with: [log in to see the link]
The topic ‘Custom Post Type (post_type attribute) Not Working – Showing All Post Types’ is closed to new replies.