Okay, I solved my issue – it was too easy.
I replaced
'p' => $bannerid,
with
'p' => $atts['bannerid'],
Now I am happy 🙂
Related Posts:
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- How would I create a shortcode to display a custom post within a page or regular post?
- Run shortcode in custom script in wp_head if post type is CPT ‘Jobs’
- posts within custom post type all share the same content in the front-end
- Shortcode to return single custom post based on post taxonomy
- display custom portfolio tags
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- php dynamic content inside shortcode
- From CPT Custom Loop into Shortcode?
- Modify shortcode to work with custom taxonomies and slugs
- Passing postid of Testimonial Custom Post in Shortcode Parameter
- Show category ID on custom post type
- How to customize a permalink (URL) structure?
- Custom Post Type with Templates using Meta Boxes?
- Can I list a custom post type within another custom post type in the admin area?
- Change custom post type slug from plugin options
- Get custom post type list for every category shortcode
- Can’t edit custom post type
- Set URL link to featured image of custom post type
- Change CPT archive title
- AJAX load more for different custom post type loops
- PHP variable not regenerating when publishing multiple posts at the same time
- On update or create post redirect to current post position in list
- I need to add endpoint for wordpress categories
- How to target a specific custom post type post and its all children and grandchildren?
- Featured image overlay when changing post status
- get_post_meta not working on publishing
- Redirect 404 page with ID in slug to associated page with same ID in slug
- WordPress wrapped added a span tag to every single p tag
- ACF field key/value to show on taxonomy list
- Re-registering a custom post type not working (not showing up)
- Display featured image from one CPT within another CPT query
- Query taxonomy of taxonomy of custom post type
- Best way to style first post differently?
- How to make custom posts types display when published for the future
- How to rewrite url for any specific taxonomy?
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- How to render a custom post type template with custom fields using shortcode
- create a new page from a custom post type similar to an authors page
- CPT archive admin menu label
- Anon function and add_meta_box
- Form action/link to render a plugin in WordPress front-end
- custom post type category count shortcode
- Display Child Pages of Custom Post Type Parent Page
- Hide a widget inside a div on specific type of post
- Shortcode not working with post counter
- Shortcode to display Staff post type based on Location post type and Specialty post type
- Changing default ‘posts’ parameters with register_post_type_args
- wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
- Shortcode for CPT post content in a page
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Cannot save CPT meta box
- Allow users to create posts without logging in?
- Next Post links not working in custom post type shortcode
- How to change permalink to include custom post type
- Foreach inside shortcode not working as planned
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Add term to custom post type on draft
- How to assign classes to all elements?
- next_/previous_post_link() `in_same_category` appears to fail when true
- Want to be able to sign up subscribers as authors
- Load scripts based on post type
- Different Category system needed for the Custom Post Type
- Global custom meta box
- Redirect to another page using contact form 7? [closed]
- Template not working for the custom Post type
- Warning: Invalid argument supplied for foreach() [closed]
- Custom post type isn’t working
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- Can a shortcode included in post content add styles to the ?
- How to retrieve category of a post in have_post loop?
- categories should be available across all custom post types
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- Featured Image field not appearing in Custom post type
- Post-thumbnail only for specific post-types?
- custom post type metaboxes not saving
- Custom Post Type & Custom Menu Walker to append custom class for active post types
- Enable taxonomies by post type in an array of CPTs
- Checking if looped item has a parent inside a shortcode
- PHP question: how to combine syntax?
- Loop increase number
- custom post for slider
- get_post_meta is not working inside shortcode
- the_post() is printing titles in page footer
- ACF in wordpress
- Change Slug of a Custom Post Type
- Excerpt function for any content
- Assign category a default post type
- Navigate posts with different post type that are in the same categories
- List of all entries of custom-post-type: Add year-parameter?
- Add an Outside Wrapper to my Header and Make it Full Width
- Page Template Dropdown For Custom Post Types
- Showing custom post type categories in the menu
- How to use a variable as a function name?
- Add custom attributes to a post
- Show Custom Message in WordPress Admin
- Shortcode leaves no space for other elements?
- How to inherit field value from parent post into in child / sub post
- How can I add a shortcode to query Custom Post Type with ACF in WordPress?
- How exclude or skip post type with get_next_post_link