This topic has 5 replies, 2 voices, and was last updated 9 years by Laura.

  • Author
  • #76359
     ginigarbick
    Participant

    Hi…I have areas of my site that are restricted to anyone without a subscription. This function is working perfectly – however, instead of being directed to a page that says “this area is for members only…” the visitor is redirected to the membership levels page without an explanation. I know this is an easy fix and something that I need to set up – I’m just unsure as to how I do that.

    Please provide instructions as to how I set up these redirect pages.

    Thank you!
    Gini

    #76543
     Laura
    Moderator

    Hello, please try by adding this at the end of header.php of child theme

    COPY CODE
    
    <?php
    if(pmpro_hasMembershipLevel($level_id)) { } else { 
    
    echo '<div id="message">'.
     '<div class="error">'.
     '<p>You dont have a membership, some of our content require a membership plan in order to see them.</p>'.
     '<p> Please click <strong><a href="url of your membership table">here</a></strong> to see our membership plans.</p>'.
     '</div>'.
    '</div>';
    }
    ?>
    

    And this to style.css

    COPY CODE
    
    div#message .error p {
        line-height: 0;
    }
    div#message1 {
        background-color: #AD2020;
        padding-top: 15px;
        border: 5px solid #D60606;
        position: absolute;
        z-index: 1;
        width: 100%;
    }
    div#message1 .error p {
        color: white;
        font-weight: bold;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #76557
     ginigarbick
    Participant

    Hi…I don’t see header.php in child theme, only the main theme. Do you mean the functions.php?

    #76559
     ginigarbick
    Participant
    This reply has been set as private.
    #76561
     ginigarbick
    Participant

    Sorry, Laura…the private message above was to go to the other query you are working on for me. I’ve reposted it to the proper posting.

    #76869
     Laura
    Moderator

    Hello, just copy the header of main theme to child theme then edit it 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?