Forums

Extract the title from the content (1 post)

  1. rwilliams1961
    Member
    Posted 12 months ago #

    I am using a piece of code I found online that allows me to place more than one page onto a single page.

    The code in the page.php is:

    <?php pause_exclude_pages(); ?>
    <?php show_mult_post('page-name'); ?>
    <?php $content = apply_filters('the_content',$include[0]->post_content); ?>
    <?php resume_exclude_pages(); ?>

    In the function.php is:

    function show_mult_post($path) {
    $post = get_page_by_path($path);
    $content = apply_filters('the_content', $post->post_content);
    echo $content;
    }

    When this runs, the entire "page-name" is placed onto the web page. However, I want the title of page-name to be a hyperlink back to page-name from this page into which it's been placed.

    I have no idea how to do this. Any help would be appreciated.

    Thank you.

Reply

You must log in to post.

About this Topic

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