विवरण
AMP Sidebar Chooser allows users to associate sidebars to posts, pages, or any custom post type through the WordPress post editor.
स्थापना
- Upload the ‘amp_sidebar_chooser’ folder to your
/wp-content/plugins/
directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Replace
<?php get_sidebar(); ?>
with<?php amp_get_sidebar(); ?>
in your templates - Log into the WordPress admin area, and select a post, page, or custom post type to edit.
- Choose from one of the available sidebars in the AMP Sidebar Chooser meta box to assign a sidebar to this post.
प्रश्नोत्तर
- Why does this plugin use an arbitrary tag rather than hooking into the existing function `get_sidebar()` ?
-
At this time, no filters exist that can manipulate the native function
get_sidebar()
sufficiently. Rather than offer a compromised solution withget_sidebar()
, we’ve opted to create an arbitrary function (amp_get_sidebar()
) until better manipulation of the native function is possible. - Where does the list of available sidebars in the post editor meta box come from?
-
The plugin browses your active theme file to get a list of all available sidebar files that exist. Sidebars must be named with the common convention “sidebar-(sidebarname).php”. The display name that shows up in the sidebar chooser is the parsed filename — ie, sidebar-right.php becomes “Right”.
- What happens if a sidebar is not defined for a particular post? In other words, what is the default functionality?
-
At this time, if not sidebar is selected for each post, the option “(None)” is selected, and no sidebar will be shown. We are working on a global setting for the next release that will allow you to choose what you want the default sidebar to be.
समीक्षाहरू
यस प्लगिनको लागि कुनै समीक्षाहरू छैनन्।
योगदानकर्ता र डेभलपरहरू
“AMP Sidebar Chooser” खुला स्रोत सफ्टवेयर हो। निम्न व्यक्तिहरूले यो प्लगिनमा योगदान गरेका छन्।
योगदानकर्ताहरू“AMP Sidebar Chooser” लाई आफ्नो भाषामा अनुवाद गर्नुहोस्
विकासमा रुचि छ?
आरएसएस द्वारा कोड ब्राउज गर्नुहोस्, एसभीएन रिपजिटरी हेर्नुहोस्, वा विकास लग को सदस्यता लिनुहोस्।
चेन्जलग
0.1
- First version of AMP Sidebar Chooser released
- Custom post type support added
- Support for Default and (None) sidebars added
0.2
- Bad notation fixed in functions/functions.php