Timed Content
Using function to theme (1 post)

  1. MAIK72
    Posted 3 years ago #

    Im using the function to dissapear expired posts:

    <?php if (function_exists('simple_timed_content')) : ?>
    <?php if (simple_timed_content("offdate=20120309 offtime=230058")) : ?> Some content goes here <?php endif; ?> <?php endif; ?>

    I want to use as dates from custom fields like this:

    (simple_timed_content("offdate='$end_date' offtime='$end_time'")) : ?>

    where : `
    $end_date=date( 'Ymd', strtotime( get_post_meta( $Post->ID, "_EventStartDate", true), time()));`

    $end_time=date( 'HM', strtotime( get_post_meta( $Post->ID, "_EventStartDate", true), time()));`

    Assuming allways that _EventStartDate value is : Ymd HM (20120309 230058)
    How would be the complete code for this to work? Im new to php
    Thank you


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Timed Content
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by MAIK72
  • This topic is not a support question
  • WordPress version: 1.1