Forums

Auto Delete Posts
Automatic Redirect to only post after a query_post with showposts=1 (2 posts)

  1. gabaozin
    Member
    Posted 1 year ago #

    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!

    http://wordpress.org/extend/plugins/auto-delete-posts/

  2. gabaozin
    Member
    Posted 1 year ago #

    Hey,

    Does anyone knows why this plugin is not moving the post to another category as it says it will do?

    I can't understand what the problem is and I REALLY need it to do just that.

    Thank you very much in advance!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic