In this WordPress tutorial, you’ll learn how to create the Tabber widget, which is very useful for when multiple widgets need to fit in a sidebar. It saves space and streamlines the appearance and functionality of your WordPress-powered website.
In the past, there were different methods of doing this, most of which were theme-dependent. As we’ll see in this tutorial, creating a tabbed widget that works on its own and with any theme is easily accomplished. So, let’s jump in and learn how to create our own Tabber widget, which we’ve made available for downloading at the end of this article.
Saving Sidebar Space
The main advantage of tabs is that you can fit more widgets into the sidebar. And tabs look good. The image below shows how much vertical space is taken up by three standard widgets (using the default Twenty Ten theme). The default layout is on the left, and our tabber widget is on the right:
Before We Start
A few things are useful to know. Because we are building a widget in this article, you might want to learn about WordPress’ Widgets API and how to create a basic widget:
- “Widgets API,” WordPress Codex
- “Creating Widgets for WordPress 2.8,” Tim Trott, Azulia Designs
- “Advanced WordPress Widgets,” WP Roots
Use these resources as needed while following the tutorial along.
The Basic Idea
The idea for this widget is simple: select a sidebar, and the Tabber widget will grab all of its widgets and display them as tabs. In the widget’s interface, you can select a sidebar, specify an extra CSS class and optionally apply your own styles. When enabled, the plugin will register an extra sidebar (which may be removed if you have other ways to add a sidebar). Then, using the same code, you can add more sidebars, and each of them can hold instances of the Tabber widget.
To control your widgets, Tabber uses idTabs for jQuery, created by Sean Catchpole, but you could always use another solution. Note that additional CSS is loaded to style the resulting widget.
So, the goal with Tabber is to transform any widget’s output into markup that can be used to display tabs
tags for this. Other themes may use complicated markup that can’t be predicted or successfully transformed into the output needed for tabs.
action. We register the widget on line 17.
The Main Tabber Widget Class
Tabber is a normal widget, and in this case it is located
SETTINGS: PLUGIN INTERFACE
The widget has two settings:
to hold the ID of the selected sidebar
for extra CSS classes to style the Tabber widget
When selecting which sidebar to use, you must avoid using the sidebar that holds the Tabber widget. Otherwise, it will spin into endless recursion. To avoid this, before rendering the widget’s content, check whether the selected sidebar is the same as the parent sidebar. This can’t be prevented while the widget is set up, because the widget’s panel affords very little control over this.
Also, using sidebars that are not normally used is a good idea. To help with this, the plugin includes sample code to help you add an extra sidebar.
This function requires the name of the sidebar, and it will display all widgets in it. Line 9 contains the check mentioned before, to prevent recursion when displaying sidebar content if the selected sidebar is the same as the parent sidebar.
Lastly, the filter is removed, and any widgets belonging to other sidebars are displayed normally, without modification.
tag for the control tabs. After this filter, the widget’s output will look like this:
Once the widget’s presentation is modified, one thing remains: to complete the transformation and get the titles from the widgets and turn them into tabs:This code uses jQuery to get all of the Tabber widgets based on the
- will hold only its content.
Finally, when all this is done, we enable idTabs to activate the tabs control. And with the default styling loaded from the
How To Install The Tabber Plugin
As with any other plugin, unpack it, upload it to WordPress’ plugins folder, and activate it from the plugins panel. When you go to the “Widgets” panel, you will see an additional sidebar, “Tabber Example Sidebar,” at the end on the right. And “Available Widgets” will show one more widget, “D4P Smashing Tabber.”
Add this new widget to the “Main Sidebar.” From the “Sidebar” widget drop-down menu, select “Tabber Example Sidebar,” and save the widget. Now, open the “Tabber Example Sidebar” and add the widgets you want to be displayed as tabs. You can add as many widgets as you want, but pay attention because if you add too many, the tab’s control will break to two or more lines, and it will not look pretty. Starting with two or three widgets is best.
I prefer using a jQuery-based solution, and idTabs is very easy to use and easy to style and it works in all browsers. Check out other solutions, and see what extra features they offer to enhance your own tabbed widgets.
from : http://www.smashingmagazine.com/2014/08/27/a-tour-of-wordpress-4-0/
[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]
this is tags and keywords : wordpress themes momizat Tutorial wordpress templates
‘Black Panther’ smashes box office records with $218m
Disney-Marvel’s “Black Panther” is heading for a super-heroic $218 million debut over the four-day President’s Day weekend at 4,020 North American locations, estimates showed Sunday.
That number means that “Black Panther,” starring Chadwick Boseman and directed by Ryan Coogler, has doubled its original tracking in less than a month.
The film, which carries an estimated $200 million production cost, had been tracking to bring in between an impressive $100 and $120 million when first estimates emerged on Jan. 25.
Since then, “Black Panther” has become a must-see movie for many moviegoers, underlined when Thursday previews brought in $25.2 million, the largest Thursday night preview gross for a February opener and the second-largest preview gross for a Marvel film.
The film’s estimated three-day gross of $192 million is the highest debut ever for a February film and the fifth highest of all time.
Combined with an estimated international debut of $169 million from 69 percent of the international market, the estimated global debut stands at $361 million through Sunday.
“Black Panther” has demolished the record for the largest Presidents Day weekend, blowing past “Deadpool‘s” 2016 mark of $152 million.
Overall North American movie going for the four-day period should hit $300 million — far above the $278 million mark in 2016, according to comScore.
”This is proof that the big screen experience may arguably be the most powerful platform of change in our society,“ said Paul Dergarabedian,”senior media analyst with comScore.
“The emotional, communal, immersive and bigger than life theatrical experience has an impact that virtually no other medium can match.”
Comscore’s PostTrak survey of the audience showed outstanding numbers with 77 percent rating “Black Panther” as “excellent” and another 18 percent as “very good.”
Boseman portrays King T‘Challa, ruler of Wakanda, a technologically advanced society, who conflicts with Michael B. Jordan’s Eric Killmonger, who intends to take over the throne.
Letitia Wright, Lupita Nyong‘o, Angela Bassett, Danai Gurira, and Daniel Kaluuya also star. It’s received an A+ CinemaScore, the only Marvel film to have done so besides 2012’s “The Avengers.” (NAN/Reuters)
Man divorces wife for sex doll
A 39-year-old man from Botswana known as Paellas Mohule, has divorced his legal wife for a sex doll he recently bought from the United States.
According to him, women were just after his money and usually had diseases which made him prefer a doll.
Mohule who is a car dealer in Gaborone, Botswana, bought a doll worth $2,600.00(N935,251.80) from the United States.
A Ugblizz stated that Mohule claimed that women have failed to satisfy him in bed. So after sleeping with it, he divorced the mother of four children claiming she was no match to the doll when it comes to bedroom matters.
However, he pledged to support his former wife and children provided she allowed him time to enjoy the doll in peace.
My wedding bands are big enough to scare men –dakore
Actress Dakore Akande, nee Egbuson’s career lull is over and the elegant thespian is back on the grind with a fresh spark. Her career hiatus was occasioned by her marriage to Olumide, son of billionaire businessman, Harry Akande. She speaks with LANRE ODUKOYA about her grand return to acting, family, among sundry issues.
You seem to like tea so much…
Oh, yes! I drink green tea every day. It’s like the best. It cleanses your system and it’s an antioxidant. I’m a tea drinker, I love it more than coffee. I do herbal tea sometimes like peppermint for digestion. I exercise and I do a lot of health stuffs and I take multivitamin supplements. I want to stay young in physique and at heart.
Little wonder you still look this trim and young…
Yes, that was the plan. I never wanted to look somebody’s mother yet.
And it doesn’t bother you when much younger guys just make passes at you?
‘Them no dey toast me o. Them dey mad?’ They know this is not a girl. There is a way you’d see a woman that’s slim, trim, fair and fine but you’d also realise this woman isn’t my mate. They know so they don’t come near me. Yes, we would say ‘hi’ from a distance and that’s as far as it would go.
What about the older men?
They’re not that bold. They know I’m married. Look at these rings (she thrust forward her finger) and you’d know they’re big enough. There’s no way you’d just want to do that. After seeing the rings there’s no way you wouldn’t lose the courage even if you’d gathered it before. They just feel, ‘I can’t compete with that’ which is great. Kudos to Mr. Akande!
You wore dreadlocks for years and defined a personality you wanted to be identified with…
(Cuts in) I think from the time I started having dreadlocks people started noticing that this is somebody who is very conscious. When I found my consciousness, I just tried to read more, asked questions and interested in other faith and religion. I tried more to understand people better with their faith as well and it brought me to where I am right now. I want to continue to grow; I don’t want to ever stay stagnant with my faith in God and in humanity.
It was incredible to see you scrape your lovely dreadlocks…
I understand but I was bored. I carried it for 13 years and you know for a woman, we love to change our hair, we like to be adventurous and I coloured it, cut it short, grew it really long and did everything with it until there was nothing else to do and I just got bored. But I still have them. I keep them in a box, so sometimes I still look at them in the box.
Many people miss the frequency of your face on the movie jackets, was marriage responsible for that long hiatus?
Of course not! I’m a bit offended that this old question is still being asked even when I’m working and got nomination for Best Actress at AMAA for my role in the movie entitled ‘50’. You know progression is important. I can’t keep on doing things at the same level. I need to progress, so I must leave the field for the younger ones. I cannot be hustling now the way I used to hustle ten years ago. The upcoming ones should be given the space to do that. You hustle smart and not hard. I’ve moved from the Asaba movies, though it trained and made me. I’m doing more cinema works and you know that kind of work is not as regular and on the faces people as the other. I’ve also been very picky about my works and what I lend my name and energy to. It just can’t be like before when I was in all the films.
How did you get the role took in the movie, ‘50’?
I auditioned. I had a screen test.
Has there been any character you’d taken away from one movie set to another or even back home?
No, that’s part of why I don’t work all the time because I believe as an actor, you’re embodying another character. So, the same way it takes time to embody that character, it takes time to wean yourself of that character. And if you do works back to back, then you’d have a backlog of all these characters. And you’d start having psychological issues because if you take it seriously, the way I do, you’d need a break. After ‘50’ I didn’t work for almost six months and I’m glad to be in this position that I can afford to give myself that break because struggling actors don’t really have that option. Sometimes you play some really horrible characters and you want to really make sure you get it out of your system because it can really interfere.
When was the last time you did any film before ‘50’?
‘50’ was like my seventh film after the hiatus. I did ‘Journey to Self’ which was my first comeback film in 2012. Then I did ‘Unconditional’ with Uche Jombo and after that I did a short film called ‘Paired’ and it only showed online. So, I’ve been working steadily. I did ‘After the I Dos’ which was an MNET movie that came out as one of the Africa Magic original films. I went onset for ‘Hear Word’ afterwards. I started working on stage, I did that for two seasons. I was doing all that to hone my skill back. All those steps gave me a leap on my talent so that by the time ‘50’ came along, I was fully prepared. Mo Abudu is somebody I respect so much and somehow she always wants me in her project. It was actually Tope Oshin, the producer that called me for ‘50’. She just said, “Dakore, there’s this movie we’re doing but you have to read for it. Hope you don’t mind doing to read for it.” And said, what? Are you kidding me? I would read for anything. And the rest is history.
Have all these engagements interfere in motherhood for you?
Well, it really did. And at other time I was away from work because I didn’t want to be pregnant and be working at the same time. I was pregnant with my second child in ‘Unconditional’ and nobody knew. I was three months project, but after that, I said no more movies.
When are you returning into the labour room again?
For now, I’m fine with my two kids. It’s not easy.
What do you miss from your yesterday?
I miss waking up and just travelling anywhere I want to. I loved to travel so much. I could just wake up one morning and say, you know what? I’m bored and I’m going to London. So, I miss that because now I have to plan for my family. I must be certain everything is in place. Previously I could decide on the spot if I’m taking a script or not, but now I have to consider my kids. Is the movie is such that I’m comfortable with my children watching? I now have more filters. When I was younger I could take perhaps any role I like but now I must discern them because my kids are going to watch. I don’t want to embarrass my family with the roles I take. That’s not to say that I’ve always taken embarrassing roles because I’ve been very lucky. Even when I take controversial roles, I did with a lot of poise and class. It wasn’t tacky at all.
Your wedding anniversaries have been quiet and seem like you never celebrated
I just don’t want to be putting our stuffs out like that. Marriages nowadays, my mother always say, “cover your yam and how you’re eating it”. Like on his birthday, I just do maybe some posts on Instagram but we like to celebrate anniversaries in-house with the kids. We’ve been together for ten years but married for six years.
Does he do any chores?
Yes, he takes care of his kids. He’s not your typical African man.
Politics20 hours ago
APC convention: Oshiomhole’s endorsement foolish, childish – Oyegun
News10 hours ago
PHOTOS: Police prevent Senate delegation from visiting Dino Melaye in Hospital
Metro and Crime20 hours ago
Student to panel: Prof Akindele failed me because of sexual advances
Metro and Crime22 hours ago
Drycleaner, 75, remanded for defilement of two girls
Politics21 hours ago
APC chairmanship: Oshiomhole, not alternative to Oyegun – Airhiavbere
Politics21 hours ago
POLITRICKS: What’s Kanu Nwankwo up to in 2019?
Metro and Crime21 hours ago
Man arrested for making, selling guns to robbers
Politics16 hours ago
POLITRICKS: Bickering over Buhari’s integrity