How to remove tagline from a single page with Minimum Pro

Community Forums Forums Design Tips and Tricks How to remove tagline from a single page with Minimum Pro

This topic is: resolved

Tagged: 

This topic contains 3 replies, has 3 voices, and was last updated by  Timothy Mayo 10 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #59703

    Timothy Mayo
    Participant
    Post count: 5

    Hello,

    Does anyone know how to remove the tagline area from a single page?

    I’m using the Minimum Pro theme.

    I know I could do this with the following CSS:

    .page-id-x .site-tagline {
    display:none;
    }

    But I’d rather not use display:none if there is another option.

    Many thanks!

    #59834

    braddalton
    Participant
    Post count: 8823

    Link to your site please.

    You can add a conditional statement after the function in the code for the tagline like this:

    Simply replace the page i.d in the code above to your own.

    You may need to adjust some css.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #59835

    Sridhar Katakam
    Participant
    Post count: 923

    1) In functions.php change

    //* Add the site tagline section
    add_action( 'genesis_after_header', 'minimum_site_tagline' );
    function minimum_site_tagline() {
    
    	printf( '<div %s>', genesis_attr( 'site-tagline' ) );
    	genesis_structural_wrap( 'site-tagline' );
    
    		printf( '<div %s>', genesis_attr( 'site-tagline-left' ) );
    		printf( '<p %s>%s</p>', genesis_attr( 'site-description' ), esc_html( get_bloginfo( 'description' ) ) );
    		echo '</div>';
    	
    		printf( '<div %s>', genesis_attr( 'site-tagline-right' ) );
    		genesis_widget_area( 'site-tagline-right' );
    		echo '</div>';
    
    	genesis_structural_wrap( 'site-tagline', 'close' );
    	echo '</div>';
    
    }

    to

    //* Add the site tagline section
    add_action( 'genesis_after_header', 'minimum_site_tagline' );
    function minimum_site_tagline() {
    	if (!is_page('10')) {
    		printf( '<div %s>', genesis_attr( 'site-tagline' ) );
    		genesis_structural_wrap( 'site-tagline' );
    
    			printf( '<div %s>', genesis_attr( 'site-tagline-left' ) );
    			printf( '<p %s>%s</p>', genesis_attr( 'site-description' ), esc_html( get_bloginfo( 'description' ) ) );
    			echo '</div>';
    
    			printf( '<div %s>', genesis_attr( 'site-tagline-right' ) );
    			genesis_widget_area( 'site-tagline-right' );
    			echo '</div>';
    
    		genesis_structural_wrap( 'site-tagline', 'close' );
    		echo '</div>';
    	}
    }

    where 10 is the ID of static Page in question.

    2) Add the following at the end of child theme’s style.css (WP dashboard -> Appearance -> Editor):

    .page-id-10 .site-inner {
        margin-top: 6rem;
        padding: 4rem 0;
    }

    where 10 is the ID of static Page in question.


    #59858

    Timothy Mayo
    Participant
    Post count: 5

    That works perfectly guys! Thank you so much :-)

    Tim

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.