• Resolved zubair.am

    (@zubairam)


    Hi,

    On my blog I’ve close to 20 posts. I want to modify the <H3> tag that encapsulates headings inside my posts to add a class. For example, in my post I have a heading like <h3>My custom heading</h3>

    I want to change the post to add a class to the H3 like <h3 class=”H3Heading”>My custom heading</h3>

    I do not want to manually go and modify each and every post. What is the best way I can modify HTML of all the posts?

    Any plugin that can help me?

Viewing 4 replies - 1 through 4 (of 4 total)
  • allm

    (@realblueorange)

    You probably need to add something to your css like:

    .post h3 {
    and here whatever you like to change e.g.:
    font-size: 120%;
    }

    If this does not work check firebug in firefox to find out what the actual code is…

    Moderator bcworkz

    (@bcworkz)

    You could try this utility. It is intended for changing site references when moving sites, but it could meet your needs. Be sure you have a complete, functional backup of your DB before using this tool. Use at your own risk!

    If you can code PHP, writing a little script to step through all posts and modify the content one by one wouldn’t be too hard, but would require careful, limited testing before letting it loose on your entire DB.

    I would suggest google chrome, instpect that element on page and you will be able to see how and what makes the changes on that h3 tag.

    Thread Starter zubair.am

    (@zubairam)

    Thanks allm, bcworkz and internetmarketer.

    I just realized after I posted my question that the answer suggested by allm will do it.

    That is the easiest way of doing it without modifying any db content.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to modify HTML of posts’ is closed to new replies.