how to make FAQs publicly visible?

Hello,

I have installed the Support plugin for the first time. It’s for a new site, so I’m more interested now in the FAQ feature than the ticket feature (though it will also be used if/when the traffic gets to a point to warrant it).

How do I display FAQs to people who haven’t logged in? Currently, I get a ‘must login’ message.

Thanks for any suggestions.

  • Predrag Dubajic
    • Support

    Hey @morgan,

    Hope you’re doing well today :slight_smile:

    Unfortunately the plugins is developed in that way so that users need to be logged in in order to see FAQ section.

    I’m going to move this thread in Features & Feedback section so we can consider adding this in future updates.

    For now you will need to remove some parts of the code manually from the plugin to make this possible.

    To do this you need to access your files via FTP and navigate to wp-content/plugins/incsub-support/inc/classes/shortcodes folder and from there download class-shortcode-faqs.php file.

    Open the file and remove lines 11-24, this is the code you want to remove:

    if ( ! incsub_support_current_user_can( 'read_faq' ) ) {
    if ( ! is_user_logged_in() )
    $message = sprintf( __( 'You must <a href="%s">log in</a> to get support', INCSUB_SUPPORT_LANG_DOMAIN ), wp_login_url( get_permalink() ) );
    else
    $message = __( 'You don't have enough permissions to get support', INCSUB_SUPPORT_LANG_DOMAIN );

    $message = apply_filters( 'support_system_not_allowed_faqs_list_message', $message, 'faq-list' );
    ?>
    <div class="support-system-alert warning">
    <?php echo $message; ?>
    </div>
    <?php
    return $this->end();
    }

    Save the changes, upload the file to it’s original location and that should be it.

    Please note that these changes will be overwritten with the plugin update.

    Best regards,

    Predrag

  • Morgan
    • Site Builder, Child of Zeus

    Thanks! Easily changed and the FAQs now appear on a public page. There are no voting buttons, but I assume that requires someone be authenticated with the system.

    It would be great if the Support plugin was fully available to unregistered users on public pages. I’m using the FAQ for pre-sales and customer support, so few people viewing it will be registered with the system. Few will register and/or login just to view FAQ.

  • Predrag Dubajic
    • Support

    Hey @morgan,

    Voting buttons require user to be registered so that voting doesn’t get abused, and changing this would be a bit more complicated than just showing the FAQ on front end.

    Let me flag this thread for our second level support dev guys to see if there is some workaround for showing voting buttons.

    Best regards,

    Predrag

  • Hoang Ngo
    • Code Slayer

    Hi @morgan,

    After checked the code, I think we can do that, but we will have to modify the plugin code, that’s mean, you will need to re-update the changes once the plugin updated.

    If you are fine with that, so here is the steps:

    1. In the file /incsub-support/inc/templates/index-faqs.php line 23, you will see a code block like this

    if ( is_user_logged_in() )
    echo incsub_support_the_faq_vote_box();

    Please update to

    echo incsub_support_the_faq_vote_box();

    2. In the file /incsub-support/admin/inc/ajax.php line 5, you will see a code line like this

    add_action( 'wp_ajax_vote_faq_question', array( &$this, 'vote_faq_question' ) );

    Please update to

    add_action( 'wp_ajax_vote_faq_question', array( &$this, 'vote_faq_question' ) );
    add_action( 'wp_ajax_no_priv_vote_faq_question', array( &$this, 'vote_faq_question' ) );

    Now, non-login users can vote too :slight_smile:

    If you have any issues please don’t hesitate to let us know so we can assist.

    Best regards,

    Hoang

  • Adam Czajczyk
    • Support Gorilla

    Hey James,

    I hope you’re well today!

    As @hoang Ngo said, it’s a fix that requires changing plugins code so adding this as a toggle-able feature would mean adding a feature to the plugin.

    I do agree that it would make a great feature. @predrag Dubajic has already moved this thread to our Features and Feedback forum and this means that if more members of our community will support the idea, it will most likely be included in one of the future releases. I’m not able to give you any ETA on this but since the code seems to be already ready I hope this will be soon.

    That said, please keep an eye no “Changelog” sectionof this page:

    https://premium.wpmudev.org/project/support-system/

    Cheers,

    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hey James,

    I hope you’re well today!

    I did those changes to make the voting publicly visible but it is not recording the votes on the back end. It only records them if the user is logged in.

    If a non-logged in user votes then this vote isn’t recorded at all, do I understand this correctly?

    Are you using any membership, content protection and/or user role management plugins on your site? Please advise!

    Cheers,

    Adam

  • James
    • WPMU DEV Initiate

    Yes, If a non-logged in user votes the vote is not recorded at all.

    I think the only roles I have is woocommerce for customers and non customers, but they have the same level of privileges. I have support enables if you want to take a look http://razontest.com/faq-system/

    Let me know if I should update to the recent one again, new update came out. But that also means i need to make the modifications in the code again to make it visible to the public……so frustrating

  • Predrag Dubajic
    • Support

    Hi James,

    Latest update is related to Pro Sites integration, so if you are not using Pro Sites the update is not a must.

    Unfortunately adding changes to plugin files can be frustrating, especially when the plugin is updated often.

    Since files you changed are not some files often changed my suggestion is to keep the modified file somewhere on your PC or server and then just replace the files instead of editing them each time.

    I’m pinging @hoang Ngo here to have a look at the issue you mentioned about votes not being recorded by logged out users.

    Best regards,

    Predrag

  • Hoang Ngo
    • Code Slayer

    Hi James,

    I hope you are well today.

    I will need more information for further debug. Can you please send in:

    – Mark to my attention – ATTN: Hoang Ngo

    – Link back to this thread

    – Include admin/network access

    – Include FTP

    – Include any relevant URLS for your site

    On the contact form, select “I have a different question”, this ensures it comes through and gets assigned to me.

    Thanks!!.

    Best regards,

    Hoang

  • Hoang Ngo
    • Code Slayer

    Hi guys,

    I hope you are well today.

    I do apologise for the mistake. The AJAX code should be

    add_action( 'wp_ajax_vote_faq_question', array( &$this, 'vote_faq_question' ) );
    add_action( 'wp_ajax_nopriv_vote_faq_question', array( &$this, 'vote_faq_question' ) );

    I’ve updated to your site, it should work now :slight_smile:

    Best regards,

    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.