WordPress.org

Forums

Too Much Padding in the Header (41 posts)

  1. mikeperazzetti
    Member
    Posted 3 years ago #

    OK. Somehow, I managed to find a way to make the tagline appear in Annotum Theme, thus:

    http://www.mikeperazzetti.com

    However, I m\y have inadvertently deleted an item of code because there is now an excessive amount of space between the header and the tagline.

    Does anyone have any ideas or the php code (and where) to right this again so it looks normal. I would be most grateful because my last resort at this point is to delete all the files from the file manager and start over with a new installation and start this over from scratch.

    I really,- really do not want to do that after all of the work setting this up. I am almost done!

    Thanks,

    Mike

  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

    It's due to the padding (the 35px) in this CSS code -- line 78

    #site-name {
        font-size: 36px;
        font-weight: normal;
        line-height: 1.2;
        padding: 35px 0 8px;
        text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
    }

    BUT whatever you did gave the same ID #site-name to both the h1 and h2 tags - -which is not allowed per coding rules. You can only have one instance of an ID on a page. So you'll want to go back and fix that. You should be able to download a new copy of the theme and then look at the header.php file -- and compare that to yours.

    But really you SHOULD be using a child theme to make changes -- otherwise you will lose all the changes when WP or the theme is updated...

  3. mikeperazzetti
    Member
    Posted 3 years ago #

    Unfortunately, I do not have access to that CSS code or file to add that code. It is not in the Style.css sheet I have and that is the only CSS page that I have.

    Not allowed per coding rules? Please explain. I have been trying to find a way to make the tagline visible and I finally found it. If I replace it with the old code, I defeat the whole purpose of my quest.

    If you can help me fix the php code in the header so that there is less padding between the Title and the tagline AND not violate any WordPress laws in the process, then I am game.

  4. WPyogi
    Forum Moderator
    Posted 3 years ago #

    It's not a WP rule -- but a CSS standards rule! If you post the header.php file, I'll look at it -- though I'm not a php expert by any means. It's likely just a matter of adding a different ID and adding a corresponding CSS declaration.

  5. mikeperazzetti
    Member
    Posted 3 years ago #

    Thank you. Here it is below. Otherwise I have about given up on a separate line for the tagline. I do not intend to pay for an upgrade for one simple line of code and then keep paying yearly.

    http://pastebin.com/vVKZYcs5

  6. WPyogi
    Forum Moderator
    Posted 3 years ago #

    I'll look at it -- copied it off here because you are not supposed to post more than ten lines of code -- to do so, use Pastebin. So edit your post -- or a moderator will do it for you!

  7. mikeperazzetti
    Member
    Posted 3 years ago #

    What is pastebin and how do I find it?

  8. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Okay, not totally sure this will work, so before you change the current file, make a copy of it.

    So put this piece of code just below the line that starts with

    <body
    REMOVE THE EXISTING CODE IN THIS SECTION

    ...
    UP TO
    ...
    THIS NEXT LINE:

    <nav id="secondary-nav" class="clearfix">

    <header id="header" class="act">
    		<div class="header-body">
    			<div class="in">
    				<?php if (anno_has_header_image()): ?>
    					<h1 id="site-name"><a href="<?php echo home_url(); ?>/" title="Home" rel="home"><?php anno_header_image(); ?></a></h1>
    					<h2 id="tagline">An Analysis of Influence</h2>
    				<?php else: ?>
    					<h1 id="site-name"><a href="<?php echo home_url(); ?>/" title="Home" rel="home"><?php bloginfo('name') ?></a></h1>
    					<h2 id="tagline">An Analysis of Influence</h2>
    				<?php endif; ?>

    See if it works and then we can add CSS if needed...

  9. WPyogi
    Forum Moderator
    Posted 3 years ago #

    See this re: pastebin -- maybe read the rest too!

  10. mikeperazzetti
    Member
    Posted 3 years ago #

    Thank you. It wqorked up to a point- How do I increase the font size so that it is a little more balanced?

  11. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Cool.

    So now, in the style.css, put this:

    .tagline {
         28px;
         padding: 5px 0 10px 0;
    }
  12. mikeperazzetti
    Member
    Posted 3 years ago #

    Thank you, but thaty did not work. The font size is still the same. I do not have access to changing the style.css file, I believe, without paying fees. I would have to do it in the php file.

  13. WPyogi
    Forum Moderator
    Posted 3 years ago #

  14. WPyogi
    Forum Moderator
    Posted 3 years ago #

    No, all WP.ORG themes are fully editable. You are thinking of the Annotum WP.COM version -- on WP.COM, any CSS editing requires a paid upgrade. No theme can be posted on WP.ORG repository if it requires money for changing the CSS.

  15. mikeperazzetti
    Member
    Posted 3 years ago #

    I have not accessed the editor from that link. I have only seen style.css at the back end of the site and that file has next to nothing. Thank you. How do access this to fix it and where?

  16. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Look at my post above the most recent one -- the linked page explains how to do this:

    Admin screen --> Appearance --> Editor --> on the left side there should be the files you can edit. Open the CSS one.

    (If it is not there, we can do it from back-end...but it should be there.) And yes, it's mostly empty -- that's how this theme is set up. It keeps you from messing with the existing CSS code -- but any changes you make in the "blank" file will take precedence over the existing styles so long as the newer is coded correctly.

  17. mikeperazzetti
    Member
    Posted 3 years ago #

    I have gone to Admin Screen> Appearance> editor > Style.css many times. That is where I entered that last bit of code you sent me. Is that where I am supposed to be or is there somewhere else?

    If that's it, nothing I have ever added to that has done anything. That's why it is still virtually empty.

  18. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Yeah, that should be it, but it looks like that file is not linked to the html files as it should be. Weird. I went to the Annotum site and as you found out (I saw your post from the other day), not any help on how to use the theme itself -- just on all the research doc stuff). Very annoying. So there are a couple of options -- one is that we can try to edit the header.php file to link that stylesheet -- as you are definitely going to want to be able to make other changes in the future. And/or we can add inline CSS styles for the tagline -- so at least that's fixed. And/or you can try to edit the other stylesheet which is in: assets > main > css > main.css .

    The first would be the best long-term fix...what do you think?

    I think this theme may be one of the few that was initially designed for wordpress.COM -- and then a slightly modified version put over here - so that may be why it's strange. Still, very frustrating if you happen to be trying to use it on a self-hosted site. ARGH.

  19. mikeperazzetti
    Member
    Posted 3 years ago #

    Header.php or header-default.php? The first one is just a placeholder I think.

    And yes, communication with the developers has been less than positive or not at all.

    I am game with the first option. I just don't know where to start, actually.

    So whenever you are ready, thank you immensely. You are the first person I have encountered here that has been extremely helpful in all of this.

    Thanks again,

    Mike

  20. mikeperazzetti
    Member
    Posted 3 years ago #

    And also is it possible to link that tagline (in the code) to the title (header 1)? I installed google fonts and I would like to have matching fonts.

    I was able to do that before with the cobbled code I created but it doesn't seem to do anything now.

  21. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Hi Mike,
    Okay, back to this pain in the *** theme -- LOL! I'm really not a php or WP expert when it comes to modifying php files, so let me look at this some more...or maybe someone will come along who knows more than either of us does...

    It won't be a problem to use the same font -- you'll just put it in the CSS file (once we get that going)...

  22. mikeperazzetti
    Member
    Posted 3 years ago #

    Wonderful. Thank you! If we cannot find a way, then I may have to do the unthinkable: forget about the tagline.

    I hope we don't have to.

    Thanks again for all of your help and smarts,

    Mike

  23. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Well, the other possible option is to use another theme -- are you seriously wedded to this one? I saw that you are going (or about to go) to grad school (very cool -- I'm just about to be done with an MBA program -- went back many years after my undergrad) -- so I'm guessing the "academic / research / publishing" aspects of this theme are the appeal? But do you know for sure that you need all that? You could, conceivably, have two sites (under one domain) -- one for your more personal stuff -- and one for "published" stuff...

    Just a thought...

  24. alchymyth
    Forum Moderator
    Posted 3 years ago #

    using Firefox' web developer add-on https://addons.mozilla.org/en-US/firefox/addon/web-developer/ would show, that the tagline could be selectively styled by:

    h2#tagline { }

  25. mikeperazzetti
    Member
    Posted 3 years ago #

    OK. I'm game for that alternate solution. The more personal stuff will be the same however, though nothing peer-reviewed yet but I plan on doing that as soon as I enter or shortly thereafter. In that case, I will have to drop the obsession with the tagline, which may take us back to where we started.

    Congratulations to you, too.

    But I am open for ideas, and for the ability to replace that big blue blob with a photo of my choosing. I know there is a plugin, but I haven't figured out which one will work and then one asked that I enter code into style.css (back to where we stated (ugh). Unless I can create something in file manager at the very back end?

  26. WPyogi
    Forum Moderator
    Posted 3 years ago #

    @alchymyth, thanks for posting here. The problem seems to be that in this theme, the style.css file is not linked so editing it does not work. The theme styles are in another stylesheet...by intention. So we are trying to link that stylesheet -- can we just put a link to it in the header.php file (below the wp_head() ??)?

  27. WPyogi
    Forum Moderator
    Posted 3 years ago #

    @Mike, well, another theme would definitely be easier -- and at least delay dealing with the issues with Annotum. Plug-ins really are not the best solution for things like a header image -- as they can slow down the site, and/or cause bigger problems...but you could probably do an background-image without a plug-in -- but that's back to CSS -- LOL! Let's see if alchymyth replies, and/or we'll try it ourselves (ha!).

    Also, you could probably get at least some of the functionality that you would want for peer-reviewed stuff, without using Annotum (I'm not dissing it as it's a VERY cool concept...but not exactly user-friendly!)...or just set the publishing part up as a separate site (using Annotum) with a link from/to your personal site -- and then don't worry about what the Annotum site looks like. Your "personal" site would be the way you want it -- more creative, etc.

  28. alchymyth
    Forum Moderator
    Posted 3 years ago #

    The problem seems to be that in this theme, the style.css file is not linked so editing it does not work.

    I see; the theme really does not want to be edited :-(

    one step forward -
    to get the style.css being loaded as stylesheet - after the other stylesheets of the theme - add this to functions.php:

    add_action('wp_print_styles','activate_style_css');
    function activate_style_css() {
    wp_register_style( 'general-style',
        get_stylesheet_directory_uri() . '/style.css',
        array(),
        '2012',
        'all' );
      wp_enqueue_style( 'general-style' );
    }

    this still makes it difficult to edit all other templates as these as well cannot be accessed via the 'appearance' 'editor'...

  29. mikeperazzetti
    Member
    Posted 3 years ago #

    That unfortunately caused a little burp, I think.
    [ Signature moderated. ]

  30. mikeperazzetti
    Member
    Posted 3 years ago #

    Hopefully you saw that. I just took it off. The code was showing on the front end at the top of the header.

Topic Closed

This topic has been closed to new replies.

About this Topic