Need some PHP schoolin’! passing var to url and the old options table

PHP (as usual) has some nifty stuff, namely http_build_query() for putting together URL requests. However for some reason (historically) PHP4 compatibility and encoding issues currently WP maintains fork of that function internally and offers build_query() wrapper, as well as nifty higher level function for URL manipulation add_query_arg() and remove_query_arg().

My class function is not seeing GET url paramaters

As I said, I was just missing the declaration to use the global $wp_query, so it wasn’t accessing my filters. Here’s what worked incase it helps: global $wp_query; // pull variable from url if (isset($wp_query->query_vars[‘country’])) { $this->user_country = $wp_query->query_vars[‘country’]; } else { $this->user_country = ‘your country’; } if (isset($wp_query->query_vars[‘lat’])) { $this->user_lat = $wp_query->query_vars[‘lat’]; } else … Read more

WordPress loop: Display if posts exist

You can use the has_tag function in a conditional statement to achieve what you want. Take a look at the codex page here: Function Reference/has tag. This isn’t 100% tailored to your specific question, but you should see how it’s working and adjust for your specific task: <?php if( has_tag() ) { ?> <?php query_posts( … Read more

jQuery dialog prints HTML-Tags under WordPress

It’s sort of a longshot, but maybe try something like this: $(‘#button-setup-league’).click(function() { $( “#dialog p” ).html(‘<span>’+wpslm_v_script_vars.delete_league+'</span>’); $( “#dialog” ).dialog({ modal: true }); }); This, of course, requires “#dialog p” to be initially empty, or assumes that its contents can be replaced entirely. If not, maybe you can use the solution above but with a … Read more

Passing variables trough 2 pages

I really have no idea what you’re implementing here – I don’t know how a plugin “has pages,” for instance. As such, I’m afraid I cannot offer you much help in the way of an example, but I’m confident that what you ask could be accomplished using the Transients API, or its ascendant the Options … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)