Modify the siderbar footer
Modify the siderbar footer
Modify the siderbar footer
Evidently this is not as much of a mystery as I first thought. Here’s 2 links. http://www.wpbeginner.com/plugins/how-to-add-wordpress-widgets-in-post-and-page-content/ http://wordpress.org/plugins/widgets-on-pages/
Note in the code you gave for sidebar-footer.php <?php if ( is_active_sidebar(‘sidebar-footer’) ) : ?> …is always going to return false since that no longer exists. Since this is a custom theme you can probably just comment out or remove that line and it’s endif pair since I trust you always want the markup to … Read more
How can I get the sidebar id on the current page?
register_sidebar() will not wrap an element properly
My Email Newsletter plugin will not configure when I try to import the widget
I will put a basic code to create new widget. In WordPress its call register_sidebar; In your code, you have not put ID. Id=>your-widget-id Put this code into your functions.php function my_widget(){ register_sidebar( array( ‘name’ => __( ‘Front Sidebar’, ‘yourtheme’ ), ‘id’ => ‘sidebar-1’, ‘description’ => __( ‘This is description’, ‘yourtheme’ ), ‘before_widget’ => ‘<aside>’, … Read more
on line 49 it seems you have hardcoded in the checkbox value it should actually look like this, it was always going to be true even if it did work as intended: <input id=”<?php echo $this->get_field_id(‘checkbox’); ?>” name=”<?php echo $this->get_field_name(‘checkbox’); ?>” type=”checkbox” value=”<?php echo $checkbox; ?>” <?php checked( ‘1’, $checkbox ); ?> /> also after … Read more
Solution used: // decide to show or hide the widgets function check_for_using_template(selected){ if (selected == “page-templates/core-front-page.php”){ jQuery(“#page-core-home-1”).show(); jQuery(“#page-core-home-2”).show(); jQuery(“#page-core-home-3”).show(); jQuery(“label[for=”page-core-home-1-hide”]”).show(); jQuery(“label[for=”page-core-home-2-hide”]”).show(); jQuery(“label[for=”page-core-home-3-hide”]”).show(); }else{ jQuery(“#page-core-home-1”).hide(); jQuery(“#page-core-home-2”).hide(); jQuery(“#page-core-home-3”).hide(); jQuery(“label[for=”page-core-home-1-hide”]”).hide(); jQuery(“label[for=”page-core-home-2-hide”]”).hide(); jQuery(“label[for=”page-core-home-3-hide”]”).hide(); } } jQuery(document).ready(function(){ check_for_using_template(jQuery(“#page_template”).val()); jQuery(“#page_template”).change(function(){ check_for_using_template(jQuery(“#page_template”).val()); }) }); Unfortunately, I was unable to successfully utilized the is_page_template, so I used jQuery. Works, though it may not … Read more
Inkness theme sidebar