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)?
- Auto set Post to Specific Categories
- Permalink Settings: optional settings doesn’t apply to editor
- $post object is null
- How to show post(excerpt) from specific category on wp page?
- Use template for posts with a particular category grandparent
- How to Add ‘Post Categories’ to the Dashboard Sidebar
- New blog template to display only one category
- Authors in menu, template list post by author
- Get user’s most published categories
- Show all post titles
- The correct way to call posts with ajax
- How only display all post related to category
- 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
- Function to show random posts from a category
- How do I use Ajax to show the new posts realtime, on the frontpage
- Add Category name to Post Title (h1)
- WordPress menu that shows all posts in a certain category like w3schools
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- Conditional that checks if a current category has any subcategory with posts
- Divide Loop Into Days & Categories
- Posts are not showing up on particular category
- How can I list random authors from current post category?
- How to set post expiration date and time and move the page to archive after expiration [closed]
- Add category to all post by using sql query?
- Different background-image by category
- Display posts in alphabetical order for a particular category
- Latest 5 posts (custom post type), each post different CSS
- str_replace the_title(); blues
- Different template for posts of all subcategories of category
- How do I render all posts of the same category in same layout?
- Count to how many categories a post belongs to
- How to make search for the custom post type?
- Exclude posts from featuring
- How to limit displayed posts on wordpress
- WordPress list posts from sub categories
- How to create a load more post entries like Twitter?
- Disable Jquery UI post tabs
- WordPress Theory Lesson – Image Columns within posts with alignment?
- I want to show category in the post title , how can I do
- How can I remove posts of a certain category from homepage after a specified time period?
- Select a random post from a specific category?
- Show post in slider
- Articles are text-only in any “Category” instead of HTML
- Mark menu item as current-menu-item for category
- How to style the last post on the front page different than the others?
- Random post category URL
- How To Remove Certain category Posts From the Blog Page
- How to display related posts by subcategory and not parent category
- How to set up multiple taxonomies for groups of posts
- Accessing post->ID outside of the loop for listing child pages
- Add a class to post title if a link ends with a certain extension
- How to filter posts that belong to a specific category only if that is the only category
- How can i sort the categories by ID
- jQuery inluclude still seems ncessary for script to work within post
- Full Width Main Post
- Category List (Archive) Page Template By Category
- Category Template: Need to display different content on first page of archives
- Display posts in three columns by category
- how to set beforsend option in wordpress ajax methods
- How Display Posts on category
- Add icon/badge next to posttitle of specific category
- List posts in a given category
- hover image appears below placeholder instead of overlayed
- combine Code 1 with Code 2
- Copying and pasting emoji in a wordpress post
- Add ajax load more function using WP API
- How to automatically apply a category based on the post title?
- Edit custom post type admin menu link
- Slider loading issue
- Deleted category by mistake, all posts now have categorized category. Can i revert that?
- Direct link to “New post” in specific category?
- How to display category from recent posts?
- How to display WordPress archive into three columns [closed]
- Proper syntax or method for keeping url in modified isotope / category links
- Can I divide the pages into categories?
- Properly display posts on homepage
- Display post X of Y in category
- Get current category id from post page wordpress
- Ajax load more button in Recent posts widget
- Get mixed category random posts
- WordPress Custom Fields (Checkboxes with multiple values)
- Ajax Dynamic Archives not showing correct results
- Extracting post categories