Extract the title from the content
-
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.
The topic ‘Extract the title from the content’ is closed to new replies.