Community Forums › Forums › Archived Forums › Design Tips and Tricks › Landing page header space
Tagged: landing page
- This topic has 5 replies, 2 voices, and was last updated 8 years, 4 months ago by [email protected].
-
AuthorPosts
-
August 1, 2016 at 9:21 am #190575[email protected]Member
Hi I have been making a landing page as we are trying to start some ppc work. The problem I have is that I don’t want the company logo to be click able if i do show the main top bar in the landing page.php dile. But if I then remove the top bar I get a big space showing on top of the lading page.
please see this link
https://www.nicheadvice.co.uk/best-remortgage-deals-for-home-improvments/
option 1 show the top bar but not have the logo be clickable not sure how i can do this - see main site top bar at http://www.nicheadvice.co.uk
option 2 - remove the top bar all together then place a graphic within the landing page acting as the top as show on the landing page link but this then leaves a great big white space at the top of the page which i cant get rid off
Your thoughts and input will be much appreciated. ps I am not a coder so if you do have suggestion please copy in the code for it so i can try it out.
Thank you so much
https://www.nicheadvice.co.uk/best-remortgage-deals-for-home-improvmentsAugust 1, 2016 at 10:11 am #190581emasaiParticipantYou will need to write a new css rule to hide the header on this page only.
.page-id-5750 .site-header{ display: none; }
Or call the landing page template
.page-template-page_landing-php .site-header{ display: none; }
Need Website Customization or a Responsive CSS fix? Contact Me
Lynne emasai.comAugust 2, 2016 at 2:56 am #190631[email protected]MemberThanks so much for getting back to me. where do i put thsi code. I have tried to put into landing page template and the page does not show at all. Please see code
<?php
/**
* Template Name: Landing page template
* Description: Use this page template to create a landing page.
*/
// Add custom body class to the head
add_filter( 'body_class', 'sk_add_body_class' );
function sk_add_body_class( $classes ) {
$classes[] = 'sk-sales';
return $classes;
}
//* Remove header, navigation, breadcrumbs, footer widgets, footer
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );//* Remove site footer widgets
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );remove_action( 'genesis_header', 'genesis_do_header' );
remove_action( 'genesis_after_header', 'genesis_do_nav' );
remove_action( 'genesis_before', 'genesis_do_subnav' );remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
remove_action( 'genesis_after', 'genesis_footer_widget_areas' );
remove_action( 'genesis_after', 'genesis_footer_markup_open', 11 );
remove_action( 'genesis_after', 'genesis_do_footer', 12 );
remove_action( 'genesis_after', 'genesis_footer_markup_close', 13 );
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
add_action( 'wp_enqueue_scripts', 'my_styles_method' );
function my_styles_method(){
$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
$custom_css = <<<CSS
body{
background-image: url('$url');
background-size: cover;
}
CSS;
wp_enqueue_style(
'custom-style',
get_template_directory_uri() . '/css/custom_script.css'
);
wp_add_inline_style( 'custom-style', $custom_css );
}
genesis();August 2, 2016 at 8:02 am #190645emasaiParticipantYou put that into the style.css file which you can access in the WP dashboard under Appearance - Editor - then choose the style.css file
Need Website Customization or a Responsive CSS fix? Contact Me
Lynne emasai.comAugust 2, 2016 at 11:03 am #190650[email protected]MemberHi please see below css in the landing page i have tried to place it at the end and its not making any change. sorry but can you copy and past so i can update . thank you so much
/*-----------------------------------------------------------------------------------*
/* Landing page template
/*-----------------------------------------------------------------------------------*/
.page-template-landing-template-php .site-header, .page-template-landing-template-php{
background-color: transparent;
}
.page-template-landing-template-php .site-inner{
padding-top: 0px;
}
.page-template-landing-template-php .site-header{
min-height: 0px;
}
.page-template-landing-template-php .site-header .wrap{
background-color: #fff;
margin-top: 40px;
text-align: center;
}
.page-template-landing-template-php article{
padding-top: 0px;
}
.page-template-landing-template-php a{
display: block;
padding: 20px;
width: 100%;
color: #fff;
background-color: #aaa;
border: 2px solid #aaa;
font-weight: bold;
}
.page-template-landing-template-php a:hover{
color: #aaa;
background-color: #fff;
}
.page-template-landing-template-php .post-edit-link{
display: initial;
color: initial;
padding: initial;
background-color: initial;
border: initial;
font-weight: initial;
}
@media only screen and (max-width: 801px){
body{
background-size: initial !important;
}
.page-template-landing-template-php .site-header{
max-width: 100%;
text-align: center;
margin: 0px auto;
}
}August 3, 2016 at 5:36 am #190685[email protected]Memberyou are a star.. 🙂 Thank you so much
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.