IT Specialist

Tag: wordpress

WordPress Front page include multiple page

In WordPress a static front page can be created by using the file front-page.php, we can give this front page a template name in following way:

/**
* Template Name: Front Page
*/

Then when we create a page for example Home, configure it as a static page and select the template Front Page. This will then include the Home page in the front page and call the post content by simply doing this:

<?php 
//title
echo the_title();
//content
echo the_content();
?>

This all works fine for one page, but in case we want to include content from multiple pages in the Front Page this doesn’t work.

However it can be done by adding some custom code to the front-page.php file.

Continue reading