WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Loop and Custom Field Challenge (4 posts)

  1. Chris M.
    Member
    Posted 3 years ago #

    Hello WordPress Community!

    [deleted ref to dup post]

    I have a challenge for you… :-)

    I am using a great plugin called PHPurchase, which is a membership and shopping cart plugin wrapped into one. I would like to create a custom template page in order to work with this plugin the way that I envision it in my mind.

    The way PHPurchase works is that it you place content between shortcodes in order to hide / reveal content on a page or post. 

    Like this (with a sample "Member Library" page):

    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

    MEMBER LIBRARY (Page):

    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

    [phprotect item_numbers= ' SM ']

    Silver Member content goes here...

    [/phprotect]

    [phprotect item_numbers= ' GM ']

    Gold Member content goes here...

    [/phprotect]

    [phprotect item_numbers= ' PM ']

    Platinum member content goes here...

    [/phprotect]

    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

    SM, GM, and PM are the codes for Silver, Gold, and Platinum Memberships, respectively. The above shortcode setup will only reveal content based on what membership level you have, after you have logged in. If you are not logged in, it will show another message on this page (which I have not included here). 

    I would like the WordPress Loop on this custom template page to bring back the following information between those three shortcode sets mentioned above:

    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

    [phprotect item_numbers=' SM ']

    As a Silver Member you have access to the last 3 Child Pages of the Member Library:

    HTML link to the last 3 published pages (with Page Titles displayed), published under the Parent page "Member Library" (ID=135)
    [/phprotect]

    [phprotect item_numbers=' GM ']

    As a Gold Member you have access to the last 5 Child Pages of the Member Library:

    HTML link to the last 5 published pages (with Page Titles displayed), published under the Parent page "Member Library" (ID=135)
    [/phprotect]

    [phprotect item_numbers=' PM ']

    As a Gold Member you have access to the last 10 Child Pages of the Member Library:

    HTML link to the last 10 published pages (with Page Titles displayed), published under the Parent page "Member Library" (ID=135)
    [/phprotect]

    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

    Now, there is one more challenge…

    The pages themselves need to be protected with Custom Fields. I would like this process to be AUTOMATED, so that when I create a page, WordPress knows what to do and takes care of the rest...

    Here are the custom fields needed:

    ----

    For the last 3 published pages:

    Custom Fields

    Name: phpurchase_subscription
    Value: SM, GM, PM

    ----

    For the last 5 published pages:

    Custom Fields

    Name: phpurchase_subscription
    Value: GM, PM

    ----

    For the last 10 published pages:

    Custom Fields

    Name: phpurchase_subscription
    Value: PM

    ----

    This will protect the pages themselves from being accessed by the wrong membership level.

    For pages further back than the last 11 published pages they should have the following Custom Field:

    Name: phpurchase_subscription
    Value: UL

    I would be extremely grateful if someone could help setup and code this custom template page.

    Respectfully, 
    Chris M.

  2. Chris M.
    Member
    Posted 3 years ago #

    A polite *bump* to this thread...

    Still looking for help!

  3. Chris M.
    Member
    Posted 3 years ago #

    Another *bump* for this thread.

    Still looking for some help! (could be paid as well)...

  4. Xephan
    Member
    Posted 3 years ago #

    Since it doesn't seem like you're doing any hacking of the codes, maybe you should be posting in http://jobs.wordpress.net/ instead of here?

Topic Closed

This topic has been closed to new replies.

About this Topic