• Hello,

    On my home page (URL below) I have 3 featured page widgets running and it is pulling in content from each of those pages as well as their associated <h2> tags. How do I prevent those <h2> tags from getting pulled in? All I want is just the content from those pages.

    https://v1.smbizmarketing.com

    Thank you

    Ben

Viewing 9 replies - 1 through 9 (of 9 total)
  • You would have to change it in the template code. Probably in the loop.php or the index.php files. You would have to find and remove the php calling the titles enclosed in the <h2> tag.

    It’s usually something like <?php get_the_title(); ?>

    You must be careful to only remove it from your homepage and not from every page using the <h2> tag.

    If you don’t want to create a custom widget/secondary Loop, you could simply hide the post titles in the widgets using:

    #home-middle h2 {display:none;}

    Okay, so I get the #home-middle part… and I understand {display:none;}… but how do you know how to combine the #home-middle and the h2?

    Can you use any id, and add to it the <p> or the <a> or the <h2>? And it just makes it applicable to the div using that id?

    Do you just need to separate it with a space?

    but how do you know how to combine the #home-middle and the h2?

    Via Firebug. ?? That particular theme has some good id & class hooks.

    I LOOOOOVE firebug. Been using it for years.

    I see all the time in forums how people single out an id and a property. I just can’t wrap my head around how you combine them. When I look at CSS files through firebug, I often see lots of comma’s and dot’s, which I know are combining things. I suppose I need to go get an advanced book on CSS…

    Thanks esmi.

    Try reading up on CSS selectors. They’re where the real power of CSS comes into play.

    Perfect!! See, I’ve never heard of those ??

    I knew they called you “Diva” for a good reason. Thank you!

    No probs. https://www.w3.org/TR/CSS2/selector.html is a good place to start. After a while, all you need is that table at the top of the document as a reminder.

    I love it. Also found this one while awaiting your response (which I knew you wouldn’t be able to resist pointing me in the right direction).

    https://css.maxdesign.com.au/selectutorial/

    Both have been bookmarked ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove h2 tag from featured post widget’ is closed to new replies.