Content instead Excerpt on term
Content instead Excerpt on term
Content instead Excerpt on term
What do you mean by “dynamic” ? Do you want it to work with different posts? If so, that’s simple. Before your get_posts query function, get page terms, and pass them to your array. You can get taxonomies with <?php get_the_terms( $yourpostid, ‘your_custom_taxonomy’); ?>
If page is a taxonomy do X, if is a term, do Y
Your query explicitly excludes the current post with this: ‘post__not_in’ => array($post->ID), remove that and it will return the current post within the results.
Prevent repetitive terms in get_the_term_list
Try to set 3-rd parametr for wp_list_pluck function, as i see if it’s not set then there’s happaning an unnessesery, for you, loop. Try to set it to true or some, not existing in Object, key. Hope it helps.
The way you create a template for a specific term is by a file, called taxonomy-$taxonomyname-$slug_of_the_term.php In your case it would look like this: taxonomy-schools-highschool.php Use this image as a guide for any other specific case that you might have: http://codex.wordpress.org/images/9/96/wp-template-hierarchy.jpg
Fetch posts list from fist CPT taxonomy term and list under 2. CPT
It is too specific of a condition for there to be a native way. On other hand this is hardly complicated as simply sorting an array in PHP. You can use usort() with a small custom callback, containing your comparison logic.
For your first question: — Where do I have to put the »HTML for the term order metabox«? Take a look at the add_meta_box codex page, the example there shows you how to put a metabox on your posts admin pages. Regarding your second question: — Does the »JavaScript to make the above list sortable … Read more