WordPress.org

Support

Support » Themes and Templates » Format Issue

Format Issue

  • I would like to put <?php bloginfo(‘name’); ?> & <?php bloginfo(‘description’); ?> on the same line in my blog. What I am trying to do is have the name in <h1></h1> tag and the description in <h4></h4> tag. Could someone help?

Viewing 1 replies (of 1 total)
  • By default, an h1 and h4 tag should not ever work on the same line. In fact, if you want your site to be consistent with web standards, headings should following a progressive order of 1, 2, 3, 4, and by putting 1 then 4, you break this standard.

    But let’s see if this works, from what I assume you want to do.

    <h1>
    <?php bloginfo('name'); ?>
    <span class="smaller"><?php bloginfo('description'); ?></span>
    </h1>

    Style the H1 in your style.css and then add a style for .smaller or whatever you want to call it, and set it to be “smaller” than the h1 style:

    h1 {font-size: 150%; color: green;......}
    .smaller {font-size:110%; color: blue;.....}

    Filling in whatever you want the two to look like.

    They you can use your h4 heading within your post or wherever you want, or not at all and still stay compliant with web standards.

Viewing 1 replies (of 1 total)
  • The topic ‘Format Issue’ is closed to new replies.
Skip to toolbar