How to create Widget in Wordpress ?
Автор: NO STACK TO FULL STACK
Загружено: 2017-06-27
Просмотров: 1012
Описание:
How to create a Custom widget in Wordpress ?
如何在Wordpress中创建自定义窗口小部件?
Cómo crear un widget personalizado en Wordpress?
Как создать пользовательский виджет в Wordpress?
Hoe maak je een aangepaste widget in Wordpress?
Wie man ein benutzerdefiniertes Widget in Wordpress erstellt?
To creating a widget is very easy and entertaining task in wordpress.
We will create a simple widget which will show the latest news and offer on the website.
To create a widget please follow the below steps.
1) Create a plugin directory under the wp-content = plugins folder.
for example I'm using best_offer as a directory and create a file name with
the directory bestOffer.php and enter the plugin details.
make sure class name and file name should be same as per the standard.
this class will extend the class Wp_widget.
2) Define Widget Name.
3) Now add a simple text area as a form in the widget. It will display the
widget form to the admin in backed.
4) Now we will create a form inside our widget, it will show on text area.
5) Now as per the standard we will write an update function which will update our
widget. As we have only one field in the widget form as title so we are updating
only one, you can add multiple form fields and update accordingly.
6) Now at the end we have to register our widget.
Now first goto the dashboard area and click on the plugins and activate our
created one.
Now visit to widgets, you will see our created widget in list.
now drag the plugin to sidebar and add some text after save visit your website
you will see the added text there.
Now update and see the changes.
we are done here! :)
Thanks! for watching please like and subscribe. :)
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: