Viewing 14 replies - 1 through 14 (of 14 total)
  • rdellconsulting

    (@rdellconsulting)

    Try a snippet

    ElectricFeet

    (@electricfeet)

    There’s a snippet for this on the theme’s site: https://www.themesandco.com/snippet/add-2nd-line-tagline/

    Thread Starter neilh2012

    (@neilh2012)

    Thank you EF and Rdell but can I use without using a child theme. I never set up a child theme. I tried adding the three pieces of code but it did not work. Not sure if I did it right.

    ElectricFeet

    (@electricfeet)

    You don’t need a child theme. You just need to paste the first block of CSS into the Custom CSS panel in Customize’it.

    Thread Starter neilh2012

    (@neilh2012)

    I tried this and its not working?

    As ElectricFeet said, go into the Custom CSS panel in Customize’it. Found?
    And paste this code (from the link suggested by rdellconsulting):

    .site-description:after {
        content:      "YOUR ADDRESS";
        display:      block;
        font-size:    0.8em;      /* optional */
        font-weight:  normal;     /* optional */
        opacity:      0.7;        /* optional */
    }

    Thread Starter neilh2012

    (@neilh2012)

    I have tried this and its just not working. here is all the code I have in my custom css.

    /* Move SI to Right, adjust margins if needed */
    .navbar-inner .social-block {
    float: right;
    margin-right: -30px;
    text-align: right;
    }
    /* Move Tagline to Right, adjust margins if needed */
    .navbar-wrapper .navbar h2 {
    clear: both;
    float: right;
    margin-top: 0px;
    margin-left: 20px;
    text-align: right;
    }

    .navbar .navbar-inner {
    -webkit-box-shadow: 0px 0px 0px;
    -moz-box-shadow: 0px 0px 0px;
    box-shadow: 0px 0px 0px;
    }

    .site-description:after {
    content: 662 Turnpike St;
    display: block;
    font-size: 0.8em; /* optional */
    font-weight: normal; /* optional */
    opacity: 0.7; /* optional */
    }
    footer#footer {
    background: none repeat scroll 0 0 #808080

    First, you missed the quote.
    content: "662 Turnpike St;"

    Thread Starter neilh2012

    (@neilh2012)

    I tried the quotes and still nothing.

    rdellconsulting

    (@rdellconsulting)

    Firebug is showing:

    .site-description:after {
      display: block;
      font-size: 0.8em;
      font-weight: normal;
      opacity: 0.7;
    }

    so no evidence of the content: being added?

    Thread Starter neilh2012

    (@neilh2012)

    I figured it out. I hade to put it in the style.css file. For some reason it just would not work in the custom.css. Now is there a way I can create more lines so I can stack the address? Thank you all very much for the help.

    For some reason it just would not work in the custom.css.

    Custom CSS is not a file, it is a panel in Customiz’it that allows you to enter CSS without a stylesheet in a child theme. It’s not an issue for you now, as you’ve created a child theme, but I thought I’d explain for others.

    As to your problem:

    The method above is a quick and easy fix for a second line. It will not work with more than two lines.

    The solution for a multi-line address in the tagline would be to add the following code to a functions.php file in your child theme’s folder.

    // Use filter 'tc_tagline_text' to add extra lines to the tagline (not very advisable, as google is expecting a tagline)
    add_filter( 'tc_tagline_text ', 'my_tagline_text' );
    function my_tagline_text($html) {
        $my2ndLine = '<br /> This is my 2nd line';
        $my3rdLine = '<br /> This is my 3rd line';
        $my4thLine = '<br /> This is my 4th line';
        $html = $html . $my2ndLine . $my3rdLine . $my4thLine;
        return $html;
    }

    Note that this is a bit of a mis-use of the tagline. Search engines will be expecting a pithy phrase that describes who you are / what you do in that “slot”, not an address.

    If you haven’t created a functions.php in your child theme yet, then read How to customize the Customizr WordPress theme? first. You should not edit the theme’s own functions.php.

    Apologies: I just spotted extraneous blanks in there that aren’t needed. The code should be:

    // Use filter 'tc_tagline_text' to add extra lines to the tagline (not very advisable, as google is expecting a tagline)
    add_filter( 'tc_tagline_text ', 'my_tagline_text' );
    function my_tagline_text($html) {
        $my2ndLine = '<br />This is my 2nd line';
        $my3rdLine = '<br />This is my 3rd line';
        $my4thLine = '<br />This is my 4th line';
        $html = $html . $my2ndLine . $my3rdLine . $my4thLine;
        return $html;
    }

    I just published a snippet of this, which is and even shorter version.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘would like to add my in address in header’ is closed to new replies.