Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter andersson

    (@andersson)

    Solved.

    If you do this:

    global $wp_query;
    $wp_query->in_the_loop = true;

    before you start calling get_posts(%custom_code_here%) then you can use the_tags().
    For reasons I do not know there’s a check

    if ( ! $id && ! in_the_loop() )
        return false; // in-the-loop function

    in the get_the_tags() method. Seems redundant since a little further down the code it checks if $tags is empty and if so returns false. That would catch any erroneous (i.e. empty $posts) calls to the_tags one would think.

    Well, it’s solved now but if anyone can benefit from this monologue, all the better. 🙂

Viewing 1 replies (of 1 total)