That code never outputs anything to the page:
<?php if(has_term('ART', 'product_relevance')):
$my_post = get_post(927);
if(isset($my_post->post_content)): ?>
<div class="row">
<div class="notification col-lg-9 order-1">
<?php echo $my_post->post_content; ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
Untested, but in essence you need to do something with the post content.
Related Posts:
- How do I get posts by multiple post ID’s?
- What does setup_postdata ($post ) do?
- Query for custom post type? [closed]
- setup_postdata() does not seem to be working?
- Regenerate Slugs From Title of Posts
- Why get_posts are only showing five posts (retrieved by assigning a category to them?
- Exclude Current Post from Recent Posts Loop
- WordPress get_posts by category
- Alternative to get_posts() due to multithreading cache crash
- How to get current post ID in quick edit callback
- How to restore deleted pages/posts?
- get posts based on meta value of the author
- date_query not returning some posts in date range
- How do you get posts by meta_query using the JSON API plugin?
- Why favour the standard WP loop over iterating over (new WP_Query())->get_posts()?
- Query posts ordering by title, but ignore ” and special characters
- get_posts not honoring post_status
- get_posts only children from certain parents
- get_posts cannot grab from specific category
- Filtering custom post type query
- get_posts from post x(offset=>x) to end
- With get_posts(), how can I put a category as a variable
- What’s the difference between “get_posts” and “wp_get_recent_posts” when used with “setup_postdata”?
- Serialized array, grab specific posts with meta_key/meta_value[0]->is_featured
- How do I combine these 2 queries
- get_posts gives different result than wpdb->get_results
- Increase the page size of the WordPress REST API
- Trouble using get_post
- Cache Get_posts
- get_posts() returns all posts rather than the ones specified with ‘post_author’ =>
- Query random post from different categories
- Posts not showing in correct Alphabetical or ID order when using get_posts / orderby but only on production server
- get_posts() excluding all children of a specific post/page
- Secondary Query Is Breaking Main Query
- `get_posts()` ignore my custom post
- excluding current post from get_posts
- How to query posts to include specific pages of one post type, and all pages of another post type?
- Only retrieve posts where post_excerpt has been filled out
- Can I use numberposts=-1 and offset together when using get_posts()?
- Ordering posts in get_posts
- I don’t arrive to do order_by title when i have a conditionnal year in a request
- Meta query: get posts with value in a multidimensional array
- Get posts inside Get terms problem
- Better way to list links with different meta values using same meta key?
- Ho to add get_relative_date and post_except to this get_latest_post query?
- How to get the post content from a category on my homepage
- get_posts() not working in functions.php
- Query Problem in getting top viewed posts
- Getting only a specific post type with get_post?
- Display post details by post ID
- What is the p parameter in a get_posts() parameter array?
- Memory issue with get_posts( ) function
- get_posts() using an array of post ids [closed]
- How can I show the author’s latest post with title?
- Get posts by language in Polylang plugin
- Query get_posts by level depth
- Get posts in between specific ID’s
- How to use WordPress Conditional Tags in get_posts foreach loop
- Don’t submit post if post title exists
- Hide gravity forms
- Why would get_posts be ignoring posts with 2-digit ids?
- Order custom post type by custom field (created by PODS) via PHP
- get_posts returns all posts
- WordPress Random post (last 3 days posts)
- Cron task firing but function not working
- wp json api – get posts by category
- Fetching All Posts (200+) in a Category – Performance Issues?
- Get all posts with a certain meta key, except for one with specific title
- Can’t get Category link inside get_posts
- List all pages including archive
- How do I get only a certain number of images from a post (minus the featured image)?
- Yet another get_posts() in explicitly defined order problem
- List random posts on single page in the current category
- Add ul to its children with get_posts
- get_posts by id not working
- Divide the list into two columns (get_posts)
- Get posts in archive page
- Paging result of get_posts in function
- WordPress echoing content in seemingly random place
- How to use get_posts to filter against a single post id?
- Why set cookie from URL parameter doesnt work all the time?
- Is there a way to extract a single post better than using get_posts()?
- Array merging multiple get_posts throwing Undefined offset error
- get_posts returning empty array
- Update all WordPress posts’s title and content then display them in a table
- get_post Question
- get the_content by ID and save the result to one array
- Custom Category widget
- get_posts – check if custom field has content?
- Why does ‘meta_key’ return an empty array in get_pages
- Get number of posts in each category since last visit
- Get_posts not returning any posts when used with switch_to_blog
- How to Retrieve Post ID of another page
- WordPress – List Sub Categories and Sub-Sub Categories, With Posts
- How to show only 1 post from a specific category on the front-page
- Query for draft or scheduled post
- Sorting posts by specific order
- Function to get content by ID
- get posts based on category and post meta
- How to show only text from post in WordPress