[Resolved] page header position doesnt change

Home Forums Support [Resolved] page header position doesnt change

Home Forums Support page header position doesnt change

Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #145701
    Anton Samarin

    I try to adjust page header position to Inside Contert Area. But it doesnt work. Nothing changes. Why?

    position

    #145739
    Tom
    Lead Developer
    Lead Developer

    Is that a blog post or a page? Or is it the blog?

    The first option there is for pages, the second one is for single posts.

    #145747
    Anton Samarin

    it is Blog Page Header: http://7nov.ru/

    #145789
    Tom
    Lead Developer
    Lead Developer

    Ah, so you’re wanting the page header to show up next to the sidebar instead of above it?

    #145796
    Anton Samarin

    Yes, how can I achieve this? I need to place slider to be here constantly nest to the sidebar. May be there is another way?

    #145799
    Tom
    Lead Developer
    Lead Developer

    Give this function a try:

    add_action( 'wp','generate_move_blog_page_header' );
    function generate_move_blog_page_header()
    {
    	if ( is_home() ) :
    		remove_action('generate_after_header','generate_page_header', 10);
    		add_action('generate_before_main_content','generate_page_header', 0);
    	endif;
    }

    Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

    #145820
    Anton Samarin

    I add this code to functions.php and site crashes. Or I need to add it to other file?

    #145822
    Tom
    Lead Developer
    Lead Developer

    functions.php should work.

    Make sure there’s this at the top: <?php

    #145827
    Anton Samarin

    It worked, but stuck to entery below

    #145832
    Tom
    Lead Developer
    Lead Developer

    Try this CSS:

    .blog .page-header-content {
        margin-bottom: 20px;
    }
    #145837
    Anton Samarin

    It helped below, but upper border is lower then sidebar upper border

    #145838
    Tom
    Lead Developer
    Lead Developer

    I adjusted the PHP above to make it so the area isn’t a part of masonry: https://generatepress.com/forums/topic/page-header-position-doesnt-change/#post-145799

    For the spacing, adjust your CSS to this:

    .blog .page-header-content {
        margin-bottom: 20px;
        margin-top: 0;
    }
    #145842
    Anton Samarin

    Good! upper and lower borders are OK. but now there is a problem with right border 🙂 http://7nov.ru

    #145843
    Tom
    Lead Developer
    Lead Developer

    Here we go:

    .blog .page-header-content {
        margin-bottom: 20px;
        margin-right: 20px;
        margin-top: 0;
    }
    #145844
    Anton Samarin

    Super! Tom, thank you a lot!

Viewing 15 posts - 1 through 15 (of 28 total)
  • You must be logged in to reply to this topic.