Linked Questions
11 questions linked to/from Updating custom post meta with ajax
0
votes
0answers
24 views
How to use ajax_url in front end when using with theme? [duplicate]
I'm trying to use ajax function to my theme. I think i can't just put the javascript code in my functions.php, i have to register it properly and enqueue it.
So i store the javascript file with .js ...
3
votes
5answers
29k views
Absolute Path (ABSPATH) in WordPress is not working
I am currently working on a small task that store a plugin information into database, but I have problem regarding to include the file that has the functions to run the query.
Here is the line that ...
1
vote
3answers
16k views
how to use ajax in plugin admin area?
I tried ajax to get some info a php inside my plugin.but getting error-call to undefined function.
Ajax
jQuery.ajax({
type: "POST",
url: "<?php echo plugins_url();?>/tester/inc/...
-1
votes
2answers
11k views
Fatal error: Call to undefined function get_option()
When I try to send mail... it showing -
Fatal error: Call to undefined function get_option() in
/home/junkie/public_html/sub_demo/wp-content/themes/scroller/includes/contact-form.php
on line 9
...
2
votes
2answers
4k views
Update meta values with AJAX
I am working on a voting system in Wordpress. I first made it with GET requests but someone told me you should not use GET for this, So I started working with AJAX to update custom fields/meta values, ...
0
votes
1answer
3k views
get content from page through AJAX
I'm using an wordpress theme and I want to load content through AJAX inside a page.
I've added this inside my functions.php :
function my_ajax_files()
{
wp_localize_script( 'function', '...
0
votes
3answers
1k views
Which action hook should I use to intercept a form upon submission?
I have a form on wordpress page with a POST method.
I need to add an extra field to the form after submission but before it is sent to the URL in the action attribute.
I was thinking to use an ...
-1
votes
1answer
2k views
Call to undefined add_action() in theme's functions.php
Once done validating a form with ajax, I use php within my functions.php to actually send the form.
<?php
$name = $_POST['fname'];
$lname = $_POST['lname'];
$subject_line = $_POST['subject'];
$...
1
vote
2answers
967 views
get_term_children returns WP_Error for custom taxonomy
What I'm working on is a ajax based dropdown option form which returns child terms based on the option selected.
When the option is selected, a function is fired using onchange, where the script ...
0
votes
0answers
237 views
Adding result from PHP function into an input field
I have the following PHP code which is a template page for a wordpress site:
<?php
/*
Template Name: Calculator Form
*/
get_header(); ?>
<div id="content" class="grid_7 suffix_1 <?php ...
0
votes
0answers
118 views
Why isn't my plugin seeing other classes?
I've written some very simple code based off of this tutorial by Harish Chouhan on the Plugins API:
/** Add Plugins API if not already existing */
if ( ! function_exists( 'plugins_api' ) )
...