Community Forums › Forums › Archived Forums › Design Tips and Tricks › Duplicating a Home Page for Other Pages on the Executive Pro Theme
- This topic has 8 replies, 3 voices, and was last updated 10 years, 11 months ago by
Brad Dalton.
-
AuthorPosts
-
February 23, 2014 at 1:30 pm #92039
alethamcmanama
MemberHi,
I have a request from a client that they would like the home page layout to be applied to two other pages on their website I'm building. Is there an easy way to do this? I've read that i would need to create a template page to do this. Is that correct? It's not something I'm really good at, so the easiest way possible to create the template would be great!
Thanks,
Aletha McManama
http://www.salvatoremanzi.com/February 23, 2014 at 8:32 pm #92070Brad Dalton
ParticipantTry this http://wpsites.net/web-design/custom-page-template-widgets/
If you want to use the same styling as your home page, you can use the same classes in your PHP therefore no need to duplicate the CSS.
March 3, 2014 at 6:26 pm #93292alethamcmanama
MemberHey, Brad. Thank you for your earlier advice.
How do I remove the sidebar from this custom page I created? Also, I don't believe I was able to call in for the Executive theme the custom-cta widget that is on the home page (cta is Call to Action). Where do I need to place that in the custom.php template? Just below the "custom-top" section?
Here's the custom page link: http://www.salvatoremanzi.com/tester-page/
Here is the PHP code I used for the custom page:
<?php
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'executive_custom_loop_helper' );
/*
Template Name: Custom
*/function executive_custom_loop_helper() {
if ( is_active_sidebar( 'custom-top' ) || is_active_sidebar( 'custom-left' ) || is_active_sidebar( 'custom-right' ) || is_active_sidebar( 'custom-bottom' ) ) {
if ( is_active_sidebar( 'custom-top' ) ) {
echo '<div class="custom-top">';
dynamic_sidebar( 'custom-top' );
echo '</div><!-- end .custom-top -->';
}if ( is_active_sidebar( 'custom-left' ) || is_active_sidebar( 'custom-right' ) ) {
echo '<div class="custom-middle">';
if ( is_active_sidebar( 'custom-left' ) ) {
echo '<div class="custom-left">';
dynamic_sidebar( 'custom-left' );
echo '</div><!-- end .custom-left -->';
}if ( is_active_sidebar( 'custom-right' ) ) {
echo '<div class="custom-right">';
dynamic_sidebar( 'custom-right' );
echo '</div><!-- end .custom-right -->';
}echo '</div><!-- end .custom-middle -->';
}
if ( is_active_sidebar( 'custom-bottom' ) ) {
echo '<div class="custom-bottom">';
dynamic_sidebar( 'custom-bottom' );
echo '</div><!-- end .custom-bottom -->';
}}
else {
genesis_standard_loop();
}}
genesis();
Thanks for your help!
Warmly,
AlethaMarch 4, 2014 at 2:29 am #93332viorelepuran
MemberYou could try in css:
#page-id-xx .sidebar{
display:none !important;
}
#page-id-xx .content{
width: 1140px !important;
}March 4, 2014 at 5:44 am #93346Brad Dalton
ParticipantAdd this to your template
//* Force full width content layout add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
Can't test that code unless you paste it into a Gihub Gist and embed it.
March 4, 2014 at 6:00 am #93348alethamcmanama
MemberBrad,
Adding the above code to my custom.php file did not work. Is there a specific place I need to paste it?
Here's a link to the Gist code if you want to test it:
I really appreciate your help as I've got to get the final edits over to my client today.
Warmly,
Aletha McManamaMarch 4, 2014 at 6:01 am #93349alethamcmanama
MemberMarch 4, 2014 at 4:18 pm #93436alethamcmanama
MemberHey, Brad. I'm sorry to keep bothering you on this, but I just heard back from my client on the latest edits on his new site.
My client DOES want to duplicate the Executive Pro theme home page so it can be used for two other pages on his site. That does include the slider widget too. He's fine with it being the same slideshow for all the pages he wants to have the custom template on.
Here's the home page again if you need it:
http://www.salvatoremanzi.com/
Could you send me the correct custom template code for the custom.php file so that it pulls in ALL of the elements of the home page widgets? I have already registered the custom widgets in the functions.php file. That was the easy part. Plus, I added custom CSS code to the stylesheet based on the article you provided above. I'm happy to pay you for creating the custom template as long as it's not hundreds of dollars involved. Let me know what you think.
Thanks!
Warmly,
Aletha McManamaMarch 4, 2014 at 11:18 pm #93473Brad Dalton
ParticipantHappy to code these for you Aletha.
Please use the contact form on my site and i will code them as soon as i have your details. http://wpsites.net/contact
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.