Articles of the content

Remove images from the_content

This question already has an answer here: how to display post content without post image? 2 answers

filter h1 tag to add a word at the beginning of the text

I’m looking for the best way to obtain this. For example, I have the h1 tag whic is: Web Design I want to add, in all the h1 tags of a certain post type, the same word at the beginning, which is my keyword. So, the result would be: MYKEYWORD Web Design I have clear […]

the_content() returning unexpected div wrappers

When I call the_content() i am getting <div class=”page” title=”Page 1″> <div class=”section”> <div class=”layoutArea”> <div class=”column”> <p>my text</p> </div> </div> </div> </div> I would expect just <p>my text</p> I am confused about that. I think I have never had all these wrappers returned. Moreover, I have not found a match for layoutArea in the […]

How can I output the content of the page using this code?

I found this code on stackoverflow, but how do I output the actual content rather than just that ID line in the example! <?php $the_slug = ‘my-page’; $args=array( ‘name’ => $the_slug, ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’, ‘numberposts’ => 1 ); $my_posts = get_posts($args); if( $my_posts ) { echo ‘ID on the first post found […]

Insert div after h2 in content

I’m trying to insert a div with a small bit of content immediately after the /h2 of single posts. I’ve given single posts a new class to help trigger this, as I don’t want it after the /h2 on a page. I think I need to filter the content but am not sure how to […]

find shortcode inside content of post

I’ve a post with a video, contained inside the content. So, the content of my post is like: “Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur aliquam quam sed imperdiet viverra. In ornare semper nisl, ac sodales metus facilisis ac. Morbi quis erat id magna dapibus consequat. Vestibulum sollicitudin hendrerit nisl sit amet lacinia. […]

WordPress the_content Page Load

I am creating a Quiz for WordPress in which it replaced the WordPress post content with a Quiz if you have enabled it. There are a total of 5 questions per post and to proceed further you need to answer each question one by one. The problem I am facing is that, when ever I […]

Information on plugin adding text when a post, page, or other such is displayed

I need to know what API a plugin would need to use to add text or HTML to the beginning or end of a posts’s text when the post is displayed. I have searched on Google – but none of the leads I find have any relevance to the question I ask. I need to […]

How can I get the default content of WordPress post?

Is there a way where I can get the default output of the_content in WordPress post? Some of the plugin is using add_filter to the content to add their desired result like related post plugins where they add the result at the end of the content of a post. What I want to happen is […]

the_content not showing responsive image attributes srcset or sizes

I’m using WordPress 4.4.2, but am unable to get the new responsive images functionality to appear for the_content. It works for featured images, just not the_content images. I have no plugins installed (other than the default which aren’t active) and have tried using the themes that come with wordpress (twenty sixteen, twenty fifteen) but WordPress […]