WordPress.org

Forums

Customizr
would like to add my in address in header (15 posts)

  1. neilh2012
    Member
    Posted 1 year ago #

    looking for code to add my address below my phone# in header.

    http://www.hegartyslandscaping.com

    Thank you

  2. rdellconsulting
    Member
    Posted 1 year ago #

    Try a snippet

  3. ElectricFeet
    Member
    Posted 1 year ago #

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

  4. neilh2012
    Member
    Posted 1 year ago #

    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.

  5. ElectricFeet
    Member
    Posted 1 year ago #

    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.

  6. neilh2012
    Member
    Posted 1 year ago #

    I tried this and its not working?

  7. d4z_c0nf
    Member
    Posted 1 year ago #

    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 */
    }
  8. neilh2012
    Member
    Posted 1 year ago #

    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

  9. d4z_c0nf
    Member
    Posted 1 year ago #

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

  10. neilh2012
    Member
    Posted 1 year ago #

    I tried the quotes and still nothing.

  11. rdellconsulting
    Member
    Posted 1 year ago #

    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?

  12. neilh2012
    Member
    Posted 1 year ago #

    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.

  13. ElectricFeet
    Member
    Posted 1 year ago #

    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.

  14. ElectricFeet
    Member
    Posted 1 year ago #

    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;
    }
  15. ElectricFeet
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.