Tagged: page templates
- This topic has 1 reply, 2 voices, and was last updated 10 years, 1 month ago by Theme Horse Support Team.
-
AuthorPosts
-
November 7, 2014 at 1:29 am #18284patmatt69Participant
Hi Guys!
I emailed you quite a long time ago when I first purchased your theme Clean Retina Pro and asked you how to create 2 page templates: #1, a page template with no navigation menu and no header image as well as #2, a page template with no navigation menu with the header. We have followed everything that we could find about doing this with WordPress pages but nothing works. Can you please provide us with the code necessary to accomplish these 2 instances?
November 7, 2014 at 7:23 am #18296Theme Horse Support TeamKeymasterHi patmatt69,
Sorry we can’t provide necessary code, You may use if condition to find the issue. This feature is also not available in you theme so you need to hire a developer too.Ok If you want to display header image whose page id is 5 or any page id (Page id you need to find to display header)
This is simply logic
The code is inside clean retina pro -> library -> structure -> header-extension.php on line no 262 to 265, Replace these code <?php $header_image = get_header_image();if( !empty( $header_image ) ) :?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"><img src="<?php echo $header_image; ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a> <?php endif; ?>
and add this
<?php $header_image = get_header_image(); $id = get_the_ID(); if($id == 5){ if( !empty( $header_image ) ) :?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"><img src="<?php echo $header_image; ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a> <?php endif; }?>
Here you need to find the page id where you want header,We recommended not to change the code because if you change the code then while updating to our new version all your customisation code will be lost. So better make child theme and first unhook the functions and the edit the code.
http://codex.wordpress.org/Child_Themes
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.