Wordpress

To add page content to Posts Page in WordPress

To add page content to Posts Page so it will appear on the front page above your posts in WordPress.

open …wp-content/themes/albizia/home.php (index.php on some themes)
add the following code below <div id=”contentwrap”>

<?php
if ( 'page' == get_option('show_on_front') && get_option('page_for_posts') && is_home() ) : the_post();
$page_for_posts_id = get_option('page_for_posts');
setup_postdata(get_page($page_for_posts_id));
?>
<div id="post-<?php the_ID(); ?>">
<div>
<?php the_content(); ?>
<?php edit_post_link('Edit', '', '', $page_for_posts_id); ?>
</div>
</div>
<?php
rewind_posts();
endif;
?>

Save file to original location.
From www.webdesignfromscratch.com

Leave a Comment

Your email address will not be published.