I'm trying to slightly modify the default WordPress tag cloud widget. I don't want to create my own widget because I literally want to adjust one small thing. I've looked through my WordPress installation but can't find the PHP file that contains the basic widgets.
Even though I assume that they are defined in each theme, I still looked in the core directories but came up empty handed.
So if any of you happen to have already figured this out, please make my life easier and let me know where I can find the default widgets...most importantly the tag cloud widget.
Thanks
You can find your widget area by going to Appearance » Widgets in your WordPress admin dashboard. Here you'll see a list of your available widget areas. In the example below using the Astra theme, there are multiple areas you can add widgets, including the sidebar, header, and footer.
What Are WordPress Widgets? A WordPress widget is a modular element that enables you to add a specific feature to your website. Widgets can be added to different areas of a website, such as a website's sidebars or footer areas, and they're an inherent part of WordPress' design and layout customizations.
Using WordPress Custom WidgetGo to the Appearance menu, and select Widgets. You should see a widget named Hostinger Sample Widget in the Available Widgets list. Next, drag the widget and drop it in the Sidebar section on the right side of the page. Save your changes and visit your website.
Those are located in the default widget class:
/wp-includes/default-widgets.php
For more detail: http://phpdoc.wordpress.org/trunk/WordPress/Widgets/WP_Widget_Tag_Cloud.html
The widget invokes a function deeper though that generates the actual output. You'll want to take a look at the wp_tag_cloud
and wp_generate_tag_cloud
functions in:
/wp-includes/category-template.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With