Tagged Questions
0
votes
1answer
20 views
Update Wordpress Custom Field with AJAX on cached page
I'm new to ajax am trying to create a simple hit counter that updates a custom field in Wordpress after the page loads. The page is cached, so any attempts to use PHP alone will not work.
I'd like ...
0
votes
0answers
28 views
Using Select HTML in Bootstrap Popovers
I want to be be able to utilize a select few HTML tags in a Bootstrap popover. I know that I could include the option HTML = true in the settings, but this would leave me exposed to an XSS attack ...
3
votes
1answer
105 views
Ajax Load More Posts in Category Page
I am developing a theme where I need to load more posts with ajax. Currently, when I click load more on the category pages, all the posts are loading. The category.php looks like this : `
...
0
votes
1answer
33 views
POST from jQuery to PHP
I have a form that passes field values to jQuery, which validates the fields and creates the variables being sent in data: {} in the snippet below.
$.ajax({
type: "POST",
url: "<?php ...
0
votes
0answers
12 views
How to utilize theme customizer live preview in this situation?
Short version: I am using the theme customizer in my theme and javascript for the live preview. I am not sure how to implement the javascript for php(as seen in code excerpt).
I am creating a theme ...
0
votes
2answers
70 views
Pull GetOption() variable into jQuery dynamically created html
I have a page with the following markup in the site theme footer:
<div id="modalpopup"><div id="inside"></div></div>
I have a variable in the WP db I can retrieve via ...
0
votes
0answers
26 views
How to disable controls in theme customizer?
Edit: I have rewritten the question in hopes I will get a reply from someone who knows the theme customizer.
I am trying to figure out how to disable setting controls in the Wordpress theme ...
1
vote
1answer
128 views
How to add default images into theme customizer image control?
I am trying to figure out how I can pre-load a theme customizer image control with images I have selected. Is their a way to point the control to a directory so they automatically show up in the ...
0
votes
0answers
31 views
Problem with function not executing
I am sorry for the long post but I wanted to be thourough in hopes someone could help me figure out this issue. I have been trying to get it working for 2 days with no such luck. I would appreciate ...
0
votes
1answer
83 views
calling admin-ajax.php from admin-ajax.php
I'm writing a plugin that calls the output of another plugin's ajax, which is set-up at wp_ajax_
I would have called the functions directly, but limitations in the plugin make that a non-option.
To ...
0
votes
0answers
231 views
how to get the variable passing through the ajax url in wordpress query
i want to get the variables passing through the ajax url in wordpress query_post().
here is my javasrcipt
<script type="text/javascript">
jQuery(document).ready(function($){
...
0
votes
1answer
636 views
Execute PHP code in Javascript onclick
When a user clicks on the table row, I want to:
save a value in the user profile
go to a page
I am within this loop:
<?php $query = new WP_Query(array('post_type' => 'aanvraag', ...
0
votes
1answer
31 views
Submit form to db
I am unable to get this insert to db function to work using ajax and a form. When I execute this, I receive a blank alert box on success.
HTML
<div id="rsvpContent">
<form ...
-1
votes
1answer
132 views
best way to communicate between php and jquery/javascript
I have a custom post type "pakket", in which I've put all kinds of data in the taxonomy terms. This custom post type has about 50 items, each with their own values for taxonomy terms. For example:
...
0
votes
1answer
286 views
Ajax URLs without #!, how to prevent falling into single.php on load or reload?
I'm trying to make things properly with a single page ajax powered portfolio. I've read that there is no need of #! to make it crawlable by google. So I have clean URLs that updates with .pushState ...
-1
votes
1answer
281 views
Trigger a click on specific link based on the referrer [closed]
I'm working on a WP single page portfolio that loads post content with AJAX. I read that WP doesn't need #! URLs to make it crawlable by Googlebot. If I understand it correctly, since Googlebot won't ...
1
vote
0answers
149 views
Security - Ajax and Nonce use [closed]
I'm developing a site which posts a number of ajax calls from jquery to PHP and returns data from PhP to jquery.
Everything is working, but i'd to know if my approach to handling the calls is ok, in ...
0
votes
1answer
285 views
AJAX function not working [closed]
One person on the site wrote a function, but I do not know why it works. This function displays a random quote. The functions implemented the ability to download new quotes via AJAX (link New Quote), ...
0
votes
1answer
183 views
Loading a post's content, into a div outside the loop, when it's title is selected in a list
I am building a site in wordpress where at a certain part there is a container that has a list of post items (see it as a menu/sidebar), and an empty space where I will load content. When you click on ...
0
votes
1answer
162 views
Call plugin with php function
This plugin only works as widget. I need call this plugin with php function. How to modify this code ?
<?php
/*
Plugin Name: AJAX Calendar
Plugin URI: ...
0
votes
1answer
128 views
How to keep track of when a vote is cast?
I have setup a great voting system on my website, but since I want to sort the top rated posts by week, month and alltime...I now need to able able to keep track of when a vote has been cast. Could ...
0
votes
0answers
106 views
Making Ajax Web Chat to unlimited users [closed]
I am getting ajax chat script here:
http://tutorialzine.com/2010/10/ajax-web-chat-css-jquery/
The script can only accommodate a maximum of 20 users.
If I want to make an unlimited, what should I do?
...
-2
votes
1answer
296 views
How to sum 2 variables [closed]
I'm trying to finish a simple script that will run on localhost only I'll use it to store some variables 'cause I would like to use wordpress also as 'money manager' (as a proof of concept).
But maybe ...
1
vote
1answer
323 views
Use ajax to update_post_meta
2 days ago I asked this then I tried to work on my code to be able to understand how ajax and php work and now I have a new issue that, probably would be easily solved.
These are my codes:
<?php
...
0
votes
1answer
387 views
Pulling Advanced Custom Fields from other pages
Basically I am using Advanced Custom Fields and have an ajax tabbing system that works with the ACF.
The current set up is below:
<ul class="css-tabs">
<li><a class="current" ...
1
vote
1answer
485 views
How to put JQuery/Ajax inside shortcode?
The purpose of this plugin is to create a list that users can modify with up or down votes. The shortcode is supposed to display the list on a page and use JQuery to fadeIn and fadeOut while updating ...
0
votes
1answer
420 views
what does $options = get_option('test_theme'); do?
I'm trying to set up theme options so they save with AJAX, I found this tutorial http://return-true.com/2010/01/using-ajax-in-your-wordpress-theme-admin/
it's calling
$options = ...
0
votes
1answer
820 views
Change Query Arguments (filter) with jQuery/Ajax or PHP?
I have a pretty complex wordpress-site for travelling. There's an "archive-hotels.php", a template for the custom-post-type "Hotels". Inside the CPT is a taxonomy called "City", so we can do this: ...
0
votes
1answer
128 views
how to set beforsend option in wordpress ajax methods
How do I set the beforesend option in WordPress AJAX? I want to show loading option.
This is my code:
function showmyvideos() {
var datas="data";
var data = {
action: 'my_vids',
...
3
votes
1answer
357 views
Real time Duplicate title check
On my website there are a lot of authors and they are all writing about italian 'scene' so sometimes it happens that two of them write the same post or use same title so what I'm looking for is a way ...
6
votes
2answers
494 views
Can I use the same nonce for multiple requests on the same page?
Or does this break the purpose of the nonce, which I admint I don't quite understand it? :)
For example on two ajax requests that run on page load, or when something is clicked:
$.ajax({
type: ...
0
votes
2answers
506 views
How to load previous or next attachment with jquery ?
When i am on the single.php page, i show the first image attachment.
then i would like to load the next (and previous) image attachments without reloading the page.
so in single.php i started with ...
1
vote
0answers
196 views
Suggestions for Developing a Flipbook Style Theme? [closed]
I'm currently working on a custom WordPress theme that will be a showcase of several different stories, "books" if you will, that contain individual chapters. I'd like to present each of the stories ...
0
votes
1answer
158 views
Can not call .php files after switching to %postname%
This
$('#content').load("submenu.php");
works just fine with default permalinks
When I switch to %postname% it does not work any more
But, I can still go though to mysite.com/submenu.php and it ...
1
vote
1answer
1k views
Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
I am trying to render content generated by a php file in [jQuery Colorbox][1] through AJAX in my WordPress site. The PHP resides on the same server in the same domain. It works perfect when I run it ...
0
votes
2answers
395 views
WordPress plugin admin page - using WordPress function in linked php file
Asked this question on StackOverflow and they directed me over yonder... nice place ya got here =)
I've been developing a pretty simple WordPress plugin, and wanted to do some live validation of ...
1
vote
2answers
584 views
problem with ajax and the path to the php page
i would like to call a php page from an Ajax method : the alert works fine, the code as well has been tested outside of wordpress, but here it seems that the php page is never called.
I found some ...
1
vote
1answer
1k views
Can't use get_results() in ajax query
I'm using a jquery ajax call to get certain data from wpdb and I'm getting the following message:
<b>Fatal error</b>: Call to a member function get_results() on a non-object in ...
4
votes
1answer
2k views
How can I fetch loop of post titles via AJAX?
I have a list of the most recent post titles in sidebar.php. Here is an example of how that code looks:
<?php $args = array('posts_per_page' => 20); ?>
<?php $sidebar = new ...
1
vote
1answer
270 views
How to run JS, PHP and etc. inside WP post?
I would like to try little web apps with WordPress.
Just to accept some values for few fields and present the output using AJAX.
What are all the necessary modifications on WordPress?
So, far ...
2
votes
2answers
732 views
Getting $comments outside the comment template
I have a ajax request hooked on "template_redirect" (the ajax requests the post's url), and I want to display only the comment template:
function get_comm(){
if(isset($_GET['get_my_comments'])):
...
3
votes
2answers
2k views
How to load and show comments with AJAX instead of pagination?
Is there a plugin that displays comments like this:
http://img541.imageshack.us/img541/6541/47905634.jpg
when the user clicks "read more", older comments are being appended to the list with ajax.
0
votes
1answer
868 views
Admin-ajax.php appending a status code to ajax response
I'm writing a plugin that uses Ajax (jQuery with form plugin) via a form submission and the php function returns a JSON response.
add_action( 'wp_ajax_bubbly-upload', 'bubbly_upload_submit' );
...