Skip to main content

Unanswered Questions

1,344 questions with no answers
0 votes
0 answers
214 views

SHORTINIT and sessions

Is it possible to use SHORTINIT for AJAX called php file and use a Wordpress shared $_SESSION global in it? I have this thus far: ini_set('html_errors', 0); define('SHORTINIT', true); require 'wp-...
0 votes
0 answers
37 views

Adding ID to a Listing but not inside WP_Query while

<?php $args = array( 'post_type' => 'bedrijf', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC' ); $...
0 votes
0 answers
730 views

Cant use php fopen() function in functions.php

I am trying to simple run fopen() in the functions.php, and have also tried it in a test.php wordpress template file. But it does not work. If I move the test.php file and csv file to a location ...
0 votes
0 answers
100 views

Wordpress 2014 Theme - Featured Content with multiple tags?

My company is using the new 2014 Theme for our portfolio blog. We really like the Featured Content section on the home page. What we would like to do is have multiple pages all with different ...
0 votes
0 answers
588 views

Plugin constructor called multiple times

I have plugin with the following structure - class emailPlg { static $tableName; static $pluginDbVersion = 1.0; function __construct() { global $wpdb; ...
0 votes
0 answers
154 views

Hyperlink to execute PHP

Below is code that will add a column called Printed to Gravity Forms and display a green or red dot representing if the form has been printed. If the form has not been printed, I am trying to a) ...
0 votes
0 answers
2k views

Set thumbnail from URL, by grabbing image in functions.php

So I've written a whole bunch of functions, which are used to display Vine videos. I then have a shortcode which outputs the code. The last thing I have to do is set the post thumbnail. I want to be ...
0 votes
0 answers
821 views

Can't get query string in ajax call

I'm developing a plugin that exports to a PDF your current posts view in the admin panel. Suppose you're in a post type "product", then the url must be: edit.php?post_type=product. What I want is to ...
0 votes
0 answers
7k views

AJAX with Selectbox Plugins (Select2, Chosen, Selectize)

I have been searching all over the internet for tutorials on implementing AJAX actions from jQuery selectbox plugins such as Select2 , Selectize and Chosen. (these plugins look better than the inbuilt ...
0 votes
0 answers
75 views

How to add a handler for a button in plugin?

I am working on my first plugin, and I am having some confusion. I am trying to figure out how to set a handler for a button on my plugin UI. Here is how the button is displayed: <li class="upload-...
0 votes
0 answers
330 views

Contact Form loaded with Ajax

I'm loading Contact Form plugin with an Ajax request. It is correctly loaded, but when trying to submit the form, I get a blank page with a 0 as unique response. I'm guessing it has something to do ...
0 votes
0 answers
170 views

admin-ajax.php nulls all php variables

I have a problem in a custom function. The function which adds to the WHERE clause in Store Locator Pro works correctly on its own, but I only want it to only work on a certain page, not on all my ...
0 votes
0 answers
1k views

Pass jquery var to a function in functions.php

I have this js in /js/functions.js: jQuery(document).ready( function($){ //Some event will trigger the ajax call, you can push whatever data to the server, simply passing it to the "data" ...
0 votes
0 answers
660 views

How to use shortcodes on a widget sidebar when doing an ajax call?

I'm trying to use a shortcode from Promotion Slider Plugin inside a widget when doing an ajax call. As said here, I could achieve it doing: add_action( 'init', function() { ...
0 votes
0 answers
659 views

How to use AJAX to check if user is still logged-in?

I am working with Wordpress 3.8 I have an app that I would like to use AJAX to check with Wordpress to determine if their idle time has expired. In my functions.php, I have the following hook that ...

15 30 50 per page
1
84 85
86
87 88
90