From Our Blog

  • A nice surprise

    December 17th, 2009
    A nice surprise

    Normally when an unknown person knocks at our door asking for me, I try to hide, cause it’s normally a traffic fine summons. Last week I received a nice surprise when a parcel got delivered to my door. Read More

  • Check if current page is a subpage of another page

    December 10th, 2009

    The follow function will return true if the current wordpress page is a sub page of a specific page.


    function is_tree($pid) {
    global $post;
    if(is_page()&&($post->post_parent==$pid||is_page($pid)||in_array($pid, $post->ancestors)))
    return true;
    else
    return false;
    };

  • Get the post id outside the loop

    December 10th, 2009

    Small wpx function to retrieve a wordpress post id, outside the loop. Copy the following code to your functions.php file.
    function wpx_postID(){
    global $wp_query;
    return $wp_query->post->ID;
    }

    You can now retrieve the ID by calling wpx_postID()