wordpress the_post_thumbnail() not cropping properly

Sure – the method of cropping/ resizing the thumbnail is normally determined in the templates functions.php file. Look for something along the lines of: <?php set_post_thumbnail_size( $width, $height, $crop ); ?> The third parameter is the method of cropping, a boolean. Set it to true and it will crop the image exactly, set it to … Read more

WordPress can’t echo brackets

The functions the_permalink() and the_title() print their results by default. Use get_permalink() and get_the_title() instead: while($query->have_posts()){ $query->the_post(); $url = get_permalink(); $keyword = get_the_title(); Print(‘<p>’ . $url . ‘&#123;’ . $keyword . ‘&#125;’ . ‘</p><br>’); }

Custom URL parameters in template files

The global $wp_query object is not what you are looking for by the time you get to single.php. Instead use global $wp object. Try changing your code to this: global $wp; if (array_key_exists(‘myvar’, $wp->query_vars) && isset($wp->query_vars[‘myvar’])){ echo ‘custom variable recognized’; } print_r($wp->query_vars);

Adding Custom Forms

If I were doing it this is how I’d do it: I would be to use a plugin such as cFormsII (free), Gravity Forms (Commercial), or several others to store the data in the database. Both the plugins I mentioned allow you to export the data which is great for a guest list. For the … Read more

Working with query_posts ( arrays and query strings)

I’d suggest not using $query_string to simplify things. If you’re using an array, stick with the array form for the query variables: global $wp; $paged = ((int)get_query_var(‘paged’)) ? (int)get_query_var(‘paged’) : 1; $s_array = array( ‘post_type’ => ‘blog’, ‘caller_get_posts’ => 1, ‘paged’ => $paged, ‘meta_query’ => array( array( ‘key’ => ‘votes_percent’, ‘value’ => ’50’, ‘compare’ => … Read more