Your problem is here:
$welcomePage = get_post( 5 );
echo $welcomePage -> post_content;
Shortcodes are processed on display by via a filter on the_content
which is called by the function the_content()
. You’ve bypassed that functionality and are echo
ing the raw post data.
You need to output your code using a proper Loop or explicitly process the shortcode.
echo do_shortcode($welcomePage -> post_content);
Related Posts:
- Adding body class when post contains a specific shortcode
- How to filter $content in shortcode function
- Native gallery custom html output
- Customizing the wp_video_shortcode output with add_filter
- Hide disclaimer from summary excerpts
- Shortcode to eliminate and replace with
- Problem in outputting shortcode
- Remove Actions/Filters added via Anonymous Functions
- Use AJAX in shortcode
- Add class to menu items of one specific menu (nav_menu_css_class)
- How to influence the information displayed on widget inside wp-admin
- Filter the query ONLY for the search results page
- How to add attributes to a shortcode
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Using add_filter() in Widgets
- Customize WordPress Media Manager – Media Window
- Is it possible to use a forgot password url filter?
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Remove Page Title from Static Frontpage
- Default or Preset Content for Custom Post Types
- Override a class function to include a custom template
- Display a text message if the shortcode is found?
- add_filter priority problem
- How to use IF Statement in WordPress?
- Gravity Forms field entries into wp_query loop [closed]
- Post Pagination Showing Same Posts Every Page
- modify a function filter
- How would go about if I just want a temporary function?
- Generating rel=prev and rel=next only on wordpress categories
- How to make applyFilters function return false via functions.php
- How to filter out shortcode when displaying the_excerpt() in the loop?
- Accepted arguments value in hook functions
- Which action hook to use for function?
- Adding multiple taxonomy filters to functions.php
- How to get specified parent page title in my function
- Last updated date function
- Possible to display shortcode based on the category?
- Shortcode pagination not advancing
- Modify a function without editing template
- How to set default archive image without overriding first attached image? [closed]
- Display post shortcode content in the sidebar?
- Disable auto-resizing of uploaded images, but only for certain filename
- How to make custom column Admin>Users sortable?
- How to get the index number of the posts?
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- Get Current Post ID in functions php, meta query filter
- Output and filter data from a XML url
- Add to cart php not working [closed]
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- create filter in functions.php
- Insert image in WordPress with HTML5 tag and caption function
- How to construct function for applying filter?
- Display gallery on bottom after content
- Redirect to another page using contact form 7? [closed]
- WordPress Shortcode function display outside of widget
- Add Element as a Filter to the_content
- Can’t properly set the_title add_filter to show short_URL
- Shotcode argument issues
- (Woocommerce) Order by price when entering specific category
- Exclude category from shortcode
- get_pages() Returns Only One Item
- Adding an option to a shortcode
- How to use author meta in shortcode?
- Use a shortcode to display custom meta box contents
- Filter nav menu items HTML tags and wrap inner text with span
- How to add custom li item to wordpress menu
- Tracking the number of shortcodes for a list?
- Can I include a custom PHP function in a WordPress function?
- How to create a shortcode out of a php function
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- Changing the text of Upload/Insert on Posts and Pages Screen
- Conditional custom menu?
- Get URLs for AJAX Filter Checkboxes WordPress
- Using One Function To Create Two Different Shortcodes
- How to display an image before title text in menu items
- Filter works on last selection but no others
- page shows short code not output
- Last updated posts shortcode in functions.php
- Reload page with a different shortcode when a user selects from a dropdown
- Prevent function from triggering on current page
- Assign IDs to headings in ACF using functions.php
- Redirect specific author posts to another url
- How to retrieve image IDs from shortcode content?
- Display list of pages that contain a certain string within the slug
- $content is empty while using DOMDocument
- HowTo: Add wrapper to columns shortcode?
- How To Show Shortcodes In WordPress Custom Fields?
- Best way to add image to recent posts widget?
- Print all inline styles to head
- How to display data from custom fields in my custom shortcode?
- Modify function Shortcode_atts
- restrict access to specific urls on a specific period of time
- Function Reference for custom link in Admin Menu Management Page
- Add title & subtitle to shortcodes
- shortcode inside post called by ID does not render as expected
- Trying to get this function to show below the content
- Display function from functions.php in tag.php
- How can I modify or filter this variable in an existing class? (Mai Theme)