2,750 reputation
31329
bio website rrike.sh
location Mauritius
age 30
visits member for 3 years
seen yesterday

Mar
25
comment Plugin init hook fires repeatedly
Your dashboard regularly makes Ajax requests, that's triggering the init most probably. Have a look at the network tab.
Feb
23
comment Why won't my custom widget stay in the sidebar after a reload?
Using the class name is a valid, but old way to have a constructor.
Feb
15
comment WP_query is not returning the expected result
Also, unrelated to your question, You should hook wp_enqueue_script() and wp_localize_script() as shown in the Codex codex.wordpress.org/Function_Reference/wp_enqueue_script
Feb
15
comment WP_query is not returning the expected result
Have you checked the network tab(or your console.log()) for what is being returned from the Ajax call? You should be using get_the_title() instead of the_title() by the way. the_title() echoes the title, and this might be breaking your response.
Feb
5
comment Make a WP Query search match exactly the search term
possible duplicate of Wordpress search exact match
Jan
27
comment Turn Autocomplete on
That's exactly what the plugin is meant to do...
Jan
26
comment Turn Autocomplete on
I tried and it works. If you don't see the autocomplete="off", it's working.
Jan
25
comment Wordpress Plugin development Call to undefined function jQuery()
@pSyToR The document ready should go into the JS file, not the PHP.
Jan
25
comment Wordpress Plugin development Call to undefined function jQuery()
Note that it should be js/my-script.js instead of /js/my-script.js because the value returned by plugins_dir_url() already has a trailing slash.
Jan
25
comment Wordpress Plugin development Call to undefined function jQuery()
Yes, the question itself is confusing.
Jan
25
comment Turn Autocomplete on
By default, all fields "have" autocomplete="on". Removing autocomplete="off" is the same as having autocomplete="on"
Jan
24
comment Wordpress Plugin development Call to undefined function jQuery()
@pSyToR are you adding any other JS files besides jQuery? You can add jQuery as a dependency, meaning WordPress will automatically include jQuery when it includes your JS file. Sometimes you can have such errors if you're including jQuery twice! Look at your source code.
Jan
24
comment Wordpress Plugin development Call to undefined function jQuery()
@bonger why wouldn't you have? It's better to put things in a JS file for caching.
Jan
24
comment Wordpress Plugin development Call to undefined function jQuery()
Why not not add jQuery as a dependency?
Jan
24
comment Turn Autocomplete on
Did you activate the plugin? Is the JavaScript part being injected in your page?
Jan
21
comment Import live site to local setup without access to live site
It's usually the same steps. Extract WordPress files, import database, modify the home and siteurl from the options table, modify wp-config.php for new database credentials, set WP_DEBUG to true, etc...
Dec
4
comment Insert Query not working in the form
codex.wordpress.org/Class_Reference/wpdb#INSERT_rows
Nov
15
comment Customizer API - Class doesn't exist error
Why are you including files from wp-includes? You should include class-customizer-control.php from your theme's functions.php.
Nov
11
comment How do I programmatically add items of content to a custom post type?
Yes, thanks for catching this mistake. I surely meant the postmeta table!
Aug
30
comment Set TRUE or FALSE based on a wp_localize_script option value
Should be something like window.onload = (function(){ button = CUPID.button; })();. Off topic here though.