Free Base WordPress Theme

Posted by admin in General Stuffs, Word... | 04.18.2012 - 11:36 am

Although WordPress has made it very easy to create a custom WordPress theme, but it still takes time to learn and build it. So I’ve created a Base theme based on the free Basic theme from Themify. I’ve stripped out the framework and the extra functions that you might not need. It includes only the […]
Advertise here with BSA
Technorati Tags: blog

Original post by Nick La

    Technorati Tags:


    How To: Avoid Duplicate Posts

    Posted by admin in General Stuffs, Word... | 05.18.2008 - 8:58 am

    A reader writes in:

    I’m developing a new theme and I’m having trouble getting duplicate posts from showing when running two loops (one standard loop and one from a specific category). Even when I copied the specific code from directly from the codex, it was not working.

    The Codex article the reader mentioned was regarding the Loop. Although the example shows how to avoid a single duplicate post, it doesn’t show how to avoid duplicating multiple posts.
    Here’s how to show two individual loops without duplicating posts in either loop.
    Step 1: Add a ‘posts_where’ Function
    A WordPress filter is needed to accomplish this, and we’re going to be tapping into the ‘posts_where‘ filter.
    The reason being is we need to modify the query used for the loop and exclude some posts.
    Here’s the function we’ll be using called post_strip:

    function post_strip($where) {
    global $myPosts, $wpdb;
    $where .= " AND $wpdb->posts.ID not in($myPosts) ";
    return $where;
    }

    In the […]

    Original post by Ronald Huereca

      Technorati Tags: