APC 500 Internal server error [closed]

Raising apc.shm_size from default value 32M to 256M in php.ini seems to do the trick for us. edit: raising that value is not a bad idea, however it does not solve the issue in the long term. We are now considering removing either APC or Super Cache…

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>’); }

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

Preferred Method of debugging a wordpress SQL calls?

Turn on define( ‘WP_DEBUG’, true ); and define( ‘SAVEQUERIES’, true ); . I prefer the format of the debug bar, http://wordpress.org/extend/plugins/debug-bar/ , which can be combined with the console, http://wordpress.org/extend/plugins/debug-bar-console/ . This script is great for profiling, Best Collection of Code for your functions.php file There are some other plugins that might help, like Debug … Read more

$wpdb->flush(); breaks the loop

In the code you posted in your other question, your call to flush() is using the wrong variable: $wpdp->flush();. Since this is an undefined variable, it’s likely that you’re simply getting a PHP runtime error at this point, stopping page execution.