I want to change the html tag for my blog post from a H3 to a H2 tag

I want to change the html tag for my blog post from a H3 to a H2 tag.

The post headings are on this page


It should also change the post headings to h2 on the individual post pages.

thanks for your help

  • Titanium Creative
    • Finder of Elusive Bugs

    As Alexander said, CSS is the way to go if you just want to change the size/look

    If you are determined that they need to be h2 you may have a few options.

    1) If you know the function that creates the post headers you may be able to do something like:

    add_filter('old_post_header', 'my_post_header);
    function my_post_header()

    This may or may not work depending upon theme support for filter hooks.

    Its also possible you could do something like:

    function new_post_header() { ETC... }

    2) Create a new template. A bit like wielding a sledgehammer to an ant but it may be the easiest thing to do.

    3) Load a small java script that will swap $(‘article h3’:wink: and change it to h2

    I prefer to leave most of the heavy lifting to WP, the framework and the theme adn make the smallest change that will achieve my goals. filter and action hooks were made for this but not all themes provide proper support.

    Hope this helps.

  • VivaArturo
    • The Incredible Code Injector

    @alexander Rohmann

    @Titanium Creative

    Thanks for the replies

    I am happy to use CSS but I need to style the header differently on this page from all other page headers . http://goo.gl/XANSqn

    As all page headers have the H1 tag I cannot see the class or ID to use to only style this page header differently to the rest of the sites page headers. As you can see I have a H1 style set.

    How then can I just change the H1 css or the header on this page only http://goo.gl/XANSqn


  • Titanium Creative
    • Finder of Elusive Bugs

    If you want to style the h1 header on just this page use

    .postid-25 #post-25 h1.post-header { font-size:?? }

    Not sure you need to be that specific but that should get you there. If you need to you can always add !important to it.

    I got this from the structural classes:

    body class=”postid-25″

    article id=”post-25″

    h1 class=”post-header

    The active rule is styled on h1

    Hope that helps.

  • Titanium Creative
    • Finder of Elusive Bugs

    Which ones? I thought is was just that one header. The CSS I gave you targets that h1 header and no other one on the site.

    By changing the class and ID targets we can hit pretty much whatever we want.

    Just went back to your site. The headline is in a different place now. It looks like you are hitting the post titles. If it is just on this page you could use

    .page-id-123 article .post-title { to hit the a tag }
    .page-id-123 article .post-header { to hit the containing div }

    Is that what you mean? Let me know.

  • Titanium Creative
    • Finder of Elusive Bugs

    Oh. And for the individual post pages, you might want to assign a specific category or tag to each post. that will cause that class to be assigned wither to the post or page.

    So a post with the category or tag ‘widget’

    might have <div id=”post-header” class=” post-header widget parent has-child”>

    You could then target

    #post-header .widget

    Or something along those lines. Add a tag to one and you will see what I mean.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.