WordPress.org

Ready to get started?Download WordPress

Forums

the_content showing the full post (7 posts)

  1. Quozt
    Member
    Posted 6 years ago #

    I have some code to display the latest two posts in a category, however I only want it to show until the more tag, the code below however SHOULD work as far as I know but shows the whole post..

    global $post;
    
    	$myposts2 = get_posts('numberposts=2offset=0&category=12');
    
    	foreach($myposts2 as $post) :
    setup_postdata($post);
    echo"<h1>Chip Tricks And Card Shuffling</h1>";
    echo"<h2>Featured Trick : ";
    	echo the_title();
    echo"</h2>";
    	the_content("Read More..");
    		endforeach;

    Any Ideas

  2. moshu
    Member
    Posted 6 years ago #

    I what file do you have that code? If it is a Page Template (as in Pages) it is not supposed to work.

  3. Quozt
    Member
    Posted 6 years ago #

    it is in a page, is it possible to get this affect in a page?

  4. moshu
    Member
    Posted 6 years ago #

    There were hacks posted. Search...

  5. Quozt
    Member
    Posted 6 years ago #

    I did, several times and the only things that was suggested was "Use the_excerpt" which isn't applicable in this case as I want HTML content from the post in the page..

  6. moshu
    Member
    Posted 6 years ago #

    There are several hits with different solutions here:
    http://wordpress.org/search/more+tag+in+pages?forums=1

  7. Quozt
    Member
    Posted 6 years ago #

    thanks a lot was searching for content() pages not more tag

Topic Closed

This topic has been closed to new replies.

About this Topic