Based on this…
… I just want to show the excerpts (until the more tag).
… it sounds like what you want is to show the post content up to the <!--more-->
tag, rather than the excerpt proper which is hand-written into a special field. To do that, you need to use the_content()
/get_the_content()
rather than the excerpt
cousin functions, and you need to have the global
variable $more
set correctly, but that is not hard to do.
$q = new WP_Query(array('post_type'=>'post'));
global $more;
while ( $q->have_posts() ) {
$q->the_post();
$more = 0;
$the_exc = get_the_content();
echo $the_exc;
}
Related Posts:
- has_excerpt() not working inside wp_query
- Remove ellipsis from the excerpt retrieved using get_the_excerpt()
- How to find a post id using the post_excerpt?
- Return only post(s) which have post_excerpt
- $WP_Query: How to display excerpt on first post only
- the_post() within switch_to_blog() altering my excerpt
- how can I get seperate the HTML in the_content(); output?
- Differentiate Nested WP_Query from Parent
- How to split a post and intercalate elements from a loop
- Display specific page (that is child) content on parent page
- custom page with post content using read more
- Why does apply_filters behave different inside and outside a loop?
- Links in the_content not linked
- custom excerpt is not being shown
- Insert wp_query after the_content with plugin (filter the_content won’t work)
- Can’t get the_content to show
- the_excerpt() not working in custom archive
- Meta Query if Values Don’t Exist
- in tax_query this Is the code correct? I need to access beginner video posts for different subject
- Letting wordpress decide what template and page to use based on condition
- Orderby query does not work for custom fields even with meta query
- Why does the theme insert the comments section if I don’t reset my custom WP_Query?
- Related Post by Tags Code
- Get posts meta_query by repater field
- Get post Number with local loop and template
- Save query in function for custom gallery
- WP_Query tax_query only returning posts that match first term
- Custom query: post__in parameter causes query to be empty
- Merge two queries and remove duplicate
- I can’t get post based on its postmeta value and key
- Get post related to current post
- WP Query works outside a function, not inside a function
- WordPress pagination not returning posts on second page
- Change database image location for transportability
- Convert SQL Query to WP_Query
- Query 3 meta_key and orderby
- How to order posts, that have already been filtered by custom taxonomy, by their category names?
- Combine Tax Archive and Meta_Query in WP_Query
- Get posts by birthday
- Taxonomy Terms That Don’t Exist Display Results
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- How to use wp_query in different column in single loop
- Paginated Post List on Front Page
- WP query retrieve the src of attached image
- Why is my query not giving results?
- Paginate nested query of child posts
- Is instantiating WP_Query not possible within an admin Ajax call?
- How to set up pagination for a custom loop on a global template (author.php, tag.php, archive.php?)
- Using modified ‘meta_key’ to set ‘orderby’ in WP_Query?
- wp_query sorting – one specific meta_key value at last and then sort by create date
- Query custom meta value – post view and date meta
- List users by Year of Birth using a foreach loop to dynamically populate years and data
- Hi , i am trying to set the post for 24 hours and with it will be changed
- Own query vars are not displayed
- What is the best way to reset a search on a meta_key / meta_value?
- WordPress conflict with multiple load more posts functions on click
- Ignoring ‘a’ when sorting posts
- why default wordpress loop not working outside index.php
- Exclude all tagged posts from WP_Query loop
- Woocommerce WP_Query post__not_in problem
- Issue generating custom filter for cpt admin columns
- Saving custom fields for WP_Query to retrieve
- Adding additional taxonomies to wordpress taxonomy page
- Slow query when selecting with large meta query or post__in
- why doesn’t this pre_get_posts code work?
- I cannot get tax_query in get_posts() to work with custom taxonomy
- Related Posts with removing some categories
- how to show more than 1 post into three columns query
- Getting the last X posts, but in ascending order of time
- WordPress custom query by archive title
- pre_get_posts with WP_Query to prevent posts from specific tags
- how to get dynamic data on wordpress from codeigniter?
- How can I modify standard search query to include also ACF custom fields values?
- Meta key in wp_query bug?
- Using something else instead of using 9 wp_query
- make query more simplest and in one query
- Show All with Isotope
- display all posts from category with and without terms in chronological order
- How to display post based on which is clicked
- date_query problem
- Help displaying related categories
- WP_Query Not Working with Variable
- Modify Ixion Theme to Include Post Excerpt On Main Page
- WP_Query doesn’t works inside loop
- Search Filter With Custom Taxonomy and Custom Fields : How do I handle it via plugin?
- A very strange problem with search query
- How to create page that lists tags by initial letter?
- WP_Query doesn’t return some child pages even though the database shows them
- Seach and categories not working when ignoring sticky posts in main loop
- query_posts based on a meta_key
- In Product Category archives how to show Posts having same/similar prod_cat slug structure?
- How to redirect a query string to a “virtual” subdirectory
- posts_per_page increment additional post
- Custom WP_query and integrating into theme file
- WP_Query returns images but post_per_page is incorrect
- Query by Category and Custom Field – Shortcode
- How to show all the associated posts with specific date of data metabox?
- Problem with custom WP_Query and underlying pagination/posts_per_page
- Track write actions to the database
- WP Query issue for multiple values