Using homepage template on different pages

Hello again:)
Is there a way to use homepage template on different pages? I tried it, and here is what I get.
I create a new page, I assign homepage template, but what I see is a duplicate of the original home page. Whatever I change on this new page, is also changed on the original home page.

Can I have two independent pages with home page template applied?

I understand that widgets from homepage cannot be used on other pages, but I need to use Photo Gallery plugin I bought for my galleries. I couldn’t find a way to add its widget to any other page, other then the original homepage.

Thank you,
Kseniya

Hello there,

I hope you are doing well today.

You would need to copy the homepage template php code and create a new template. So you would go to Appearance > Editor and copy the frontpage template then rename it and use that new template.

Best Regards,
Support

I have tried doing this with no success. It seems as thought the widgets won’t perform properly unless on the page defined as homepage. I have tried making a copy of the homepage template and then added an additional widget area and assigned the home page widgets to the new widget area and they do not work properly. How can this be accomplished?

I will try this later and write here if it worked or not

OK so I have 90% of this worked out. I copied template-home.php -> template-new.php and edited the “Template Name” inside the file to be New. I can then assign the “New” template to a page. From there I edited the functions.php file and copied this code:

register_sidebar( array(
	                  'id'            => 'sidebar-home',
	                  'name'          => esc_html__( 'Homepage', 'shapely' ),
	                  'before_widget' => '',
	                  'after_widget'  => '',
	                  'before_title'  => '<h2 class="widget-title">',
	                  'after_title'   => '</h2>',
                  ) );

Changed sidebar-home to sidebar-new & Homepage -> NewPage and I now have a widget area for my new template page.

I then edited the header file to add template-new.php <?php if ( ! is_page_template(array( ‘page-templates/template-home.php’, ‘page-templates/template-new.php’) ) ): ?> and that got ride of the page title.

The only issue I’m still having is when I use the homepage widgets on my new page images don’t appear. Everything else seems to be showing up, except images. I have to modify the widgets in the normal widget area as they also don’t show up in the customize area of the template. If that part can be figured out all will be good.

It actually displays the images for all positions except Background Full and Background Small. When I inspect the page it looks like it should be displaying the image, but it just doesn’t

I’ve discovered the issue but haven’t figured out how to resolve it yet. One the hop page I see the following which doesn’t exist on my custom page. If I remove this I see the same behavior on my home page. Any idea how to get this on my custom pages?

<img class="" src="http://scubaexchange.io/wp-content/uploads/2017/06/DMRY3zX.jpg" style="transform: translate3d(0px, 0px, 0px); position: absolute; top: -70.4px; left: -21px; height: 975px; width: 1373px; max-width: none;">

So this actually makes a duplicate of the entire home page, have not solved it yet.

if ( is_page_template( 'page-templates/template-home.php' ) ) {
to look like:
if ( is_page_template( array( 'page-templates/template-home.php', 'page-templates/template-new.php') ) ) {

After doing all the steps I mentioned it possible to have multiple pages that behave like the home page and allow for the use of the widgets.

Nope the above works I had made another changed that cause the duplication

If you want to remove the gap at the top of the new page you will also need to edit the style.css file and add a line for each new page. On line 1121 you will see:

.page-template-page-templatestemplate-home-php .content-area {
    padding: 0;
}

Copy and modify for each page you add like so:

.page-template-page-templatestemplate-new-php .content-area {
    padding: 0;
}

@vmmeup - We’re you able to figure out how to get the full background and 100% width on new template?

Hi there,

I was just wondering if you resolved the issue you were having with the Background full and background small images not displaying?

I’m having the same issue and cannot figure it out

Thanks,
Milli

Hi @etown,

I’m trying to do the same thing. Have you had any luck?

Hi @kseniya,

I was wondering how you went with this? I am stuck with the background-full and background-small widget images not working. Were you able to get it functioning as normal?

Thanks,
Milli