Reduce Drop down Menu Width in WordPress

It’s a css issue. You need to edit two selectors. First is the menu width. It’s set to 100% which is why you’re seeing black space. Edit this class below.: .cap-primary-menu .menu > li.menu-full-width .cap-submenu-ddown { padding: 20px 25px 25px; width: 100%; // set this to auto or something smaller than 100% left: 0; border: … Read more

Does WordPress merges a plugin folder during update?

Tested unconventionally: Created a folder in Desktop named abc – timestamp 12:00:00 Created another folder named abc somewhere else after a second – timestamp 12:00:01 Copied second one and paste on desktop > Want to replace? > Yes Folder abc (first one) replaced with folder abc (second one) Result: Timestamp stayed same as previous 12:00:00 … Read more

Automatically add attributes to woocommerce product?

add_action( ‘save_post_product’, ‘create_product’, 10 ); function create_product( $post_id, $post) { // $post_id and $post are required if ( empty( $post_id ) || empty( $post ) ) { return; } // Dont’ save meta boxes for revisions or autosaves if ( defined( ‘DOING_AUTOSAVE’ ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) … Read more

Making a plugin “Suite”?

As far as I know there is no way to “group” plugins into one. Although, there is a way to hide plugins. Just add following snippet to your current theme’s functions.php file: function hide_plugin_trickspanda() { global $wp_list_table; $hidearr = array(‘plugin-directory/plugin-file.php’); $myplugins = $wp_list_table->items; foreach ($myplugins as $key => $val) { if (in_array($key,$hidearr)) { unset($wp_list_table->items[$key]); } … Read more

scrolltop always 0, can’t trigger script

I guess body.scrollTop is deprecated in strict mode. Please use documentElement.scrollTop if in strict mode and body.scrollTop only if in quirks mode. So I would suggest you to use document.documentElement.scrollTop. also let us know when are you using this statement? show us full code and your console error if possible Please try the below code … Read more

Redux Framework has an embedded demo. Click here to activate the sample config file

Problem solved! Helped official support. It was necessary to add the following code. add_action( ‘redux/loaded’, ‘remove_demo’ ); /** * Removes the demo link and the notice of integrated demo from the redux-framework plugin */ if ( ! function_exists( ‘remove_demo’ ) ) { function remove_demo() { // Used to hide the demo mode link from the … Read more

How to show Recent Page instead of Post?

I have a ready made custom widget for recent page it was made for recent posts .. So please change the post text to page in the below code. View thoroughly , only change the text that is for display purpose. Add this code to your functions.php file Goto appearance->widgets you will see you newly … Read more

load_plugin_textdomain error

The plugin calling load_plugin_textdomain() the wrong way: load_plugin_textdomain( ‘custom_smilies’, PLUGINDIR . “https://wordpress.stackexchange.com/” . dirname(plugin_basename(__FILE__)) . ‘/lang’ ); You have to change the code to: load_plugin_textdomain( ‘custom_smilies’, false, plugin_dir_path(__FILE__) . ‘/lang’ );