How can I fetch a div
content from a post?
Using the_content()
can fetch all the data but instead of that, I need specific content from the div
only. So far, all I could do was get the link of the post as the div
content.
Here is was I am trying to do:
<?php while (have_posts()) : the_post(); ?>
<li style = "text-align: center; float : left;">
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php echo get_the_post_thumbnail($id); ?></a>
<div class="title">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</div>
<div id = "result">`
<?php echo "<script>
$('#result').load( '".the_permalink()." .ps_post_description' );
</script>"; ?>
</div>
</li>
<?php endwhile; ?>
ps_post_description
is the class of the div for which I need the content.