WordPress.org

Ready to get started?Download WordPress

Forums

Wp-Pro-Quiz
[resolved] Hide Start Quiz Button when user is not logged in (3 posts)

  1. isaaaka
    Member
    Posted 8 months ago #

    How to hide the Start Quiz Button when a user is not logged in.
    Because in the description I've already put a button to go to the register page.

    http://wordpress.org/plugins/wp-pro-quiz/

  2. isaaaka
    Member
    Posted 8 months ago #

    I think that it is in WpProQuiz_View_FrontQuiz.php

    I think that I need to put the code

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

    somewhere related to:

    <div align="center">
    
    				<input class="wpProQuiz_button" type="button" value="<?php _e('Start quiz', 'wp-pro-quiz'); ?>" name="startQuiz">
    			</div>

    But I don't know how exactly.

  3. isaaaka
    Member
    Posted 8 months ago #

    The code is:

    <?php if (is_user_logged_in()) { ?>
    
    	<p><div align="center">
    
    				<input class="wpProQuiz_button" type="button" value="<?php _e('Start quiz', 'wp-pro-quiz'); ?>" name="startQuiz">
    			</div></p>
    <?php } else { // not logged in ?>
    <p>&nbsp;</p>
    
    <p>&nbsp;</p>
    
    <?php } ?>

Reply

You must log in to post.

About this Plugin

About this Topic