Merging two pages into one homepage

I am trying to customise my Wordpress homepage.

I decided to get fullscreen image theme (TwoFold by Fuel Themes). As I am preparing photography portfolio website, graphic content is very important to me. However, I'd like to add some text below the image slider, ideally it would be a whole page below the current homepage slider. Please see the demo theme: TwoFold Theme

And what I would like to add (simple mockup):

Methods I found here seem not to work well - they extend bottom of the homepage, however return no content below the slider.

Let's say I'd like to insert "About" page under the slider. How should I modify home page layout to do that?

Orignal code below:

?php
/*
Template Name: Home
*/
?
?php get_header(); ?
?php if (have_posts()) :  while (have_posts()) : the_post(); ?
?php 
    $id = get_the_ID();
    $home_layout = get_post_meta($id, 'home_layout', true) ? get_post_meta($id, 'home_layout', true) : 'style1';
    get_template_part( 'inc/templates/homepage/'.$home_layout );
?
?php endwhile; else : endif; ?
?php get_footer(); ?

Lots of thanks for any hints as I am clueless.

Topic merging homepage Wordpress

Category Web


It worked almost as I wanted, thank you for the comments!

Almost - therefore I have one more question. (I am sorry if that is obvious, I am not experienced and I am learning everything just now, I already learnt a lot and I want to learn more as currently I cannot afford paying for these modifications).

I tried two method:

Method 1 - inserting separate (non-WP) page in div and iframe into style1.php - it looks exactly as I wanted:

enter image description here

However returned content is not seen by Google bot, not seen by WP Admin and WP Plugins, which makes all very difficult to optimise.

Method 2 - echoing other WP page with desired content by:

<?php
$your_query = new WP_Query( 'pagename=about' );
while ( $your_query->have_posts() ) : $your_query->the_post();
    the_content();
endwhile;
wp_reset_postdata();?>

What returned raw text:

enter image description here

which is visible for Google bot, WP engine etc.

My question is: How do I return formatted page that is visible for Google, WP, plugins etc.?

I know that it may be simple, however I achieved a lot already and I'd like to finalise whole project with your help and my good will.

Many thanks!


Your theme is dynamically loading a template part.

Look here:

   $home_layout = get_post_meta($id, 'home_layout', true) ? get_post_meta($id,'home_layout', true) : 'style1';
get_template_part( 'inc/templates/homepage/'.$home_layout );

Now look in your folder at inc/templates/homepage/ and you should see the various template parts.

Those templates parts are where you'll want to add your new code (for the about page).

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.