Need-4-Steve
Need-4-Steve

Reputation: 77

How to output a WordPress widget to have the title show up below the content, rather than above?

When a widget is output by WordPress typically it goes something like:

<widget_area_wrapper>
    <title></title>
    <content></content>
</widget_area_wrapper>

but how could I do it so that it shows up like this:

<widget_area_wrapper>
    <content></content>
    <title></title>
</widget_area_wrapper>

Thank you for your help in advance!

Upvotes: 0

Views: 50

Answers (1)

Alyssa
Alyssa

Reputation: 36

There's a couple ways to go about this:

  1. the "hard" coded way: Using the "Custom HTML" widget, you could leave the title blank, add your content (format it with HTML), then add the title after the content like so:
<p>
    <!--your content here -->
</p>
<h3 id="titleIDhere" class="orTitleClassHere">
    <!--your title here -->
</h3>
  1. the "programatic" way: Use birgire's solution to this question: https://wordpress.stackexchange.com/questions/136284/insert-custom-content-before-widget-title-after-widget-opening-tag

Upvotes: 1

Related Questions