Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Popup the form then go to hyperlink once form is filled #13664
    fohlhorst
    Participant

    Perhaps a more simple description would be – how can I choose a target url from the form submit button?
    So each time I add a form to a post, I can have a different destination URL once the form is submitted

    in reply to: Modifying user validation code from suggestions for forms #13663
    fohlhorst
    Participant

    Yes – consider this thread closed

    in reply to: User Validation Before Form Launch #13662
    fohlhorst
    Participant

    This is perfect – thank you so much!

    in reply to: User Validation Before Form Launch #13633
    fohlhorst
    Participant

    Ally – this works great!

    $content = ‘This content is for members only, please log in or register first.’;

    one question though, can the hyperlink be setup to return to the calling page using something like a &redirect_to= command, once the user logs in?

    in reply to: User Validation Before Form Launch #13626
    fohlhorst
    Participant

    Thanks – I did what was in the guide and that does effectively prevent the form from showing if the user is not logged in – what I would really like to do is offer a way to login / register as part of the logic – but, I am no coder!

    so is there some way to put a hyperlink into the text that is shown from the function: code below like making the $content look like this? $content = ‘This content is for members only, please log in or register first. by clicking http:\\www.website.com\login.php’;

    Simply put, I want the text that is stored in the content variable to be a hyperlink to a login page

    or, better yet if I can make the logic place a widget on the post for social login

    Below is the original code that has been added to the functions.php for the theme – so, I would want to modify that to either have a plugin show (Social Login widget) or at the very least, offer a hyperlink to the wp-login.php

    function my_members_only_shortcode($atts, $content = null)
    {
    if (is_user_logged_in()) {
    $content = do_shortcode($content);
    } else {
    $content = ‘This content is for members only, please log in or register first.’;
    }

    return $content;
    }
    add_shortcode(‘members_only’, ‘my_members_only_shortcode’);

Viewing 5 posts - 1 through 5 (of 5 total)
Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy