WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
[resolved] "current" to "past" data fields (5 posts)

  1. Jonathan Dingman
    Member
    Posted 2 years ago #

    Is there a way to easily move between a "current" and "past" data fields?

    use case:

    Our company currently offers Product1, Product2, and Product3

    Then display "Current Products"

    After a few years, we only offer Product2, and Product3

    Is there a way to move Product1 to a "past products" association? Or is the solution that I just have remove it from one and add it to the other (I'm trying to look at it from the aspect that I may not always have control to do this from the UI, and may need to do it programmatically via other controls)

    OR, can this be done via dates? if ( product_lifespan < current_time ) { move to past products }

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    What are products associated to?

  3. Jonathan Dingman
    Member
    Posted 2 years ago #

    If the Products are associated to a Company

  4. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    Well, I guess having another connection type for past products would be the cleanest.

    See https://github.com/scribu/wp-posts-to-posts/wiki/Creating-connections-programatically

  5. Jonathan Dingman
    Member
    Posted 2 years ago #

    I think that code should be able to do what I want, I'll toy around with it and report back with any questions.

    Thanks Scribu :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags