WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Span tags in the Site Title and Site Description (13 posts)

  1. soberbobo
    Member
    Posted 9 months ago #

    So what I want to accomplish is to make the first part of the Site Title larger font-size then the second half. i.e 3em for "Wordpess Site" and 2em for "by Robert Langley". For the Site Description I want to break up a quote so its on two lines.....BUT I want to adjust the left margin just for the second line of the quote. Is any of this possible? I am not familiar with PHP so if it is a PHP solution(I imagine it is) I will need really simple "For Dummies" solutions. When I have added "span" tags to these two items in the theme customize section the "span" tags show up as text in the title and description.

  2. graphical_force
    Member
    Posted 9 months ago #

    You can accomplish this using css if you are familiar with it.

  3. soberbobo
    Member
    Posted 9 months ago #

    Without being able to add the span tags though how would I accomplish this? I feel am very competent with CSS not an expert but very familiar and comfortable. I am not sure how to target the specific words or letters without having the span tags in there.

  4. graphical_force
    Member
    Posted 9 months ago #

    So if you understand how css works, then you understand classes, id's and so on. WordPress uses php but most of what you will be looking at looks like html so it should be easy for you to understand. Here is a link that shows you how a Wp theme is designed and laid out.
    http://codex.wordpress.org/Site_Design_and_Layout

  5. soberbobo
    Member
    Posted 9 months ago #

    I know how to add a span with a class and customize it but WordPress will not allow me to add a "span" tag to the Site Title or Site Description. Rather then rendering it as html it displays the text. i.e "<span class="class">Site Title</span>By Robert" <---------displays like this on the live website, as opposed to rendering it as HTML.

  6. graphical_force
    Member
    Posted 9 months ago #

    More than likely it will be in the header.php file and you should be able to see the html in there along with the php to do what you need to do. But you really should make a child theme and keep your edits there so you don't lose them on an upgrade.

    http://codex.wordpress.org/Child_Themes

  7. soberbobo
    Member
    Posted 9 months ago #

    So this may need to be moved to another category, but, I have a child theme. When I set up my child theme it only creates CSS files. How do I get PHP into my child theme?

  8. graphical_force
    Member
    Posted 9 months ago #

    Copy the header.php file (or what ever file) from your parent theme into your child theme then edit the copy that is in the child theme. It will override the parent theme.

  9. soberbobo
    Member
    Posted 9 months ago #

    Using an FTP just copy it into the child theme folder?

  10. graphical_force
    Member
    Posted 9 months ago #

    Sure.

  11. soberbobo
    Member
    Posted 9 months ago #

    Ok thanks, I'm going to copy this message to a Mantra Theme post. I dont see any solution in the header.php. I am using the Mantra theme so perhaps the Mantra forum will know where in the header.php I can resolve this. I greatly appreciate your help and your very timely responses.

  12. graphical_force
    Member
    Posted 9 months ago #

    Your welcome and good luck. :)

  13. photocurio
    Member
    Posted 5 months ago #

    Hm, I'm not sure graphical_force understood the OP's problem. By default, html tags in the site title field will be spelled out on your site. You don't really want span tags visible on your front page, but that is what will happen.

    You can put spans in your site description (Tagline), and style it using CSS. This works, except that the wp_title() hook also puts the tagline into your page title (on the browser window) on the front page, and there again, the viewer will see that pesky html code.

    For these reasons, I wouldn't recommend putting any html into your site title or tagline.

Reply

You must log in to post.

About this Topic