Community Forums › Forums › Archived Forums › Design Tips and Tricks › Magazine Theme Landing Page
- This topic has 5 replies, 3 voices, and was last updated 10 years, 8 months ago by Brad Dalton.
-
AuthorPosts
-
August 9, 2013 at 10:48 pm #55396UCAMember
How do I create and load a custom CSS stylesheet to only work the landing page template? Plus after they go in ( when they click it will go to the about page that is easy how do I make the home link the default wordpress home and not the landing page. Before you say it I know "Buy premise" which I plan on soon but until then...?
http://thomascruse.comAugust 10, 2013 at 12:56 am #55404Brad DaltonParticipantAugust 12, 2013 at 4:40 pm #55895UCAMemberThanks I will try that and let you know how it worked.
August 13, 2013 at 1:21 am #55973Brad DaltonParticipantYou could also copy the landing page, rename it and change the code, as well as add a unique body class which you can use in your style sheet.
August 13, 2013 at 5:25 am #56001RobCubbonMemberAdding to Brad's last point. I use the added body class to landing pages quite a lot. Here's some of my CSS:
.page-template-landing-php h1 { text-align : center ; font-size : 35px!important ; padding: 15px 0; line-height: 48px!important; } .page-template-landing-php h2 {font-size: 28px; line-height: 40px; text-align : center ;} .page-template-landing-php .entry-content {width : 650px ; padding : 10px 15px 15px ; margin : 0 auto!important ; } .page-template-landing-php .page {width: 720px ; border : 3px solid #CDD9FE; margin : 0 auto!important ;} .page-template-landing-php .footer-widgets { display: none; } body.page-template-landing-php .entry-content {font-size: 17px; line-height: 27px; }
This may not be an elegant PHP solution but it works 😉
August 13, 2013 at 7:11 am #56024Brad DaltonParticipantThanks Rob
@UCA There's no real need to use a 2nd file for your landing page as you can use the template class or custom body class as Rob has shown in your main file which is the way i also do it.This is what i use with a custom body class added to the landing page template:
/* Landing Page ------------------------------------------------------------ */ .custom-landing .site-inner { border: 1px solid #222; max-width: 700px; margin: 32px auto; margin: 2rem auto; padding: 48px 64px 0; padding: 3rem 4rem 0; } .custom-landing .site-inner { border: none; }
And here's the template PHP with the custom body class
<?php /** * This file adds the Landing page template to the Custom Theme. * * @author StudioPress * @package Genesis Custom * @subpackage Customizations */ /* Template Name: Landing */ // Add custom body class to the head add_filter( 'body_class', 'custom_add_body_class' ); function custom_add_body_class( $classes ) { $classes[] = 'custom-landing'; return $classes; } // Remove header, navigation, breadcrumbs, footer widgets, footer add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); remove_action( 'genesis_header', 'genesis_do_header' ); remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); remove_action( 'genesis_after_header', 'genesis_do_nav' ); remove_action( 'genesis_after_header', 'genesis_do_subnav' ); remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs'); remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); 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 ); genesis();
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.