In my post page, used gallery on post plugin to display images , while i m trying to retrieve the post content -used the_content , but showing the plugin images also. how i get text editor content only?

  • 1
    ok can you explain this a little better? you can use the global $post object in the loop to get the content... – vimes1984 Mar 2 '15 at 18:32

use this code to show only content of post

    $args = array(
    'order'    => 'ASC'
query_posts( $args );

while ( have_posts() ) : the_post();
// get only post of content not work plug-in short code
$post_7 = get_post(get_the_ID()); 
echo $title = $post_7->post_content;


// Reset Query
  • 1
    Never ever use query_posts. It is really a bad function to use as it breaks many stuff on a page which is vital for plugins and other functions – Pieter Goosen Mar 3 '15 at 7:21
  • If you write reset query end of the statement then it works perfectly. – DINESH BHIMANI Nov 25 '17 at 12:13
<?php while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php endwhile; ?>
  • 3
    An explanation to what your code does and how it works would increase the value of your answer. Dumping code like this does not make for a good answer. Please file an edit with the required info. Thank you :-) – Pieter Goosen Mar 3 '15 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.