• Resolved haagendazs1

    (@haagendazs1)


    Hey

    I’m using the “Search Everything” plugin. What I use it for is to exclude 2 different categories, and to search for metadata as well. However, if I use it, the search finds future-dated posts also! Upon clicking it, it would give the 404 page. However, is there a way to modify the query somehow so that future posts aren’t displayed? Or a conditional tag? Or to modify the plugin somewhere? I emailed the plugin’s author but he hasn’t responded yet…

    thanks everyone

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

    (@haagendazs1)

    oh i think i got this one. instaed of using the_date i used get_the_time()

    so just make a variable

    <?php $thispostdate = get_the_time(‘YmdHis’);
    $currentdate = date(‘YmdHis’); ?>

    then make an if statement saying if thispostdate is before currentdate, then show

    <?php if ($thispostdate < $currentdate) : ?>
    bla bla bla
    <?php endif; ?>

    this works because the date format YmdHis will always have 14 characters in it

Viewing 1 replies (of 1 total)
  • The topic ‘Search Everything searches for future dated posts’ is closed to new replies.