I’m not sure what ARRAY_A is supposed to be, seems unnecessary unless there’s more info we’re missing. Also, get_post
returns an object, not an array. Try this:
function fields_after_order_details(){
$my_id = 2731;
$post_id_2731 = get_post($my_id);
$title = $post_id_2731->post_content;
echo '<div class="tandc">' . $title . '</div>';
}
Related Posts:
- How do I change/modify the_post_thumbnail(); html output?
- start_lvl Ignored in Custom walker_nav_menu
- Modify previous and next text from pagination links
- Calling a method from functions.php on a click of a button
- HTML table from shortcode with multiple parameters
- Placing raw HTML inside a WordPress shortcode
- Slide in Panel WordPress Post
- Shortcode content output but not in correct place
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Removing unneccessary p-tags (Not every p)
- Add a class to the anchor tag on HTML5 gallery
- Where in PHP do I move title and meta (date) to bottom of each blog section?
- Converting HTML Template to WordPress Theme
- Populate dropdown with Child Pages based on Parent Page chosen
- How to store data from multiple forms using ajax and php
- Use DOMDocument with ob_start breaks my HTML code
- Add .htm extention to a custom taxonomy
- Noscript not working as it should in wordpress site
- How to make modifications only to certain elements of an HTML string on the server-side?
- Widget back end radio button issue
- Adding function to child theme’s function.php
- How to use the checked() function to check for a non-empty var
- Calling function in loop causes repeat data
- How can I use custom menus with a Bootstrap WordPress theme?
- Time Delay a URL Redirect for Specific Page
- how to changes mobile menu toggle breakpoint in WordPress
- WordPress User Meta value variable into Google Gauge Chart
- Adding HTML Code to Replace Text in PHP
- PHP function for horizontal Woocommerce thumbnails and badges
- How to use data URL in WordPress?
- HTML comment cause issue in functions.php script root
- Remove span tags from WooCommerce Downloads page
- How to center all text body in single.php at once?
- How can I get my pagination loop to display the correct number of total pages?
- Can’t get_users info by using json_encode
- WordPress HTML Helper
- Cant get theme to change footer color through theme customizer
- Sorting Problem
- Add multiple HTML attributes to an Elementor button
- Allowed memory size of 268435456 bytes exhausted (tried to allocate 7146491840906359738 bytes)
- What exactly does “Posts page” do in WordPress?
- How do I get the author’s page url from their ID?
- Calculate percentage of post by category
- How do I know what variables are passed in a filter/action and what their meaning is?
- Wrap each shortcode in array to div
- Warning: array_pop() expects parameter 1 to be array, boolean given
- Check if Product is in a Specific Category in Functions.php
- How to Display Image Meta underneath EVERY image in EVERY post
- Run a filter when a walker runs
- Swapping wp_dropdown_categories function with wp_category_checklist
- Display fields as values in array from external SQL DB
- How can I remove a function that has been added to wordpress with add_filter?
- Custom shortcode outputs plain text instead of HTML at top of post
- how can i use $_COOKIE[] + PostID to execute the below code?
- What’s the uses of wp_cache_set() or wp_cache_add()?
- Create Page To Count Comments For Each Post In WordPress Site
- Can i put my shortcode inside a variable in php files?
- Moving code from theme header to functions.php
- Best way to use a large array in function
- Add Codepen animation as Preloader to WordPress
- Setting user nickname and displayname to shortened email
- Download PDF after CF7 form submission
- WordPress wp-admin redirect and exception
- Personalize checkout text
- How do I create a function that modifies a message in the wp-login.php file?
- Cant display an image via PHP in wordpress
- Call to undefined function error in plugin
- How do I correct the code in php? [closed]
- Unable to Call More than One Meta Box Output
- Menu not styling. New menus functionality giving me a headache
- Disclaimer that will show every refresh of the page
- Dynamically switch file in get_template_directory_uri() | Function [closed]
- List sub categories and corresponding posts of a parent category
- Woocommerce My acount page
- population category dropdown and sub category onselect
- Dropdown category field inside repeatable metabox
- Retrieve alt text by referencing the img src
- Using Google Analytics in an enqueued JS file
- Ajax filter with loadmore button
- How do I disable cache for a certain page?
- Delete post meta by serialized meta value
- Menu not updating for logged in users after redirect
- Create a temporal post
- How can I create a shortcode from an html and php code written together
- Add parent menu item in sub-menu in custom nav_walker
- Allowing HTML elements in title widgets spacing problem
- Escaping a Single Quote in str_replace for Nav Function
- How do you change the tag font size in the repeater-template.php [closed]
- PHP tag in post content makes wordpress go crazy
- Display Year and Month from custom field + Age Calculator
- insert thumbnail image from php script
- WordPress rating by views [closed]
- Trying to see if page is category or single and displaying title with appropriate heading tag
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- WP Fatal error: Call to undefined function get_template_directory_uri()
- Remove default Image Sizes
- A better way to write this php function
- ‘This Field is Required.’ is Not Displaying on CF7 [closed]
- Need help with conditional logic for menus
- Custom Admin Menu Report for Specific User ID