How do I edit the WordPress post.php file?

You’ll want to add a custom meta box, and put your code in the corresponding callback. It sounds like you’ve already set up your custom post type, so just make sure you have the last line to register your meta box callback: register_post_type( ‘wpse_cpt’, array( ‘labels’ => array(‘all’,’the’,’labels’), ‘public’ => true, ‘supports’ => array( ‘title’, … Read more

How to create object in wordpress?

The rule of the thumb is following: term of taxonomy is something group of posts shares, custom field is something individual post has. Depending on exact context and requirements things might be better saved as one or another. For example group of posts might share general color (term), but if you want each post to … Read more

How to query custom post type by two terms?

figured it out I removed the taxonomy code within my query and added <?php $args = array( ‘showposts’=>25, ‘post_type’=>’liaisons’, ‘speakeryear’ =>$options[year] ); $query = new WP_Query($args); while ( $query->have_posts() ) : $query->the_post(); if( has_term( ‘test1’, ‘placementcategory’ ) ) { ?> <article class=”card-half”>Test</article> <?php } endwhile; ?>