I see three things.
if ( function_exists( 'of_get_option' ) ) :
query_posts( 'cat=" . $homepage_feature = of_get_option( "homepage_feature' ) . '&posts_per_page=3' );
- You have a syntax error. There is no
endif;
. Maybe that is a typo, but maybe not. If you are trying to write a one-lineif
, remove the colon. - Your title states “custom taxonomy”.
cat=
is for categories, not general taxonomies. See the Codex. - Use
WP_Query
, notquery_posts
Assuming the rest of the code works, and assuming I am reading it right, your query should be:
if ( function_exists( 'of_get_option' ) ) {
$args = array(
'posts_per_page' => 3,
'tax_query' => array(
array(
'taxonomy' => 'your-taxonomy-name',
'field' => 'id', // or slug; I don't know which you have
'terms' => of_get_option( 'homepage_feature' )
)
)
);
$my_qry = new WP_Query($args);
}