• Home
  • Basics
  • DSA
  • MAD
  • Concept
  • Practice
  • Misc
  • Tips
  • QA’s
  • Home
  • Basics
  • DSA
  • MAD
  • Concept
  • Practice
  • Misc
  • Tips
  • QA’s
  • #News
  • #APPS
  • #Events
    • #WWDC
    • #I/O
    • #Ignite
  • #Let’s Talk
  • #Interview
  • #Tips

MyCodeTips mycodetips-newlogocopy1

  • Home
  • Basics
  • DSA
  • MAD
  • Concept
  • Practice
  • Misc
  • Tips
  • QA’s
Tips&Tricks, Web

How to apply style to wordpress widgets !

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>
Adding Code to the Text Widget
Basic HTML, embeds, and JavaScript are added easily to the WordPress Text Widget. Most embed codes from social sharing sites for multimedia will work in a WordPress Text Widget. However, active code and programming languages such as PHP will not work as the Widget will strip out code it cannot display.

To add active code to the Text Widget, use one of the many WordPress Plugins from the WordPress Plugin Directory that override WordPress restrictions on using PHP in posts. Check that they will work on Widgets as some will not.

Liked it? Take a second to support Ranjan on Patreon!
Become a patron at Patreon!
  • Click to share on Reddit (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • More
  • Click to share on Pocket (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
Written by Ranjan - 2107 Views
Tags | Web, Wordpress
AUTHOR
Ranjan

Namaste, My name is Ranjan, I am a graduate from NIT Rourkela. This website is basically about of what i learnt from my years of experience as a software engineer on software development specifically on mobile application development, design patterns/architectures, its changing scenarios, security, troubleshooting, tools, tips&tricks and many more.

You Might Also Like

mycodetips-newlogo2

There are three distinct approaches to iOS development

October 18, 2013
mycodetips-wordpress-com-org

Self Hosted or WordPress.com Which is Better for Blogging

June 13, 2020
mycodetips tricks

Tips to Shorten your URL

December 11, 2013
Next Post
Previous Post

Support us

Subscribe for updates

Join 8,220 other subscribers

Latest Posts

  • YT-Featured-Templates--lld
    What Business Problems Solves in Low Level Design (LLD)
  • SRP-SingleResopnsibility
    SRP : Single Responsibility Principle in Swift and Objective-C
  • Designing Mobile APPS
    Limitation and restriction of designing mobile apps
  • YT-Featured-solidprinciples
    SOLID Principles of Software Design
  • IOS 16 Features
    Latest features in IOS 16
whiteboard

Whiteboard(PRO)

whiteboard

Whiteboard(lite)

alphabets

Kids Alphabet

do2day

Do2Day

  • #about
  • #myapps
  • #contact
  • #privacy
  • #Advertise
  • #myQuestions

.Net Android Blogging Cloud Concept Database DSA ERROR ExcelTips Flutter Interview IOS IOSQuestions JAVA Javascript MAC-OS No-Mouse Objective-c Programming Quick Tips SEO Software Design & Architecture Swift SwiftUI Tips&Tricks Tools Troubleshoot Videos Web Wordpress Xamarin XCode

  • What Business Problems Solves in Low Level Design (LLD)
  • SRP : Single Responsibility Principle in Swift and Objective-C
  • Limitation and restriction of designing mobile apps
  • SOLID Principles of Software Design
  • Latest features in IOS 16
MyCodeTips

©mycodetips.com