That happens because the_content()
contains already an echo
. PHP tries to create the string before it sends it to the echo
command. While the string is evaluated the content will be printed already. Then echo
gets what was not yet printed: the li
tags.
So the simple fix is:
echo '<li>';
the_content();
echo '</li>';
Related Posts:
- Confirmation box when submitting post for review
- Ajax Load More Posts in Category Page
- Getting an alphabetic post list with two letters onclick on letter
- POST from jQuery to PHP
- Limit function to specific post category
- Display post category in foreach loop with category link
- Redirect to another page using contact form 7? [closed]
- Display post category in foreach loop
- How to display only one category in a custom post type?
- Categories Listing and Highlighting current category item
- Show a Category Specific Info Box
- Older entries link within a category page
- Exclude a ‘portfolio’ custom category?
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- How to display my categories in a list (to a post, not the sidebar)?
- How to get the number of posts in a selected category?
- Publish pending article from front end with a button?
- Show related posts by category but ignore one category
- Working Bootstrap Carousel Conversion to WP – Technical Questions
- How to display related posts from parent category
- Add custom field to category of custom post type
- Add confirmation popup on “Move to Trash”
- Can I hide a specific post from latest posts page?
- Hide add new page button
- How to show post(excerpt) from specific category on wp page?
- WordPress – Admin Manage Posts – Multiple Filters by Parent Category
- Advanced Custom Fields – Storing array value for further usage
- Custom Theme Want To Remove One Category From All Displays
- How do I use Ajax to show the new posts realtime, on the frontpage
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- Divide Loop Into Days & Categories
- Latest 5 posts (custom post type), each post different CSS
- Different template for posts of all subcategories of category
- Mark menu item as current-menu-item for category
- How to set up multiple taxonomies for groups of posts
- How to display category from recent posts?
- Can I divide the pages into categories?
- Ajax Dynamic Archives not showing correct results
- Duplicate posts and change category
- Category Foreach keeps looping?
- display a random post thumbnail from a random category
- Gravity form built in Captcha
- how to show single post in a custom template
- How to remove in-line style of WordPress’s post content only?
- Excluding posts not working
- Limit the number of posts a category can have – newest post goes in, oldest one drops out, possible? plugin?
- Remove current category from post but display all others
- How do I show posts from another wordpress installation?
- How do I include the category next to the title of a post?
- How to show a custom taxonomy in the theme?
- How to import nested categories from XML file?
- Migrate posts from category and sub-category via SQL
- Display post number by category
- Loading Posts & Category with Ajax
- How to get post with slug and exclude categories
- Retrieving posts by their date and category
- Are post, page and category IDs unique to each other?
- Static pages not working
- WordPress displays post on subcategory only
- Adjust the order for returned posts
- How to list post as buch of category, and all of them
- How can I add a page that shows posts from a single category?
- Post in bulk based on category template
- Remove subcategory slug from url
- Can I show category name in url for only one of my categories?
- Automatic duplicate/copy of post to a related page in WordPress
- Is there a way to categorize a list posts all at once?
- Yoast breadcrumb URL shows category instead of the page
- On the online version of my blog posts disappear
- Current post categories and subcatecories outside of the loop
- Query prints posts without specific categories
- Foreach issue in get_posts function
- Styling a specific post after hovering over it
- More Than 50K Categories and WordPress Admin Panel Stop Showing Categories and Posts
- Re-order Category Meta-data
- Custom post styling per category?
- post categories – how to show only categories with a specific parent id
- Creating a “category” of featured posts
- How do I make it so that new posts within a certain category go into a certain page?
- Unable to get Post Category Name and URL
- List Authors For Current Category
- List posts of assigned categories in list of all categories on single.php
- problem with creating a wordpress post slider
- Assign specific ads to specific categories/posts
- Trying to see if page is category or single and displaying title with appropriate heading tag
- find posts with exactly 3/4 categories
- Use radio buttons & checkboxes for post categories
- Displaying only posts from a certain category on my custom page template
- How can I create a menu items from meta box based on users input
- WP_Query: Fetch posts that are in (category1 and not in category2), OR posts that are not in cagegory1
- How do I display a full post, not just an excerpt?
- Add default content to post (for specific category)
- List posts that are in the same category as the current post title
- Multiple blog “feeds” in a single blog each with distinctly styled post pages
- How to get pagination working with “Pending” Posts
- get value from post to sidebar
- Change a div background color on Post ID
- Post’s arent displaying
- Show with echo if a post has two or more categories
- How can I get on the same row two post of different categories?