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

Echo custom field value

Repost for any future googlers from @StenW ‘s wordpress plugin support thread: Github user @atnon made a very similar modification to the code 10 days ago, also using custom-fields (though giving the image a link rather than putting a link in the caption). You can see this code in his pull request. I re-wrote his … Read more

Searchform for searching specific categories

A simple search in codex shows there are some parameters you can set to exclude some categories for example : <?php $args = array( ‘show_option_all’ => ”, ‘show_option_none’ => ”, ‘orderby’ => ‘ID’, ‘order’ => ‘ASC’, ‘show_count’ => 0, ‘hide_empty’ => 1, ‘child_of’ => 0, ‘exclude’ => ”, ‘echo’ => 1, ‘selected’ => 0, ‘hierarchical’ … Read more

exclude parents from the_terms

use get_the_terms instead and exclude any terms where parent value is 0, which means it is a top-level term. $terms = get_the_terms( $post->ID, ‘portfolio-type’ ); if ( !empty( $terms ) ) { $output = array(); foreach ( $terms as $term ){ if( 0 != $term->parent ) $output[] = ‘<a href=”‘ . get_term_link( $term ) .'”>’ … Read more