Make a widget to my footer

Your theme appears to be loading its “footer” via code hooked into the wp_footer action, since there is no other obvious code that would do it. Of course, this is based on the limited code you have posted. This means that you should be able to remove and replace the footer code used by the … Read more

Where to add a widget class?

I copied the class definition and register_widget( ‘My_Widget’ ); to my theme’s functions.php file & it did show My Widget under Appearance > Widgets. So please place this code directly in your theme’s functions.php file. It is not recommended to edit anything in wp-includes directory.

How to add WooCommerce Add to Cart button in widget?

<?php /* Plugin Name: Keyframe Woocommerce Widget Description: Keyframe Woocommerce Add To Cart Sidebar Widget Author: Keyframe Version: 1.0 */ // Block direct requests if ( !defined(‘ABSPATH’) ) die(‘-1’); add_action( ‘widgets_init’, function(){ register_widget( ‘N_Widget’ ); }); /** * Adds N_Widget widget. */ class N_Widget extends WP_Widget { /** * Register widget with WordPress. */ function … Read more

Widget to embed youtube video

In simple PHP,I am use this code : Url :have code that same as you genrate that appended at the end of url.I am work with core php. $url=”http://www.youtube.com/watch?v=fHBFvlQ3JGY”; preg_match( ‘/[\\?\\&]v=([^\\?\\&]+)/’, $url, $matches ); $id = $matches[1]; $width=”640″; $height=”385″; echo ‘<object width=”‘ . $width . ‘” height=”‘ . $height . ‘”><param name=”movie” value=”http://www.youtube.com/v/’ . $id … Read more

Conditionally Load a Script if a Certain Widget is Shown on a Page

I think what you are asking to do is not possible. At least not cleanly. Why? Because the actual rendering of sidebars and widgets happens in the template files. get_sidebar() gets called from a template file which then calls the WP_Widget::widget() method for whichever widgets are assigned to the sidebar in question. But this happens … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)