Welcome! To use this support forum, please Login or Join Today!

   

Landing Page?

{name}
Rank

Total Posts: 1

Joined 2011-05-17

PM

 

Any help on creating a landing page would be great. Hoping to create another page template that doesn’t have the nav bar, footer or header that can be used on the fly. I’m not much of a coder either so instructions would be great.

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

I suppose some of the same functionality of Impacto could be added to Breeze, though it would be limited because with Breeze, the navigation and header are within the same container. Hiding the header would automatically hide the nav by design.

To implement this, you’ll need to create a new page template.
Duplicate page.php, and rename to page-landing.php, then change this at the top:

<?php
/*
Template Name: Landing Page
*/
get_header();

Now, open /lib/functions/theme_functions.php and add the code below around line #167:

// Add specific CSS class by filter
add_filter('body_class','landing_class');
function landing_class($classes) {
 global $post;
 if (is_page_template('page-landing.php') || (is_single() && (in_category('Landing Pages')))) {
 // variables
 $hidenav = get_post_meta($post->ID, 'hidenav', true);
 $hideheader = get_post_meta($post->ID, 'hideheader', true);
 $hidefooter = get_post_meta($post->ID, 'hidefooter', true);

 $classes[] = 'landing';   
 if ($hidenav == "true") {
  $classes[] = 'hidenav';   
  }
 if ($hideheader == "true") {
  $classes[] = 'hideheader';   
  }
 if ($hidefooter == "true") {
  $classes[] = 'hidefooter';   
  }
}
return $classes;
}

Lastly, add this to css/master.css:

/* @group Custom Landing Page Classes */

body.hidenav #menu {display: none;visibility: hidden;}
body.hideheader #header {display: none;visibility: hidden;}
body.hidefooter #footer {display: none;visibility: hidden;margin: 0;height: 0;}
body.hidefooter #wrap {padding-bottom: 0;overflow:visible;}

/* @end */

I haven’t tested this, but it should get you started. If you add these changes and can share a link, possibly PM me your wp-admin info, I’ll be glad to help.

{name}
Rank

Total Posts: 1

Joined 2011-05-17

PM

 

Thanks, PM sent.

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

PM Received.

I’ve updated your site at http://{yourdomain}/jer/lp-test/.
There are three available custom fields:

hideheader = true/false //hides both nav and header. no way around this.
hidenav = true/false // hides just the nav
hidefooter = true/false // hides footer

Have fun!

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

I should probably also mention I needed to modify some CSS in master.css, but couldn’t get to the /css directory via the theme editor. I added a rule to style2.css (just below the body tag) that should be moved/replaced in master.css.

No big deal if you don’t move it. Just didn’t want to abstract things without your knowledge.

Replaced:

body.hidenav #nav {display: none;visibility: hidden;}

with:

body.hidenav #menu {display: none;visibility: hidden;}

(updated the example in the post above in case someone else wants to implement this option)