[SOLVED] How to create a new widget
Hi,
is it possible to create a NEW WIDGET not a NEW WIDGET AREA? What i want to mean is if i possible to create a widget who will appears listed on: Admin Panel>>Appareance>>Widget ? Thnx |
Some widgets are included with Wordpress. Some are included with Atahualpa. Others can be downloaded as plugins from wordpress.org in the Extend area. Some plugins create widgets when they are activated, to accomplish some task in a sidebar. Thousands of smart people are writing new widgets all the time.
You can also create your own widget using the Text widget, if you want to put some text or HTML in a sidebar. For instance, you might want to say, "This is my web site" in the sidebar. Just use the Text widget, type that text in it, and save it. Or put the HTML for an image there. You should read about widgets and plugins at wordpress.org. It's fun.:) |
Hi Paulee,
and thanks for your usual answers:-) i have already customize my sidebar adding Text and using some plugin to show Recent Posts of each category ONLY in post belonging to a specific category but i would like that my own widget appearing in the same way as Recent Post Widget. There's is a function in atahualpa to customize in a very easy manner my widget with ATO>>Style Widget & Sidebar>>Style widget settings? Cheers |
bigliettaio,
I think you are misunderstanding what you have done so there is a communications issue here. A widget is a piece of code that you write that performs some action, like...list the authors of the last 5 posts. Some widgets allow you to put more than one occurance of the widget in the sidebar, others do not. That is controled by the actual code of the widget (look at the PHP code of the plugin) Anything that is done in a widget - weither it is adding options to it or giving it a title, is entirely controled by the widget NOT THE THEME. This is why you can switch themes and still have the widgets in the sidebar running (with the exception of any widgets that are theme dependent) So the answer to your question is NO. Atahualpa has no options to control the plugins, that is done by the plugins themselves. |
The theme options let you style the way the widget looks, like the font, size, color, etc.
|
Quote:
What i want to do is customize my text widget [ who i talked about here] in a way that is the same setting for recent posts widgets SO to have the same layout for widgets actived who listed posts in my blog. That' is all. Do you suggested me to open a threat on wordpress forum of WP category post plug in? |
In that case, you could look at the CSS for that plugin's widget and use the theme's CSS inserts to style the new widget the same way.
|
So customizing of textwidgets for category posts only is done.
I customized this list code of listamatic using the div for Widget Content Box : div.textwidget as explained in ATO>>Sidebars & Widgets>>Style Widget and now Recent Posts Widgets and Category Posts Textwidget are shown in the same way BUT there is a problem: every text widgets using in my sidebar has a border. [here an example: the right sidebar of this post belonging to "Rugby" category has two text widgets: 1st a banner 2nd category posts lists as yuo can see also the banner has a left border] How can i do to specify that css that i wrote must be executes only to specified textwidget? 1) every text widget DIV has an id="text-decimalnumber" : <div id="text-11" class="widget widget_text"> <div class="widget-title"> <h3> XXX</h3> </div> -------- </div> </div> how to use this in my CSS list code? Code:
div.textwidget li { <?php wp_cat_posts(); ?> plugins used : -Category post widget & -PHP Exec Thnx |
CSS Selectors use ID's (#myid) or CLASS's (.myclass) the difference is that a CSS selector with a class will apply to all the elements with that class where an ID can only be used once - each ID is (suppose to be) unique.
So in this case you don't want to use 'div.textwidget' because that will effect all widgets with a class of 'textwidget'. You want to use 'div#text-11' since that only occure once, so these rules will only apply to that element. |
Optimum JD.
I just try it an it run :) now i' m going to add this for every textwidget category post! Many thankx |
All times are GMT -6. The time now is 10:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.