Wordpress sidebar definition function: dynamic_sidebar ()

Source: Internet
Author: User
The dynamic_sidebar () function is used to support customization & ldquo; gadgets 1 & rdquo; Sidebar. you can customize Widget plug-ins, such as adding recent articles, archive articles, latest comments, and tag clouds to the sidebar, search box, category, and chain table. So how to use it? Add the following statement to the angle brackets of the topic functions. php file: regis

The dynamic_sidebar () function is used to support customizing the sidebar of "gadgets 1". you can customize the Widget plug-in. for example, you can add recent articles, archive articles, latest comments, tag clouds, search boxes, and categories to the sidebar, chain tables.

So how to use it?

Add the following statements in the brackets of the topic functions. php file:

Register_sidebar (array (
'Name' => 'Gadgets 1 ',
'Before _ components' => '',
'After _ components' => '',
'Before _ title' => '',
'After _ title' =>''
));

It means to register a sidebar named gadgets 1 and display it in the "widget-sidebar" label. the style of the title is h3. The call method is as follows:



Title


  • Article title

  • Article title

  • Article title


You can adjust the side pane of the gadgets in the background.

In this way, you can set "tool 1" in the background gadgets to add or remove the widget plug-in content. If you do not set the content, the content you edited will be displayed, and the content you edited will be overwritten.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.