Need Help In Wordpress Coding

Discussion in 'Programming' started by SBDPlan, May 1, 2009.

  1. #1
    I have a wordpress blog, I need to implement a simple condition as below:

    If the date of current post is less than 14 days
    Run A Procedure(I already have this code)
    Else
    Run B Procedure(I already have this code)
    End If

    This code need to be implemented into every post, so it need to be fast and does not consume too much resources. I am not good in coding, I not sure how complicated this can be but if you need to charge me on the code please let me know the price before you start. If it is a simple one, I really appreciate your help.
     
    SBDPlan, May 1, 2009 IP
  2. alfa_375

    alfa_375 Active Member

    Messages:
    445
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #2
    I wonder what exactly you are looking for:

    You need a code for the
    or

    The code implementation into every post.

    Regards,
    Amer
     
    alfa_375, May 1, 2009 IP
  3. SBDPlan

    SBDPlan Active Member

    Messages:
    210
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    I need the "If the date of current post is less than 14 days" code.
     
    SBDPlan, May 2, 2009 IP
  4. WarMarks

    WarMarks Peon

    Messages:
    125
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hello you need to put this code at single.php wordpress theme file,
    and maybe also at index.php or home.php if you are using, and maybe page.php too
    if you want to implement this on pages too...

    u need to simply pick the post date and current date, convert them to unix timestamp
    and substract post date from current date... compare the anwers with
    1 209 600 as it is number of seconds in 14 days....

    If you need exact code for this in php, i can do this , contact me at WarMarks.com
    Thanks
     
    WarMarks, May 3, 2009 IP
  5. SBDPlan

    SBDPlan Active Member

    Messages:
    210
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    I submit a ticket to WarMarks.com , hope you can help. Thanks.
     
    SBDPlan, May 5, 2009 IP