All Questions

56
votes
5answers
13889 views

How to Use AJAX in a WordPress Shortcode?

I have a code to display a random quote. One person wrote a function to implement all of this. But the update data via AJAX for some reason does not work. When you press the button "New Quote", nothin...
135
votes
12answers
390279 views

TypeError: $ is not a function when calling jQuery function

I have a simple jQuery script in a WordPress plugin that is using a jQuery wrapper like this: $(document).ready(function(){ // jQuery code is in here }); I am calling this script from within ...
128
votes
14answers
325695 views

TypeError: 'undefined' is not a function (evaluating '$(document)')

I'm using a WordPress site. I'm including this script in the header. When the script loads, I get this error: TypeError: 'undefined' is not a function (evaluating '$(document)') I have no ide...
26
votes
2answers
18571 views

Warning: preg_replace(): Unknown modifier ']'

I have the following error : Warning: preg_replace(): Unknown modifier ']' in xxx.php on line 38 This is the code on line 38 : <?php echo str_replace("</ul></div>", "", preg_repl...
19
votes
2answers
40975 views

How to get WooCommerce order details

How can I get WooCommerce order details by order id. I tried this but did not work for me. $order = new WC_Order( $order_id );
94
votes
14answers
150518 views

How do I add a simple jQuery script to WordPress?

I read the Codex and a few blog posts about using jQuery in WordPress, and its very frustrating. I've got as far as loading jQuery in functions.php file, but all of the guides out there are crappy bec...
101
votes
20answers
295963 views

Making an iframe responsive

I was reading this stackoverflow post titled "Can you make an iFrame responsive?", and one of the comments/answers led me to this jfiddle. But when I tried to implement the html and css to fit my nee...
17
votes
1answers
54376 views

Load More Posts Ajax Button in Wordpress

I've had a look through the old questions and tried many of the different methods that there seems to be to do this. The closest I've got to working is this one here: How to implement pagination on a ...
202
votes
12answers
214251 views

How to add a PHP page to WordPress?

I want to create a custom page for my WordPress blog that will execute my PHP code in it, whilst remaining a part of the overall site CSS/theme/design. The PHP code will make use of 3rd party APIs (s...
52
votes
10answers
343455 views

Access denied for user 'root@localhost' (using password:NO)

I'm new to mysql, I'm trying to run Wordpress inmy windows desktop and it need Mysql. I install everything with Web Platform Installer which provided by microsoft. I never seta root password for mysq...

Previous Next