Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

[SOLVED] How to create a new widget


  #1  
Old Jan 9, 2010, 11:36 AM
bigliettaio's Avatar
bigliettaio
 
128 posts · Nov 2009
Italy
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
  #2  
Old Jan 9, 2010, 11:44 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
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.
  #3  
Old Jan 9, 2010, 01:21 PM
bigliettaio's Avatar
bigliettaio
 
128 posts · Nov 2009
Italy
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
  #4  
Old Jan 10, 2010, 06:25 AM
juggledad's Avatar
juggledad
 
23,597 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Jan 10, 2010, 07:43 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
The theme options let you style the way the widget looks, like the font, size, color, etc.
  #6  
Old Jan 12, 2010, 05:14 PM
bigliettaio's Avatar
bigliettaio
 
128 posts · Nov 2009
Italy
Quote:
Originally Posted by juggledad
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.
Maybe i do not explain myself in a right way.
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?

Last edited by bigliettaio; Jan 13, 2010 at 06:12 AM.
  #7  
Old Jan 12, 2010, 06:14 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
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.
  #8  
Old Jan 19, 2010, 07:13 AM
bigliettaio's Avatar
bigliettaio
 
128 posts · Nov 2009
Italy
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 {
        list-style-type:none;
        display:block;
        width:auto;
        margin-bottom:2px;
        }

div.textwidget a {        
        color:#666666;
        font-weight:normal;
        border-left:7px solid #3EAFAF;
        text-decoration:none;
        padding:0 0 0 5px;
        display:block;
        }

div.textwidget a:hover {
        color:#000;
        font-weight:normal;
        border-left:7px solid #4B61D1;            
        display:block;
}
2)nd inserting a class in php code using in textwidget?

<?php wp_cat_posts(); ?>

plugins used :
-Category post widget &
-PHP Exec

Thnx

Last edited by bigliettaio; Jan 19, 2010 at 07:26 AM.
  #9  
Old Jan 19, 2010, 07:26 AM
juggledad's Avatar
juggledad
 
23,597 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #10  
Old Jan 19, 2010, 09:07 AM
bigliettaio's Avatar
bigliettaio
 
128 posts · Nov 2009
Italy
Optimum JD.
I just try it an it run
now i' m going to add this for every textwidget category post!

Many thankx

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to create new widget area paulae Sidebars & Widgets 6 Sep 14, 2009 09:32 AM
How do I create a new page template? JakeThePeg Page & Category Menu Bars 10 Sep 7, 2009 11:33 AM
Is it possible to create different page templates? Cornboy Atahualpa 3 Wordpress theme 4 Aug 22, 2009 12:37 AM
[SOLVED] How to create the poll? ldsmedia Plugins & Atahualpa 5 Aug 12, 2009 09:14 AM
Create a Page Dropdown Menu on Sidebar via Text Widget mbro Page & Category Menu Bars 1 Jul 15, 2009 07:11 AM


All times are GMT -6. The time now is 06:41 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.