It should work
<?php
$my_postid = 1772;//This is page id or post id
$content_post = get_post($my_postid);
$content = $content_post->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
?>
Related Posts:
- How to manually fix the WordPress gallery code using PHP in functions.php?
- Check if a menu is empty?
- Shortcode putting html such as
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- Shortcode created to check language not works
- Changing the HTML Of the content
- Add/echo div with Analytics-Code to function in functions.php
- Loading page template into shortcode
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- How can I default to all WordPress roles when parameter is not included in shortcode?
- WordPress menu deletes when trying to add a hook
- Wrap each shortcode in array to div
- Recent post display using shortcode
- page template for attachement page?
- Nested shortCode functions in the functions.php file
- Making Quote Plugin more efficient
- Placing raw HTML inside a WordPress shortcode
- Shortcode content output but not in correct place
- is_page “range” for if statement?
- PHP code inside shortcodes
- Shortcode content filter?
- Trigger popup in a php if/else statement
- How to output a PHP file values by shortcode?
- How to display posts by current user in a drop down
- Get value from shortcode to do something
- Removing “wpautop” (auto tags) only on certain pages?
- Custom shortcode outputs plain text instead of HTML at top of post
- Populate editor with some content of a page with a page template
- How to Reference/Echo Variable from Another PHP Function
- Remove echo from shortcode
- Get URL from shortcode tag
- Shortcode with PHP issue “Undefined index”
- Inject class in body when particular page template is used
- Only first shortcode gets executed
- Adding wrapper elements in the_date() like in the_title()?
- Show meta box only for default page template
- Shortcode from a function not working
- Display Data in Table from External Database in WP using Shortcodes
- Is it possible to return content, and then also continue to do other things?
- ::before on open/close function [closed]
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Create a WordPress shortcode using PHP [duplicate]
- Creating WordPress Shortcode with Variable
- Shortcode to find and replace URL
- Help with WordPress function inside a shortcode
- calling a custom field value inside functions.php
- Short code template + ajax
- List all blogs, but exclude the main site
- Shortcode for Listing Users from Meta Value?
- Cant display an image via PHP in wordpress
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- Create special button on WP Tiny MCE Posts Editor for Shortcodes
- Including Custom fields within the_content
- Display additional page templates and a sidebar on plugin activation
- AJAX function not working [closed]
- Why wp_remote_get() fetches certain web pages while it doesn’t work for my localhost?
- Updating Metadata with Shortcode
- How to Create custom block for displaying information in content section which act like shortcode
- Display logged in user name and lastname on page
- Create shortcode for metabox gallery
- Display Visual Composer shortcode if a post belongs in specific categories
- Contain multiple page templates in one PHP custom template file in WordPress?
- How do I reopen the (Popup Maker) after entering the correct password for a password protected page?
- Block error message in foreach loop when looping through ACF field
- How can I prevent a shortcode div from extending beyond its boundaries?
- PHP multiple forms, same page, isset($_POST[]) not working?
- Gravity Forms: How to add PHP function to confirmation conditional shortcode?
- wpdb->query returns different value to phpMyAdmin
- shortcodes, custom php and their errors
- Display a custom name when the user has no name settle in his account
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- How to bind each “the_content” elements to a custom variables
- Display current user metadata on WordPress page
- Reload page with a different shortcode when a user selects from a dropdown
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- Offset with ajax load more posts duplicates
- Get posts by id using shortcode
- Shortcode’s output to use as other shortcode’s parameter
- remove_action() not working in page template – Genesis
- Open/closed function [closed]
- Need to Echo A Url path to show on a wordpress page
- Wrapping shortcode content in a span or link
- Need help with PHP functions
- Calling PHP function doesn’t work in index.php
- How to have Function of a plugin using global vars into a shortcode?
- Overwriting a Shortcode
- How can I put a custom field as the link of a button shortcode?
- Shortcoding with Divs
- Display custom meta box in my template file
- Whats wrong with my code? Need To add String to shortcode? [closed]
- My title is showing after the shortcode
- A next page function with shortcode?
- Shortcode to include PHP file, pass various parameters to include?
- Loop on a wordpress Page instead of content coming from the WP text editor
- WP Custom tables query
- Display terms on product page with shotrcode
- How call WordPress shortcode inside function file
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)