Tag Info

Hot answers tagged

1

If the widget is part of the wordpress core, you can see its source in wp-includes/default-widgets.php. If it came with a theme or plugin, you can find the code there. Sometimes widgets will be in an obviously-named widgets.php, but other times you'll have to hunt for them. At some point, each widget has to be registered by calling register_widget. You can ...


1

You are getting this error because your class ass no method named widget which is a must to properly use the widgets api. Meaning that each class/widget that extends the WP_Widget class must have a method named widget which is responsible for the actual widget display. So consider this structure as a widget class skeleton: class custom_Widget extends ...


1

You can do this by modifying your theme's CSS, which you can get to at Appearance > Editor in the Dashboard. You will need to style the widget list element by dropping this in your theme's style.css .widget.latest-tweets .widget-wrap ul { list-style: none; list-style-image: url(http://your-image-url-here); } Edit: Updated code to relevant to ...


1

You say that you are... ... wanting to add a random reason (quote) as to why they should join which will change after every reload of the page And you seem to trying to do this by placing Javascript in a text widget. I assume that is what you mean by the '"text" in the site'. Based on that description, you don't need Javascript. You need a new ...


1

Register/enqueue an admin stylesheet function my_admin_theme_style() { wp_enqueue_style('my-admin-theme', get_template_directory_uri().'/admin-style.css'); } add_action('admin_enqueue_scripts', 'my_admin_theme_style'); Then add rules of the form #widget-list div[id*="_archives-"], div[id*="_archives-"] { background:red; } Consider that proof of ...


1

You have to make sure that all of your parameters are passed all the way through to the WP_Widget class. Your code is very truncated but I am pretty sure that is what you are doing wrong. The widget code below works-- it doesn't do much of anything, but it works. See if you can use it as a template to sort out your own code. class Foo extends WP_Widget ...


1

I question the wisdom of extending a class from another plugin. You have no idea what will happen next time that other plugin gets updated. However, generally speaking you can control when in a hook "queue" a function runs by passing a third parameter-- a priority. So pass a priority high enough and your function should run after the other plugin's ...



Only top voted, non community-wiki answers of a minimum length are eligible