WordPress.org

Ready to get started?Download WordPress

Forums

Some weird time manipulation (1 post)

  1. JoE
    Member
    Posted 4 years ago #

    Here's what I need to be able to do...if you can actually follow...I'm impressed and thank you! It took me about 2 hours to actually understand it, and even longer to try and write it.

    Every Monday video "X" is posted. With video "X", articles are posted on Monday, Wednesday and Friday for video "Y". So, the following week, video "Y" would then be posted on Monday and articles posted that week for video "Z". And so forth.

    So the main page of the site would need to be video "X", and three articles for video "Y". BUT, if someone clicks on an old video to watch, it needs to be video "X", with the articles from the previous week, that would be for video "X".

    Don't know if it will help, but this is the page I'm working from:
    http://fourplayercoop.com/pixelosophy

    And this is the page I'm trying to create:
    http://fourplayercoop.com.s24744.gridserver.com/pixelosophy/

    No need in trying to be original, this is the code I took from a different template and am trying to reformat for myself.

    $cat = array(22);
    $do_not_show_stickies = 1; // 0 to show stickies
    $callout_args=array(
       'category__in' => $cat,
       'showposts' => 1,
       'meta_key' => 'pixel_video',
       'meta_value' => 'yes',
       'caller_get_posts' => $do_not_show_stickies
       );
    
    $article_args=array(
       'category__in' => $cat,
       'showposts' => 3,
       /* meta_key NOT pixel_video */
       'caller_get_posts' => $do_not_show_stickies
       );   
    
    $archive=array(
       'category__in' => $cat,
       'offset' => 1,
       'meta_key' => 'pixel_video',
       'meta_value' => 'yes',
       'showposts' => 100000,
       'caller_get_posts' => $do_not_show_stickies
       );     
    
    $callout = new WP_Query($callout_args);
    $article = new WP_Query($feature_args);
    $archive = new WP_Query($list_args);

    I've been a PHP Developer for a few years, but this is the first site I'm trying to build with WordPress. I have no clue how to do it. Do I associate it with the video ID and pull articles by previous week? If so...I'm kind of lost. Any help is really appreciated, thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.