Use Post as Front Page

You just need to modify the main query: // inside functions.php function wpse47667_intercept_main_query( $wp ) { // Modify the main query object $wp->query_vars[‘custom_tax_name’] = ‘custom_term_slug’; return $wp; } add_filter( ‘parse_request’, ‘wpse47667_intercept_main_query’ ); Then you have to replace the_excerpt() with the_content() inside your index.php/home.php/front-page.php template file, to show the full post instead of the excerpt.

Link to older links

Ok then… try this (hope i got your request right): REVISED <?php get_header(); query_posts( array( ‘posts_per_page’ => 5, ‘paged’ => ( get_query_var(‘paged’) ? get_query_var(‘paged’) : 1 ), )); // The Loop if (have_posts()){ while (have_posts()){ //Iterate the cursor on the next post the_post(); echo “<a class=”more-link” href=””; the_permalink(); echo “”><h1>”; the_title(); echo “</h1></a>”; echo “<div … Read more

post/page content

You need to apply the filter the_content e.g.: <?php echo apply_filters(‘the_content’,$home_page->post_content); ?> Also, you don’t need custom shortcodes for youtube, just put the URL in the content (but not a hyperlink), and it’ll be swapped out for a youtube player at runtime. No plugins or extra code needed thanks to oembed.

How to create a list of links to post with specific category

You can do this by putting this where you want to display the list : <ul> <?php global $post; $args = array( ‘numberposts’ => 10, ‘offset’=> 1, ‘category’ => 1 ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); ?> <li><a href=”https://wordpress.stackexchange.com/questions/50228/<?php the_permalink(); ?>”><?php the_title(); ?></a></li> <?php endforeach; ?> </ul> In … Read more

Making a wordpress page print friendly

remove_filter( ‘the_content’, ‘printme_add_link’ ) will prevent the link from being placed. You can just call printme_add_link() in your template to generate the print button. Alternately, you can just add_query_arg( ‘print’, 1, get_permalink() ) and use that as the link if you would prefer to do the link some different way.

sort posts by getPostViews in functions.php

You can use what you currently have and add a new condition: function sorter($wp_query) { if(mysql_real_escape_string($_REQUEST[“sorting”]) == “date”){ usort($wp_query->posts, ‘cmp_date’); }elseif(mysql_real_escape_string($_REQUEST[“sorting”]) == “title”){ usort($wp_query->posts, ‘cmp_alpha’); }elseif(mysql_real_escape_string($_REQUEST[“sorting”]) == “views”){ //create a list of all post ids as an array $ids = array(); foreach ($wp_query->posts as $p) { $ids[] = $p->ID; } //the query these posts again … Read more

How to separate each individual blog post?

You can do that entirely with CSS, almost no PHP coding required… try something like this: <div id=”services”> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <?php the_content(); ?> </div> <?php endwhile; ?> <?php endif; ?> </div> … that way, each … Read more