Open WordPress Page from selected option dropdown

Looks like not many folks do this. Anyway here’s something that works for me to get drop-down select to go to WordPress page” <?php $my_title = $_POST[‘place’]; global $wpdb; $mypost = $wpdb->get_row( “SELECT * FROM wp_posts WHERE post_title=”” . $my_title . “” ” ); $permalink = get_permalink($mypost->ID); echo “<a href=$permalink><BR>Click Here to Go to Selection</a>”; … Read more

WP 3.5 caching problem

Sorry for this but I found out in the end that my ISP was doing some kind of caching on their end. Had to phone them and explain the issue. When they started seeing it too, I kwen the problem was with them. Thanks for all the comments btw.

query_vars in plugin when using custom permalinks

When pretty permalinks are enabled, the query var is category_name: $wp_query->query_vars[‘category_name’]; or use get_queried_object: $this_category = get_queried_object(); echo $this_category->term_id; echo $this_category->name; echo $this_category->slug; // etc..

Fix html inside a for loop [closed]

First of all you have the PHP syntax all messed up. Second, you misused some WordPress template tags – you already echo the entire link like so you need to return post permalink and title, but right now the_permalink and the_title_attribute functions echo the code. Here’s your code fixed: foreach( $terms as $term ) : … Read more