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
- Display custom post type with shortcode
- expire wordpress user posts
- Forcing all posts associated with a custom post type to be private
- Detect meta value changes when post is updated (post_updated)
- Search everything (posts, pages, tags, cpt, meta)
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- Best way to style first post differently?
- if && problems with transition_post_status
- custom post type upcoming post and past post
- Add multiple custom post types in functions.php, but only one custom post type show in dashboard
- Beginner question: Accessing functions.php through admin web interface in order to import custom post types?
- How can i list custom post type categories?
- Need functionality with all post list available at edit.php
- Why does using WP_Query inside a shortcode in an elementor page cause the arguments for WP_Query to get malformed?
- Remove default post types on all sites except primary blog. WPMU
- Custom Post Types relationships
- Shortcode insertion in tab
- Filter categories of posts with checkboxes
- Copy custom field value to post title
- Insert HTML inside link in a walker
- Remove standard meta boxes from custom taxonomy
- What’s the difference between same wp functions get_posts(); functions in different form?
- Show category ID on custom post type
- Custom Post Type with Templates using Meta Boxes?
- Can I list a custom post type within another custom post type in the admin area?
- Set URL link to featured image of custom post type
- AJAX load more for different custom post type loops
- On update or create post redirect to current post position in list
- 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
- Shortcode to display Staff post type based on Location post type and Specialty post type
- Cannot save CPT meta box
- Next Post links not working in custom post type shortcode
- Foreach inside shortcode not working as planned
- next_/previous_post_link() `in_same_category` appears to fail when true
- Want to be able to sign up subscribers as authors
- categories should be available across all custom post types
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- Post-thumbnail only for specific post-types?
- Custom Post Type & Custom Menu Walker to append custom class for active post types
- Enable taxonomies by post type in an array of CPTs
- Excerpt function for any content
- Page Template Dropdown For Custom Post Types
- Shortcode leaves no space for other elements?
- Custom shortcode works in Elementor editor but not on frontend
- Custom post type Shortcodes wordpress
- Add shortcode inside of the_content()
- providing access to post_id or post inside functions.php
- Get post format
- post_content is stripping HTML when adding a new post? [closed]
- Change post type depending on shortcode
- Template code to split a post and print a custom field?
- Send post changes to set email addresses (not users or subscribers)
- Function to limit number of custom post types on homepage – TwentyTen
- Foreach loop returning more than one item when querying taxonomy
- Post visibility option to theme front-end for author to select?
- display custom post on separate page
- Post type Echo code is repeating on homepage
- Shortcode in pages or tempate files for custom post type
- Show in an entry a Custom Post Type associated to a post
- Check that a slug is present in the get_terms request
- Custom post type shortcode
- Cannot display the_content() after removed WordPress 5’s auto embed feature (iframe & blockquote)
- Update main post with same category when creating custom post to update the modified date
- Attend event form with ajax
- Custom Post type shortcodes
- Custom post type shortcode with taxonomy attribute not working and no errors
- How to assign post to category
- Using get_post_type with a custom URL format?
- If thumbnail image else post title
- $_SESSION Not working after X amount of page views
- Different Configuration for the_excerpt()
- WordPress page not showing up – replaced with last 10 posts?
- Post that populates itself (almost) automatically using data from imported excel file
- How to mark posts as visited
- can’t see categories in appearance-menu-categories
- Shortcode error
- send email to all registered users when post expires
- adding a shortcode into a custom post type
- Nested loop called with shortcode duplicating the content above the main loop
- Add number in increment of one to DIV ID
- Display page and custom post title inside shortcode
- trying to display custom post type with custom taxonomy value by shortcode can’t works [closed]
- How to make a non-public post on wordpress approval?
- how to display custom taxonomies in front page
- wordpress category form fields in popup
- How to separate posts by categories?
- Problem with shortcode
- How to display *block number* instead *date value* on WordPress posts?