• ackahforson2

    (@ackahforson2)


    Hello Roland,

    I have created a “dashboard” using the documentation on your site; showing the user profile with <?php $current_user = wp_get_current_user();
    echo do_shortcode(‘[pdb_single filter=”user_login=’ . $current_user->user_login . ‘”]’) ?>

    My issue is with WP users who have no record yet. How do I get a signup form or better a link to signup form to show if no record is found for the current WP user?

    Kind regards,

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    You’ll need a custom template for your single record shortcode. In that template, there is a section for what to display when there is no record found.

    Thread Starter ackahforson2

    (@ackahforson2)

    Hello Roland

    In that template, there is a section for what to display when there is no record found.

    This is what has been bugging me for the better part of 3 days. Obviously I am a php noob.

    I placed this code ” <?php if (!empty($this_business->participant_id)) : echo ‘You have no profile yet’; ?>
    <?php endif ?> ” at the end of my custom single template which is a replica of the template found here ( without the section with “More details” loop.

    Problem is WP users who visit the page with <?php $current_user = wp_get_current_user();
    echo do_shortcode(‘[pdb_single template=custom filter=”user_login=’ . $current_user->user_login . ‘”]’) ?>
    code and do not have a record in PDB yet do not see the ” You have no profile yet” message.

    Please could you help with some definite pointers?

    Kind regards,

    PS. when i toggle the “!” on ” <?php if (!empty($this_business->participant_id)) : echo ‘You have no profile yet’; ?>
    <?php endif ?> ” logged in users with a record in PDB see the “You have no profile yet” message.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dashboard – Participant database with wordpress users’ is closed to new replies.