• Resolved iammaddog

    (@iammaddog)


    hello,

    I would like to change the formatting of my blog title. I had seen a previous post on this, which referenced using plain text in place of …. bloginfo(‘name’). I would like to get some clarification on this. So, here’s a snippet of code from header.php:

    [please mark the code by wrapping it into backticks or by using the ‘code’ button, to keep it readable]

    <div id=”header”>
    <div id=”branding”>
    <?php if (is_home()) { ?>
    <h1 class=”homelink”>” title=”<?php bloginfo(‘name’); ?>”><?php bloginfo(‘name’); ?></h1>
    <?php } else { ?>
    <div class=”homelink”>” title=”<?php bloginfo(‘name’); ?>”><?php bloginfo(‘name’); ?></div>
    <?php } ?>
    <p class=”description”><?php bloginfo(‘description’); ?></p>
    </div>

    Would I need to go through and just comment out the bloginfo(‘name’) throughout the div tags or header.php, or would I need to just comment out the entire div tag, replacing it with html?

    Thanks,
    Chris

Viewing 6 replies - 1 through 6 (of 6 total)
  • a:
    formatting is generally done using css in style.css

    b:
    if you need to style individual words different, you can replace
    <?php bloginfo('name'); ?>
    (the second occurrance in each of the two lines with this code)
    with the html you need (only restricted by the syntax rules for valid html)

    if you are stuck, you may need to provide a more detailed example of what you want to achieve.

    Thread Starter iammaddog

    (@iammaddog)

    alchymyth, you’re all of the place! Thanks for the replies!

    My blog name is Christopher Hall Photography (https://www.hall-photography.com/blog/) and I want to change the typeface, color and at some point, drop it down to ‘rest’ on the horizontal line below it.

    What I’m reading in your reply is that I can change these things in style.css or I can use html and replace the two instances of title=”<?php bloginfo(‘name’); ?>. Yes?

    Where in the style sheet do I change the style for the blog title? .homelink? .page-title?

    You can change the actual name of the blog in the settings panel of your wordpress account… aside from that you are going to need to access the CSS to change the font/color. If you wanted to rest the title on the horizontal line it is going to require some development on your theme… the current layout is not set up to do that.

    goodluck

    Thread Starter iammaddog

    (@iammaddog)

    Patrick Orr wrote:

    You can change the actual name of the blog in the settings panel of your wordpress account… aside from that you are going to need to access the CSS to change the font/color. If you wanted to rest the title on the horizontal line it is going to require some development on your theme… the current layout is not set up to do that.
    goodluck

    Patrick, In changing the theme (PrimePress), could this be in the header.php file? It looks like with PrimePress, there is a ‘layout’ section…

    Chris

    it is (more-or-less) .homelink:

    /*-----header-----*/
    .homelink{font-size:35px; line-height:1; font-weight:bold; letter-spacing:-0.5px; padding:30px 20px 10px 20px; font-variant:small-caps;}
    .homelink a{color:#444;}
    .homelink a:hover{color:#000; text-decoration:none;}

    in style.css of your theme, not too far from the beginning.

    https://www.w3schools.com/css/css_font.asp

    Thread Starter iammaddog

    (@iammaddog)

    Thanks Patrick and alchymyth!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Formatting blog title’ is closed to new replies.