Forums

Grab content from another page? (3 posts)

  1. kr3wks8r231
    Member
    Posted 6 months ago #

    Is it possible to make some sort of code like
    <?php the_excerpt('PAGEID'); ?>

    To pull information from another page. I want to have a area that oulls about 50 characters from my about page to the index page and display it in a box. I cannot think of a way to do this. I thought at first the would be a guery method but didn't find one. Please help.

  2. lhoylhoy
    Member
    Posted 6 months ago #

    <?php $about_page = get_page_by_title('about'); echo "<p>$about_page->post_content</p>";?>

    that would display your about page. regarding the character limit, haven't researched it yet.

  3. kr3wks8r231
    Member
    Posted 6 months ago #

    Thank you, I wonder if someone knows how to make a a limit to a varible. maybe something like <?php $about_page = limit('50') ?> If only it was so easy.

    So does anyone know how to apply a character limit to this?

Reply

You must log in to post.

About this Topic