Results 1 to 1 of 1

Thread: ClassiPress Redirect Function

  1. #1
    Thread Starter
    stilehd's Avatar
    Join Date
    Apr 2014
    Location
    Trinidad and Tobago
    Posts
    15
    Thanks
    0
    Thanked 1 Time in 1 Post

    ClassiPress Redirect Function

    Hi,

    I have two different users for my ClassiPress site: Corporate and Individuals. I want Individuals to post for FREE but Corporate Members must purchase a membership package to post. I have explored different options, and this seems the simplest way to go thus far.

    I have created the two different user types using Advanced Custom Fields. In functions.php I would like to insert a code so that when posting an ad, if the member is Corporate and Has no active membership pack, redirect them to the membership purchase page.

    Here is my code however, my site does not load after putting. I am not familiar with php but attempting to learn. Any assistance to would be appreciated:

    PHP Code:
    //Redirect Corporate Users if No Membership Pack
    add_action'template_redirect''redirect_to_specific_page' );

    function 
    redirect_to_specific_page() {

    if ( ( 
    is_page('add-new')) && !(get_user_meta($user->ID'user_type'true) == 'Corporate') && !(get_user_meta($user->ID'active_membership_pack'false)) ) {

    wp_redirect'http://www.barterhutt.com/memberships/'301 ); 
      exit;
        }


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Classipress Paypal redirect
    By jtaylor912 in forum Help Using ClassiPress
    Replies: 3
    Last Post: December 16th, 2013, 08:57 PM
  2. Classipress: Color scheme and Login Redirect
    By wessayeed in forum ClassiPress General Discussion
    Replies: 1
    Last Post: November 16th, 2013, 06:24 AM
  3. [SOLVED] Login Redirect in classipress 3.2.1
    By louisbuilders in forum Report ClassiPress Bugs
    Replies: 7
    Last Post: March 5th, 2013, 12:41 PM
  4. ClassiPress 301 Redirect Plugin now available
    By pepsi in forum ClassiPress General Discussion
    Replies: 4
    Last Post: November 15th, 2012, 07:18 AM
  5. Redirect issue with classipress
    By gordon in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: November 11th, 2011, 04:16 PM