[Solved] Removing the default sidebar from admin panel

If you mean the default WordPress Widgets, you would add this to the functions.php file: <?php // unregister all default WP Widgets function unregister_default_wp_widgets() { unregister_widget(‘WP_Widget_Pages’); unregister_widget(‘WP_Widget_Calendar’); unregister_widget(‘WP_Widget_Archives’); unregister_widget(‘WP_Widget_Links’); unregister_widget(‘WP_Widget_Meta’); unregister_widget(‘WP_Widget_Search’); unregister_widget(‘WP_Widget_Text’); unregister_widget(‘WP_Widget_Categories’); unregister_widget(‘WP_Widget_Recent_Posts’); unregister_widget(‘WP_Widget_Recent_Comments’); unregister_widget(‘WP_Widget_RSS’); unregister_widget(‘WP_Widget_Tag_Cloud’); unregister_widget(‘WP_Nav_Menu_Widget’); } add_action(‘widgets_init’, ‘unregister_default_wp_widgets’, 1); ?> EDIT: register_sidebar(array(‘name’=>’sidebar2’, ‘before_widget’ => ‘<ul><li>’, ‘after_widget’ => “</li></ul>”, ‘before_title’ => ‘<h2 class=”widgettitle”>’, … Read more

[Solved] Page attribute template dropdown not displayed even the syntax is correct

If you’re wanting to enable the Page Template dropdown for a custom post type, you have to enable support for “page attributes” when you define your CPT. You should currently have something like register_post_type(‘foo’, array(‘labels’ => array( … ), ); You need to add ‘supports’: register_post_type(‘foo’, array(‘labels’ => array( … ), ‘supports’ => array(‘title’, ‘editor’, … Read more

[Solved] Separated Comment from Post

ahaaa 😀 it’s success, I use CSS. Here the screenshot the code i use on single.php : <!– post section –> <section class=”post-section all-round grid”> <div class=”content_wrapper”> <!– YOUR CONTENT –> </div> </section> <!– end .post-section –> <!– comment section –> <section class=”comment-section all-round grid”> <?php if ( comments_open() || get_comments_number() ) : ?> <?php … Read more

[Solved] Between functions.php (theme), widgets, and plugins, which is loaded first?

The plugins are loaded right before theme (yes, I’ve been looking for excuse to use this): However it is wrong to think about either as point of code execution. For most cases everything should be hooked and executed no earlier than init hook. According to Codex widget registration with register_widget() should be hooked to widget_init. … Read more

[Solved] Menu items description? Custom Walker for wp_nav_menu()

You need a custom walker for the nav menu. Basically, you add a parameter ‘walker’ to the wp_nav_menu() options and call an instance of an enhanced class: wp_nav_menu( array ( ‘menu’ => ‘main-menu’, ‘container’ => FALSE, ‘container_id’ => FALSE, ‘menu_class’ => ”, ‘menu_id’ => FALSE, ‘depth’ => 1, ‘walker’ => new Description_Walker ) ); The … Read more

[Solved] Where to put my code: plugin or functions.php?

I would start with this question: Is the functionality related to presentation of content, or with generation/management of content, or of the site, or of the user identity? If the functionality is not related specifically to presentation of content, then it is squarely within Plugin Territory. This list is long: Modifying core WP filters (wp_head … Read more