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
1answer
116 views

Preventing Duplicating Posts from Widgets

I am making a theme that has the main loop in a widget. Also widgetized is a feature slider and a display of four feature post boxes, each with their own loop. How do I prevent duplicate posts from ...
0
votes
2answers
2k views

When would you use $_post instead of $post?

I've seen some examples that use $_post instead of $post. What's the difference and when would you use $_post instead of $post? Example: if (have_posts()) : while (have_posts()) : the_post(); ...
1
vote
4answers
2k views

How to tell if $query_var isset?

I tired to use isset($queryvar) but that didnt work, so I implemented my own function qv_isset, but it runs into a problem when $ch is set to 0. $cls = get_query_var('cls'); $ch = ...
1
vote
1answer
155 views

Why does a variable work on the front page but return NULL on all other pages?

Hey all. For my theme, I have multiple sidebars. Each sidebar file has a variable of $sidebar_id assigned to it. So, for sidebar-1.php, $sidebar_id = 1, for sidebar-2.php, $sidebar_id = 2, and so on. ...
1
vote
1answer
348 views

Append varible to url or set session

I just wrote a little plugin that detects if the user is on a mobile browser and if so detects them away from the WordPress site to a mobile (simple) version of part of the site. As I got to ...
1
vote
2answers
817 views

Dynamic variable for custom taxonomy in loop?

I have a custom page template that loops through all custom posts with the post_type of "product_listing" AND the custom taxonomy "product_cat" of "shirts" and returns 4 posts per page (as seen ...
3
votes
1answer
3k views

How do I make my function add variables/values to the $post object?

How do I add $tzDesc and $tzEmbed (and other variables) to the $post object in the following function so that I can display the values in my theme files by inserting <?php echo $tzDesc; ?>? ...
2
votes
1answer
2k views

Take Variables Set in Functions.php and Echo Them Inside My Custom Post Template

I have the following function set up in my functions.php file to allow my custom post type "Slideshow" to work. add_action( 'the_post', 'paginate_slide' ); function paginate_slide( $post ) { ...
2
votes
3answers
567 views

where to include a php file

I have a php file with some variables which I would like to use. When I include it in the header.php the variables in that file are not recognized at footer.php and some other places. Where is the ...
0
votes
1answer
344 views

How to add a new variable to blog creation form?

I'm trying to add a new INPUT field to the blog creation form on Buddypress. Adding the front-end element is the easy part. I'm having some hard time trying to save it. The variable is a string, and ...
1
vote
1answer
971 views

How do I pass variables into short-code enabled Post Snippets in Wordpress 3.0?

I am using a plugin called Post Snippets. According to the documentation, it can substitute variables, such as {url} within the snippets. http://wordpress.org/extend/plugins/post-snippets/ I am ...
11
votes
2answers
4k views

What are all the Properties of the WordPress Post Object?

(Moderator's note: Title was originally "What are all the variables in the wordpress post object?") Does anyone know the variables that are stored in the WordPress Post object?
0
votes
1answer
128 views

Defining the value of a variable before a function?

I'm trying to edit a plugin so that it only shows it's submenu if the user is an administrator but I don't know how to define the value of the variable before the function: function load_view( $name, ...
2
votes
2answers
684 views

How to pass data around?

I have different menu items. When the user clicks on a menu item, I want them to go to a particular destination. Each menu's destination has a different background color. I'm thinking that I can pass ...