Populating meta box with select-list of existing posts, and assigning it to custom post types

My question is partly based on this answer: https://wordpress.stackexchange.com/a/5778/27135 Mike’s answer is really great, and the solution worked fine until I needed to include my meta box in a custom post type. I tried to alter the code until that worked, but I did not succeed. I also do not need more than one selection … Read more

Woocommerce: Changing the variations select default value? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 8 years ago. Improve this question At my site i want to change the default value of the selecter that appears, when different variations exists. If anyone … Read more

Select menu should display categories and the item’s depth

I have a select menu of a custom post type in the header.php: <?php $selectloop = new WP_Query( array( ‘post_type’ => ‘products’, ‘posts_per_page’ => -1 ) ); echo ‘<form><select onchange=”if (this.value) window.location.href=this.value”>’; while ( $selectloop->have_posts() ) : $selectloop->the_post(); ?> <option value=”<?php the_permalink(); ?>” > <?php echo the_title(); ?></option> <?php endwhile; echo ‘</select></form>’; wp_reset_query(); } ?> … Read more