Support » Plugin: WP Job Manager » Multiple forms?

  • Resolved Mikey B

    (@mikebackhouse)


    Is there some way of creating multiple shortcodes?

    Basically I want to separate pages with job submission forms on, but each will behave different.

    I currently have the woocommerce plugin installed, and I want to have 1 page with the option to buy packages, and the other to take you to the standard form. (I’ll then restrict which user type can see what page using S2Member)

    Thanks

    https://wordpress.org/plugins/wp-job-manager/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    There is only 1 job submission form so you cannot have differing forms, not without customisation anyhow.

    Don’t know if you’re aware but you can have a ‘free’ package too, if thats all you’re after here.

    Mikey B

    (@mikebackhouse)

    I know there is thanks, but what I want to do is to only allow certain member “levels” to access the free package.

    I’ve created a very badly hacked version, which included hard-coding the packages into the “package-selection.php” file, but it’s obviously not working right as even though the free package should be unlimited, it’s actually forcing people to add the package to their cart for every single post.. which isn’t exactly ideal!

    Is there some cunning way of adding the specific packages to the page using either shortcodes or some PHP snippets once I’ve created them?

    Plugin Author Mike Jolley

    (@mikejolley)

    In the packages file (the one which lists them) in the loop, you could check the package ID is equal to your free package, and check the user level, and if they don’t have access, skip over it?

    Mikey B

    (@mikebackhouse)

    That’s a thought! I’ll take a look at that in a couple of days and see if it’s possible with S2member.. it’s almost hometime on friday so that’s not going to happen now!

    Mikey B

    (@mikebackhouse)

    Hi Mike, I don’t suppose there’s a chance of demonstrating how I could do this at all?

    Say for instance there are 2 products: ID 1 and ID 2, with 2 account levels: “freeuser” and “paiduser”

    Your plugin is brilliant, so I would strongly recommend you working with the S2Member guys to get it working with their system. If you could restrict products to different member levels, it would open up a whole level of usability

    Plugin Author Mike Jolley

    (@mikejolley)

    Have you found what functions S2member has to check access programmatically?

    Mikey B

    (@mikebackhouse)

    Sorry for the delay, I’ve been on holiday.

    S2Member basically uses its own variation of the standard WordPress conditionals.

    eg:

    <?php if(is_user_logged_in()){ ?>

    <?php if (current_user_is(“s2member_level4”)){ ?>

    <?php if (current_user_can(“access_s2member_level1”)){ ?>

    <?php } else if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL >= 3){ ?>

    Plugin Author Mike Jolley

    (@mikejolley)

    So based on that, in the package-selection.php template where you have:

    <?php foreach ( $packages as $key => $package ) :
    			$product = get_product( $package );
    			?>

    You’d add something along the lines of:

    <?php foreach ( $packages as $key => $package ) :
    			$product = get_product( $package );
    if ( $product->id == 10 && ! current_user_is("s2member_level4") ) {
    continue; // skip this package!
    }
    			?>
    Mikey B

    (@mikebackhouse)

    Mike, you’re a star! Thank you so much, I’ll try that soon and let you know how I get on.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Multiple forms?’ is closed to new replies.