On click load iframe [closed]

Did you inspect your code for any errors? If the error is “Uncaught TypeError: $ is not a function”, then maybe you can add the code as below. <script> jQuery(document).ready(function($) { //your code starts here <iframe id=”myiFrame” class=”stop-lazy” data-src=”https://some.iframe” frameborder=”0″ allowtransparency=”true” style=”width: 100%;min-height: 150px;”></iframe> }); </script>

Can inactive WordPress plugins still load scripts?

Many hypotheses could be made, but the most probable ones are that the theme or a third plugin loads the script if a specific option saved in the database has a certain value. If the plugin is installed but not active that hypothetical option still exists in the database, on the contrary, when you delete … Read more

Minimizing scripts & css files that plugins add

I would suggest using a minify plugin that will automatically combine all the scripts and styles for you. Here are a few that will do it for you: http://wordpress.org/extend/plugins/w3-total-cache/ http://wordpress.org/extend/plugins/bwp-minify/ http://wordpress.org/extend/plugins/wp-minify/ http://wordpress.org/extend/plugins/minify/

How to add GET variable after script url?

Filter script_loader_src and use add_query_arg(). You can use parse_url() or the second argument $handle to target specific scripts… I have included multiple redundant options here: add_filter( ‘script_loader_src’, ‘wpse_99842_add_get_var_to_url’, 10, 2 ); function wpse_99842_add_get_var_to_url( $url, $handle ) { if ( ‘my_handle’ !== $handle ) return $url; if ( empty ( $_GET[‘myvar’] ) ) return $url; $parts … Read more

How to connect rating to individual comments?

This is almost entirely an HTML and/or Javascript question. You just need to make proper forms and have some PHP to process it. function additional_fields ($below) { global $comment; $ratsec=”<form action=””.get_permalink().'” method=”get” class=”comment-form-rating”>’; $ratsec .= ‘<input type=”hidden” name=”p” value=”‘.get_the_ID().'”‘; $ratsec .= ‘<label for=”rating”>’. __(‘Rating’) . ‘<span class=”required”>*</span></label>’; $ratsec .= ‘<span class=”commentratingbox”>’; //Current rating scale is … Read more

Register Script in Plugin Widget

There are 3 issues. Firstly, you’re calling do_action, triggering the action: do_action( ‘wp_print_footer_scripts’, ‘tab_widget_scripts’ ); When actually, you want to add your function to it, not trigger it. You should be doing this: add_action( ‘wp_print_footer_scripts’, ‘tab_widget_scripts’ ); Secondly, you’re registering this script: tabs Then enqueuing this script: tabs.js Clearly they don’t match, in the same … Read more

Scripts not loading when using the wp_enqueue_scripts action

get_stylesheet_uri() loads the main stylesheet of the theme. If you need to load additional stylesheets, you need to use get_template_directory_uri() for parent themes and get_stylesheet_directory_uri() for child themes. If you have stylesheet called custom.css in the root in a child theme, you will use get_stylesheet_directory_uri()’ . /custom.css’ You should also make sure that you have … Read more

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