Forums

Grabbing Content From Another Page + Character Limit (1 post)

  1. lukejames1111
    Member
    Posted 12 months ago #

    Hey guys,

    A client of mine wants a pretty bespoke theme creating where it automatically drags content out of different pages and posts it onto the homepage into some div's.

    I've knocked up this peice of code

    <?php query_posts('page_id=2');
    if (have_posts()) : ?>
    <div>
    <?php while (have_posts()) : the_post(); ?>
    <?php echo the_content('Continue reading ยป'); endwhile; ?>
    </div>
    <?php endif; ?>

    Which drags the content out of a certain page and publishes it onto the homepage. However, the div's are going to be fixed height, therefore they need a character limit after a certain amount of characters.

    Is anyone out there that can help me as this would be a huge help!

    Thanks, Luke

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 12 months ago by lukejames1111
  • This topic is not resolved
  • WordPress version: 3.1.3