Varying Search Result Pages

you can add an hidden filed to your search form and include a different template based on that: <form role=”search” method=”get” id=”searchsupport” action=”https://wordpress.stackexchange.com/”> <label class=”screen-reader-text” for=”s”>Search for:</label> <input type=”text” onfocus=”if (this.value == ‘Search’) {this.value=””;}” onblur=”if (this.value == ”) {this.value=”search”;}” id=”s” name=”s” value=”search” class=”search-form round”> <input type=”hidden” id=”searchsubmit”> <!– this is the magic field —> <input … Read more

Refine search results using WP_Query

You need to just merge the current query for the search with the part you want to add which you came close to doing already. I assume you have a custom taxonomy called media and you specifically want to leave out posts with the term media (like a term found in a tag or category) … Read more

Custom loop with conditional statement to separate each terms

Here is how you can group your post listing based on their terms. First you need to add the following code to your functions.php // join the term_taxonomy table so we can get the term id with the post add_filter( ‘posts_join_paged’, ‘wpse39380_posts_join’, 10, 2 ); function wpse39380_posts_join( $join, $query ) { // you need to … Read more

Different style for most recent article

check the built in counter $wp_query->current_post within the loop: <?php while( have_posts() ) : the_post(); if( 0 == $wp_query->current_post ): // this is the first post in the loop, output larger size, full content, etc. else: // output regular size, the_excerpt, etc. endif; endwhile; ?>

Facebook “like” open graph meta in header.php

I have this class from a while ago which still works fine on posts and pages using admin_head action hook <?php /** * Simple facebook open graph class for WordPress * * @author Ohad Raz * @version 0.1 * */ class simple_open_graph{ /** * Holds the default image url * @var string * @since 0.1 … Read more