Proper way of minifiying java script files in wordpress theme

Ad1. Just after make minification, do some tests with development tools (F12 in FF) There is a console where you will see all errors, warning etc. If something went wrong, you’ll see it https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console Ad2. Hard to say because every case is different but sometimes it’s matter. Which plugin do you use for that? For … Read more

Adding styles/scripts to specific page

You have wp_enqueu_script within your function spelled wrong. It should be wp_enqueue_script. Also is_page_template() will look for your template file as is relative to your theme directory. If file.php is in the root of your theme then it would just be is_page_template(‘file.php’). Here is the reference for that function: https://developer.wordpress.org/reference/functions/is_page_template/ Try this: function test(){ if( … Read more

When to use wp_register_script() function?

I have gone through some articles and come to the following conclusion. I think it helps. Registering any scripts using wp_register_script() is just registering; not loading it. The registered script will not be loaded until it is enqueued using wp_enqueue_script(). We don’t need to register and enqueue each of the scripts simultaneously. We should just … Read more

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