WordPress Edit Button not appearing for widget in customizer

You must define a valid element for the before_widget/after_widget when you register a sidebar. In fact, I just a couple days ago added this to the theme handbook on Widgets: Opting-In To Selective Refresh: Important: Selective refresh for widgets requires that the theme include a before_widget/after_widget wrapper element around each widget that contains the widget’s … Read more

WordPress update not saving

The problem is here: $instance[‘content’] = (!empty( $newInstance[‘content’])) ? $oldInstance[‘content’] : ”; This translates to: if newinstance content is not empty and has something in it then use the old instance content else if it is empty use ” Should it not be using new instance instead of old? For example, here’s the example in … Read more

Cannot change footer text?

The original theme url here ( https://wordpress.org/themes/sornacommerce/ ) The theme working by using WordPress hooks You can update this file: sornacommerce\inc\theme-hooks.php on line 438 to 497 Otherwise remove the function on the hook like bellow: remove_action( ‘sornacommerce_site_footer_block’, ‘sornacommerce_site_footer_block’ ); Then add new function to the same hook like bellow: function wpse291732_footer() { // your function … Read more

wp_dropdown_categories – how to save in widget?

You didn’t add the dropdown/select name attribute, that’s why it’s not working as expected. Please try updating your $dropdown_args, here’s the updated arguments – $dropdown_args = array( ‘taxonomy’ => ‘cs_categories’, ‘id’ => $this->get_field_id( ‘cs-category’ ), ‘name’ => $this->get_field_name( ‘cs-category’ ), // Added this line ‘show_option_none’ => __( ‘Select category’, ‘text-domain’ ), ‘hide_empty’ => true, ‘hierarchical’ … Read more

The correct way to add a JavaScript in the functions.php [closed]

function my_scripts() { // Register the script like this for a plugin: wp_register_script( ‘custom-script’, plugins_url( ‘/js/custom-script.js’, __FILE__ ) ); // or // Register the script like this for a theme: wp_register_script( ‘custom-script’, get_template_directory_uri() . ‘/js/custom-script.js’ ); // For either a plugin or a theme, you can then enqueue the script: wp_enqueue_script( ‘custom-script’ ); } add_action( … Read more

How to add urls in html widget in a gravity form? [closed]

I think the issues is with the Quotes your using in your html…. if what you have pasted is what you are actually using href=”http://strippersjob.eu/es/aviso-legal/” These href=”http://strippersjob.eu/es/aviso-legal/” quotes seem to be Typographic quotes and not acceptable html quotes. The Typographic quotes are not really opening or clossing the href attribute so you are getting weird … Read more

Multiple selection for wordpress widget

Hi why don’t you used multiple check-box instead of select option field. As well as you have used deprecated functions like “create_function”. I have modified your code which replaced select option with multiple check-box selection. function myCatWidget() { register_widget( ‘my_custom_cat_widget’ ); } add_action( ‘widgets_init’, ‘myCatWidget’ ); class my_custom_cat_widget extends WP_Widget { function __construct() { parent::__construct(‘my_custom_cat_widget’, … Read more