The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How to pull in both published and future posts in custom query (1 post)

  1. huckmag
    Posted 4 years ago #


    I have a piece of code that is checking if there is a tag equal to the slug of the current post and whether that tag has at least two instances.

    This is a way of me connecting content of certain posts to a live blog.

    The code below works perfectly but does not work for posts scheduled.

    Does anyone know how I can query both published and future posts in the code below?

    I've been racking my brains but nothing seems to work. Any help would be hugely appreciated!

    				if ($all_the_tags);
    				$slug = basename(get_permalink());
    				$all_the_tags = get_the_tags();
    				foreach($all_the_tags as $this_tag) {
    				if (($this_tag->slug == $slug ) && ($this_tag->count >= '2' )) {
    				<a href="#modal" class="second button">View the live updates</a>

Topic Closed

This topic has been closed to new replies.

About this Topic