WordPress.org

Ready to get started?Download WordPress

Forums

Move posts category to an other one in a specific period time (7 posts)

  1. MRSepehr
    Member
    Posted 2 years ago #

    Hi guys,

    I'm looking for some Php code to automatically change posts category after
    specific period time (ex. : 2 * 86400 = 48 hours after publishing ), this mean every post in category X will move to category X2 one by one after 86400 seconds (24hrs) since publish time.

    I found :

    [Code moderated as per the Forum Rules. Please use the pastebin]

    all of this codes works Okay to gather :

    The post by ID 64 will remove from cat2 after 48Hrs, but I need it to move all posts(every post published 48Hrs ago NOT 2days ago) from cat2 to cat3.

    May somebody help please?

    all suggestions are welcomed :).

    Thank you

  2. nsathees
    Member
    Posted 2 years ago #

    if you could let us know why you want to do that, then we may be able to tell you a solution!

  3. MRSepehr
    Member
    Posted 2 years ago #

    Hey nsathees ,

    tnx for your reply , I need it to remove posts only from Front Page at

    24Hrs since published time , this meaning every post should appear on

    front page for 24Hrs ( NOT one day ) , I need to move posts from

    category X to category X2 :) because I'm showing one of my blog categories (called 'X' ) on front page.

    sorry for my bad En

  4. MRSepehr
    Member
    Posted 2 years ago #

    Somebody know how can I contact @MichaelH? ;)

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    Sorry - we cannot give out contact details for forum volunteers.

  6. MRSepehr
    Member
    Posted 2 years ago #

    Thank you @esmi , So may you help me please?

  7. MRSepehr
    Member
    Posted 2 years ago #

    here is my Php code :

    http://pastebin.com/Uvw9edfq

Topic Closed

This topic has been closed to new replies.

About this Topic