WordPress.org

Support

Support » Themes and Templates » Bootstrap Ultimate » [Resolved] Remove Page Header, Leave Post Header

[Resolved] Remove Page Header, Leave Post Header

  • Hi eminozlem, thanks for making this theme.

    2 issues:
    First, I’d like to remove the header (including Title and bar that looks like a <hr> or css “border-bottom”) from all pages, but leave the header for posts. I’ve isolated this part of the php from content-single.php, and can “comment it out,” but that removes the title from both posts and pages.

    <!--<header><div class="page-header"><h1 class="single-title" itemprop="headline"><?php the_title(); ?></h1></div></header>-->

    How could I modify it to show the <header> only if on a post?

    Second, I can’t find in the CSS how to reduce the amount of space below the navbar but above where the body / content begins. I can’t find the margin or margin-top in the css. any help would be appreciated.

    I really like how you’ve made this easy to use. I gave you (and the theme) 5 stars! Keep up the good work!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author eminozlem

    @eminozlem

    Thank you for using the theme and your positive feedback.

    1- You can wrap the header with a conditional as:

    <?php if( ! is_page() ) { ?>
    	<header>
    	<div class="page-header"><h1 class="single-title" itemprop="headline"><?php the_title(); ?></h1></div>
    	</header> <!-- end article header -->
        <?php } ?>

    2- There should not be any margin between header – content by default. However if you’re using a Bootswatch theme that might’ve added. If you have a link to your website I can pinpoint it for you.

    1 – perfect, was exactly what I needed (i’m not super proficient in PHP).

    2 – Yes, I switched to the Flatly Bootswatch theme. site is https://zaptax.es. Notice the spacing above my blue banner header on the homepage. You can also see it on the large spacing on the blog page and each individual post: https://zaptax.es/blog/

    I just can’t figure out where in the css I can adjust the padding / margin.

    You rock!

    Theme Author eminozlem

    @eminozlem

    yup, flatly has a margin-bottom for header:

    .navbar { margin-bottom: 21px;}

    also there seems to be padding-top on the #content which you seem to have added from inline css.

    #content { padding-top: 27px;}

    you can adjust / remove the spacing by modifying those. Marking as resolved, let me know if you’ve further questions.

    Thanks a lot. So I still can’t find those specific lines in the css files on the server (I didn’t add them, but they are being pulled either from a .min.css file or some other bootstrap.css file). But what I ended up doing is using your Quick Start Options Group (under Common in Bootstrap UL Options) – where I can override the existing css. I put

    .navbar { margin-bottom: 0px;}
    #content { padding-top: 0px;}

    in there and boom, I get the result I needed. Thanks so much for your help. Please feel free to use me as a beta tester if you need any help or user input going forward.

    Cheers

    Theme Author eminozlem

    @eminozlem

    No problem, yeah that’s one way to do it. Alternatively you can enable & use the override.css file.
    There are some minor issues with the current release, but all should be good within a few updates. OTOH, I’m kind of ideas for new features let me know if you have any suggestions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Remove Page Header, Leave Post Header’ is closed to new replies.
Skip to toolbar