how to get the post id in the option tag

$post->id needs to be $post->ID You can also use get_the_ID() Since your calling setup_postdata() you need to call wp_reset_postdata() after your foreach loop. You also need to echo the value of $options somewhere. foreach( $myposts as $post ) : setup_postdata($post); $options .= ‘<option>’; $options .= ‘<option value=”‘.$post->id.'”>’; $options .= get_the_title(); $options .= ‘</option>’; echo $options; … Read more

search using multiple taxonomies and keyword

I would recommend you to use a hook for pre_get_posts action. This action is fired before appropriate posts are fetched from db. In this hook you can add extra parameters to your query and have influence on returned results. So the basic implementation of your hook could be like this: add_action( ‘pre_get_posts’, ‘wpse8170_pre_get_posts’ ); function … Read more

displaying posts from a custom post type tags

You’re looking for WP_Query echo ‘<ul>’; //The Arguments $args = array( ‘post_type’ => ‘project’, ‘tagportfolio’ => ‘urban-design-and-landscape’ //should use the slug name not the full name ); // The Query $the_query = new WP_Query( $args ); // The Loop while ( $the_query->have_posts() ) : $the_query->the_post(); echo ‘<li>’; the_title(); echo ‘</li>’; endwhile; echo ‘</ul>’;

What is the best way to change sidebars based on custom taxonomy terms?

There are 2 options that comes in mind First use a conditional statement is_tax(‘taxonomy-name’, ‘term name’). is_tax(‘fruits’, ‘apples’){ get_sidebar(‘apples’); get_sidebar(‘apples-right’); } if is_tax(‘fruits’, ‘oranges’) { get_sidebar(‘oranges’); get_sidebar(‘oranges-right’); } Or, the second option, use a different template file instead. taxonomy-fruits-apples.php should use get_sidebar(‘apples’); get_sidebar(‘apples-right’); taxonomy-fruits-oranges.php should use get_sidebar(‘oranges’); get_sidebar(‘oranges-right’); Hope this help

How do i make this Taxonomy term code work?

is_tax() is a check for taxonomy archive page and as I understand you want this for individual posts. The function to use would be has_term(): if ( has_term( ‘pretty-little-liars’, ‘series’ ) ) Also it’s good practice to enqueue style properly via wp_enqueue_style().