he Text Widget is one of the most commonly used WordPress Widgets
that comes with every WordPress installation. It allows users to add
text, video, images, custom lists, and more to their WordPress sites.
To use the WordPress Text Widget:
To specifically style the various default styles of the WordPress Text Widget, use the following example:
To use the WordPress Text Widget:
- Go to Themes > Widgets in the WordPress Administration Panels.
- Open the sidebar, footer, or Theme section to which you wish to add the Text Widget.
- Find the Text Widget in the list of Widgets.
- Click and drag the Widget to the spot you wish it to appear.
- Click the down arrow to the right of the Text Widget title.
- Set the Text Widget Title (optional).
- Add the text or HTML code to the box or edit what is currently there.
- Choose the option to Automatically add paragraphs to wrap each block of text in an HTML paragraph tag (recommended for text).
- Click Save to save the Text Widget.
- Click Close to close the Text Widget.
- Switch tabs in your browser and preview the results and make changes if necessary.
Styling the Text Widget
Standard image alignment CSS styles such as alignleft, alignright, and aligncenter apply for images.To specifically style the various default styles of the WordPress Text Widget, use the following example:
<div id="primary" class="sidebar"> <ul> <li id="text-1" class="widget widget_text"><h3 class="widgettitle">Widget Title for First Text Widget</h3> <div class="textwidget">Text within the text widget area.</div> </li> <li id="text-2" class="widget widget_text"><h3 class="widgettitle">Widget Title for Second Text Widget</h3> <div class="textwidget"><p>Text for second widget text area.</p></div> </li> </ul> </div>

0 comments:
Post a Comment