How to make featured area?
You need an update method which saves your widget settings: function update( $new_instance, $instance ) { for ( $i=0; $i < 3; $i++ ) $instance[ “link_target_$i” ] = $new_instance[ “link_target_$i” ]; return $instance; }
You need an update method which saves your widget settings: function update( $new_instance, $instance ) { for ( $i=0; $i < 3; $i++ ) $instance[ “link_target_$i” ] = $new_instance[ “link_target_$i” ]; return $instance; }
Try this <?php the_widget( ‘WP_Widget_Recent_Posts’, array(‘number’ => 10, ‘title’ => ‘My Title Goes Here’), $args ); ?>
Your image links have the target=”_blank” attribute so that’s why they open in a new window. If you haven’t checked the open in new window checkbox, you can always add a text widget and add those images manually like Text to make sure no ‘target’ attribute is being written.
You have to be more clear about your problem. It will be better to publish you code and anyone can check it a give their help. I have created a contact form before with nonce and inside the form i added: <input type=”hidden” name=”nonce” value=”<?php echo wp_create_nonce(‘send_email_nonce’); ?>”/> and on the on the form handler … Read more
Trinket.io founder here. We embed trinkets in our WordPress blog (blog.trinket.io) all the time, which is hosted by WPEngine (wpengine.com). One solution is to use a hosting provider like WPEngine that works out of the box. I have to imagine that many of the excellent independent hosing providers out there support iframe embeds out of … Read more
In your child theme’s ‘functions.php’ file, you need to use the remove_action( ‘widgets_init’, ‘$name’ ); script. For instance, in your twentytwelve-child theme’s functions.php file, use: remove_action( ‘widgets_init’, ‘twentytwelve_widgets_init’ ); //necessary to replace parent theme’s code and then hook your new widget in your child theme’s function add_action( ‘widgets_init’, ‘new_twentytwelve_widgets_init’, 0 );
Sidebars aren’t assigned to pages by means of, say, database entries or any other means that PHP can detect easily. Sidebars just run where a function call tells them to run. You can’t really query to see if a sidebar is on a particular page because there is nothing to query. Well, almost nothing. The … Read more
Widget Admin page and Javascript enqueuing
It should be pretty easy to alter the text for the Core text widget via the widget_text filter: function conditional_text_widget_wpse_207957($text) { if (is_single()) { $text = “Whoa, d00d! I’m single”; } return $text; } add_filter(‘widget_text’,’conditional_text_widget_wpse_207957′); You do not specify what conditions you need exactly, nor provide any detail about the changes you need.
Wow, we don´t need all that code (at least I didn´t read it). Let´s look at your problem from a conceptual side. You want to choose categories on the backend to be shown in the frontend, if I understood you correctly. The steps would be the following in the backend: Build something to select categories … Read more