1 post per category on homepage and counting those posts

Well after a good bit of searching I seem to have this working, I hope this helps someone. <div class=”col1″> <?php if (get_option(‘woo_show_carousel’) == ‘true’ AND !is_paged()) { include (TEMPLATEPATH . “/includes/featured.php”);} ?> <?php if (is_paged()) $is_paged = true; if (get_option(‘woo_slider_exclude’) == “true”) $shownslides = get_option(‘woo_shown_slides’); if(empty($showslides) || get_option(‘woo_show_carousel’) == ‘false’){ $showslides = array(); } … Read more

Display last comments on home page

A slightly more complete and less abrupt answer. <?php $args = array( ‘status’ => ‘approve’, ‘number’ => ‘5’ ); $comments = get_comments($args); foreach($comments as $comment) : // display any of the following indexes as you’d like var_dump($comment); endforeach; ?>

Exclude function from homepage only?

Based on your pastes, i think what you’re going for is.. function cp_do_pagination() { if( is_home() || is_singular() /* || is_front_page() */ ) return; global $post; // <– do you need this for something in particular? if( !function_exists(‘appthemes_pagination’) ) return; appthemes_pagination(); } The is_singular() function covers is_page(), is_single() and is_attachment(), so no need for the … Read more

get_posts not working on homepage?

The get_posts() argument is supposed to be numberposts not posts_per_page and you were passing it as string. Try making it an integer. function listposts( $atts ) { $atts = shortcode_atts( array( ‘tag’ => ‘jan-2011’, ‘numberposts’ => -1, ‘orderby’ => ‘post_date’, ‘order’ => ‘asc’, ‘post_status’ => ‘any’ ), $atts ); $catposts = get_posts( $atts ); $out=””; … Read more

is_front_page breaks with url parameters generated by a plugin

I’m not sure if lang is a reserved/used query variable in WordPress, but if it’s not, then adding might help. Use a filter on query_vars like this: function my_query_vars( $vars ) { $vars[] = ‘lang’; return $vars; } add_filter( ‘query_vars’, ‘my_query_vars’ ); Although WordPress will now know about the language query variable, I’m not sure … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)