[Plugin: Auto Delete Posts] Automatic Redirect to only post after a query_post with showposts=1
-
Hello,
Thanks for reading this.I’m working on a project in WordPress where the homepage should be a Today’s Deal and I’m using your plugin to move the Today’s Deal to the “Previous Deals” Category, after 24 hours.
My task is to automatically redirect the homepage to the only post in Today’s Deal Category, which will have different permalinks everyday.
I’m querring the post with:
<?php query_posts("cat=41&showposts=1"); ?>
And I tried redirecting to the result with (after the above):
<?php $url = the_permalink(); header("Location: $url"); ?>
Or:
<?php query_posts("cat=41&showposts=1"); ?> <?php $url = the_permalink(); ?> <?php ob_start(); wp_redirect("$url"); ob_flush(); ob_end(); ?>
but no success..
I tried several other things too, apart from searching the web a lot before posting here.
Help!
Anyone?Thanks in advance!
- The topic ‘[Plugin: Auto Delete Posts] Automatic Redirect to only post after a query_post with showposts=1’ is closed to new replies.