Show Posts By Custom Field

Frankly, this question shouldn’t exist, it has been answered hundreds of times across the web.. Im going to answer the most tricky part – query itself. Everything else is simple HTML and PHP. You can also find examples in link I provided below. If you can’t do PHP and HTML yourself, you shouldn’t ask this … Read more

How to set class to “current-page” on the currently viewed single post within a CPT

I figured it out. Before the declaration of $case_query, I declare the active page id, like so: $active_page = get_the_ID();. Then, in the while loop after the_post(); I add the following: $activeclass=””; if (get_the_ID() === $active_page) { $activeclass=”current-page”; } I also add the $activeclass to the .case-list-item div: <div class=”case-list-item <?php echo $activeclass; ?>”> Solved.

WordPress search for specific Post Type

Yes this is possible. There are numerous ways in which you can achieve this, either by creating a custom form and workflow or by overriding the default search template in WordPress and supply a request parameter for which can be used to identify the search request and filter the post types that should be searched. … Read more

How can I filter the post of a CPT by taxonomy Term in admin meta-box dropdown?

This question is WAY more complex than you realize. Despite that (or really, because of it) I’m going to give it a go… add_metabox(‘terms-post-selector’,’Select Related Post’,’post_terms_selector_dropdown’,null,’post’,’side’,’high’); function post_terms_selector_dropdown() { global $post; $taxonomy = ‘property_type’; // or whatever it is $terms = get_the_terms($postid,$taxonomy); $selectedterm = get_post_meta($post->ID,’_selected_term’,true); if (count($terms) > 0) { echo “<select name=”termselector” id=’termselector’ onchange=”loadpostterms();”>”; … Read more

List Authors For Current Category

Execution of code goes to infinite loop because you missed the_post() in loop. You can list all authors from current category:- Create an empty array for author IDs Check if current author ID exist in that array If No, display the author name and store that author ID in array. If Yes, Then skip that … Read more

WordPress URL question

These are your user information, this tutorial can be helpful for you to change/update author slug. There is no Author Template on your theme, have to create author template, https://codex.wordpress.org/Author_Templates this will be helpful for you.