Change image link in excerpt to point to post

Images are embedded in post content as pretty much straight HTML. <a href=”http://192.168.1.10/wp_release/wp-content/uploads/2011/01/boat.jpg”> <img src=”http://192.168.1.10/wp_release/wp-content/uploads/2011/01/boat.jpg?w=300″ alt=”” title=”boat” class=”size-medium wp-image-544″ height=”198″ width=”300″> </a> There is no easy way to alter that. You can alter it, but it means regexing the post body content or using an html parser like Simple HTML DOM Parser (Not an endorsement, … Read more

Can’t upload files

Apparently this is a new WordPress bug (I’m using version 3.5.2). Just set wp_debug to false and it works perfectly again. Hopefully they’ll fix this soon. define(‘WP_DEBUG’, false);

gallery – size is thumbnail by default change it to medium [duplicate]

Add below in you functions.php file, add_filter(‘post_gallery’,’wpse56909_post_gallery’,10,2); function wpse56909_post_gallery($output, $attr) { // We’re trusting author input, so let’s at least make sure it looks like a valid orderby statement if ( isset( $attr[‘orderby’] ) ) { $attr[‘orderby’] = sanitize_sql_orderby( $attr[‘orderby’] ); if ( !$attr[‘orderby’] ) unset( $attr[‘orderby’] ); } extract(shortcode_atts(array( ‘order’ => ‘ASC’, ‘orderby’ => … Read more

Media Gallery doesn’t show (using WP-Read Only)

Found the issue. I’m using Postgres_SQL cus I’m on Heroku, but that doesn’t play nicely with WordPress. Here’s the problem query: SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (8,9)… It caused the error described here: https://stackoverflow.com/a/14132471/378622

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