How to get my insert.php url in jquery?

I think you must add all the url , because if your script file is not located in the main page it will not access this url: ‘admin.php?page=insert.php’, tray to add the full url , url: ‘domain.com…/admin.php?page=insert.php’

How can I add a new lib path without call each one on the header?

function my_custom_enqueue_scripts() { if ($handle = opendir(get_template_directory() . ‘/custom-stylesheets’)) { $i = 1; while (false !== ($file = readdir($handle))) { if ($file != “.” && $file != “..”) { wp_register_style(‘custom_stylesheets_’ . $i, get_template_directory_uri() . ‘/custom-stylesheets/’ . $file); $i++; } } closedir($handle); } } add_action(‘wp_enqueue_scripts’, ‘my_custom_enqueue_scripts’); Add code to a file: functions.php Styles should be located: … Read more

WordPress conflict with multiple load more posts functions on click

check your portfolio-scripts.js and blog-scripts.js both action contain same action. ‘action’: ‘load_more_posts’, So for your portfolio-scripts.js action Should be ‘action’: ‘loadmore_portfolio_posts’, instead of ‘action’: ‘load_more_posts’, You declare the function in portfolio-scripts.php but not call in the ajax. I guess change the action solve your problem.

How to add styling and script to a custom widget plugin

You can use wp_enqueue_script and wp_enqueue_style just after the following code add_action(‘widgets_init’, function(){ register_widget(‘calendar_widget’); }); You can add js/css like this function mg_scripts() { wp_enqueue_style( ‘style-name’, ‘/path/to/css’ ); wp_enqueue_script( ‘script-name’, ‘/path/to/js’, array(), ‘1.0.0’, true ); } add_action( ‘wp_enqueue_scripts’, ‘mg_scripts’ ); You can also call wp_enqueue_script and wp_enqueue_style directly inside widget function like this <?php /* … Read more

jQuery to show icon after .hide

I assume the different spellings of .simplelightbox and .simple-lightbox are typos in your question and both are correct in your code. My first thought would be to find the function in the plugin that is fired when the white ‘X’ is clicked (that closes the lightbox) and add your line of code. If you don’t … Read more