A variable is a storage location and an associated symbolic name (an identifier) which contains some known or unknown quantity or information, a value. The variable name is the usual way to reference the stored value; this separation of name and content allows the name to be used independently of ...

learn more… | top users | synonyms

0
votes
2answers
87 views

update_option using variable name

Title may not be clear but I'm using update_option($my_option, $new_order); and for some reason it would not work but if instead I change to update_option('my-option-name' $new_order); it works. I ...
2
votes
1answer
115 views

Using Wordpress public query variables

Good morning. I am trying to query various Wordpress pages, using public query variables, for example http://dmkim1979.ru/?p=37 // single post http://dmkim1979.ru/?page_id=40 ...
0
votes
1answer
14 views

Incorrect Blog Root

I have a blog at http://leghumped.com which I moved from a subdirectory to the site root a few months back. The problem is, the root still seems to resolve to /blog/. Eg: Instead of seeing ...
0
votes
1answer
90 views

Intercepting $_GET variable from custom pagination

I have a custom pagination using a form with the get action so I can have a page jumper box. Everything works until you enter something that is not an actual page. Examples are negative numbers, text ...
0
votes
1answer
34 views

Difference in Get Variable Location

I have noticed that in some instances in WordPress (such as in my custom post types), GET variables appear as following in the URL: www.url.com/events/cool-event?action=edit&message=1 However, ...
0
votes
1answer
256 views

How to put a form with php code into a variable or shortcode?

I'm trying to put my frontend form into a variable or a shortcode so I can wrap another shortcode around it (specifically Bainternet Post Creation Limits). My form has PHP code in it so I'm not ...
0
votes
1answer
98 views

About redundant code when I use shortcode to output the HTML from a variable

I use shortcode to output the following html in a variable, but there are too many redundant code such as br and p tags, how to remove them? Thanks! HTML MAKEUP $return_html.='<div ...
0
votes
1answer
134 views

jQuery dialog prints HTML-Tags under Wordpress

i need some help. I am using wp_localize_script in my Wordpres_Plugin. Inthe documentready-function i use this Code to bring the Message up: $('#button-setup-league').click(function() { $( "#dialog ...
-1
votes
1answer
146 views

Having problems accessing $_GET values

I'm trying to get the value of a $_GET variable on the homepage of my site. For some reason I can't access any $_GET variables on the homepage, but I can access them just fine on other pages. Does ...
-2
votes
1answer
40 views

How do I echo saved data outside the function?

I know the data I want is stored as $lineOne and I can echo that inside the function. But I want to get the data outside of the function. I've tired: $lineOne; $instance['lineOne']; Here's the ...
1
vote
0answers
97 views

Track usernames with piwik

I'm wondering if there is a way to send current logged username to Piwik and display it beside the ip address in the stats. I need to see which users viewed a specific page and which users downloaded ...
0
votes
0answers
31 views

Working with arrays/foreach statements - echo results? Addition operator w/foreach… multiplying?

I'm really struggling with this - I'm relatively new to PHP but I'm trying make this code that I've pulled together output a list of chapters sorted by user pageviews based on a user_meta field called ...
0
votes
0answers
58 views

Passing variables through a href link from one page to another page

On my registration site I have a CPT called "event". In my "Events" page I list these events and create a "register" link for each one towards the "Registration" page: $events = new WP_Query( array( ...
0
votes
0answers
67 views

Create and update Custom Cookie based on multiple GET and POST Values for first time visitors?

I am not exactly sure the most efficient way to write this code. I collect custom data in my forms and also in my url via get such as: Name utm_campaign URL Referrer ID Among many more. Do I ...
0
votes
0answers
64 views

global variable not accessable inside functions

I downloaded and installed a wordpress plugin. Everthing works fine on localhost untill i uploaded the site on live server it wasn't working as intended. When i define a variable as global its value ...
0
votes
0answers
24 views

How to get a RestFUL URL for a function?

I have a basic custom function which accept GET/POST requests, and process them upon request. Just simply (Lets say GET now): function miccheck() { echo "Hello, Mic Check 123! ". ...
0
votes
0answers
59 views

Generate users with plugin - assign value to variable

I am trying to create plugin where someone can enter a number and then that number gets ran into a for loop which then generates the amount of users asked for. I am having trouble catching the value ...
0
votes
0answers
82 views

Passing user first and last names from external db to WordPress user first and last names using session variables?

This may be a little convoluted, but here it goes. I don't let users register on WordPress to access my member site. I have an outside registration/login system set up and want to continue using ...
0
votes
0answers
298 views

Pass a variable between WordPress Custom login and BuddyPress registration page

I am coding a custom WordPress template that has to be also BuddyPress compatible. Actually when BuddyPress is Disabled my custom login/registration form works without problems but, as soon as I ...
0
votes
0answers
21 views

Advice or Best Practice on setting attributes and properties for user on login

I’m working on a web application service which is going to use a lot of the built-in Wordpress functionalities but also relies heavily on some customized code and tables to create - among others - ...
0
votes
0answers
175 views

Why won't the action hook wp_head won't accept parameters?

I'm working on a plugin that adds scripting to the head using add_action('wp_head',..); I have to pass a variable to the function to get my desired result. To test this I'm simple "echoing" out the ...
0
votes
0answers
45 views

Displaying posts by year

I'm trying to display posts on the homepage from the current year only. I am using the following: <?php if ( is_front_page()) { ?> <?php $current_year = date('Y'); ?> <?php ...
0
votes
0answers
240 views

Use $_GET with permalinks on page

I'm currently trying to use a $_GET to populate a MySQL query with in a URL on another page within a Wordpress site. URL sample: <a href="http://site.com/file.php?alabama">Alabama</a> ...