Support Ticket FAQs Made Public

So, I have the support system on this site. I'd also like to make use of the FAQs because they are integrated. However, the FAQs seem to only be viewable on the front end if the user is logged in.

I'd like to make the FAQ section viewable to everyone and only the tickets require login. Please let me know how this is possible.



  • Milan

    Hello @Micha,

    I hope you are having a good day and thanks for asking us. :slight_smile:

    First let me tell you how our Support System protects FAQ Pages. :slight_smile:

    It determine which user can access FAQ pages by role based access. So lets say user "A" wants to access FAQ page, and he has "editor" role assigned to him. Then If you've allowed editor to view and access FAQ page via Support > Settings > User roles that can see the FAQs.

    So having this said if you want to make all FAQ pages publicly available please uncheck all the check-boxes next to possible roles via Support > Settings > User roles that can see the FAQs. I've attached screenshot for visual help. :slight_smile:

    I hope this helps you.

    Please let me know if there is anything else I can help you with.

    Warmest Regards,

  • Alex Stine

    Could you please try this code?
    This goes in functions.php or a mu-plugin.
    More on mu-plugins:

    add_filter( 'support_system_user_can', 'my_function', 10, 3 );
    function my_function( $user_can, $user_id, $cap ) {
        if ( $cap === 'read_faq' )
            return true;
        return $user_can;

    Hope this helps.
    Thanks :slight_smile:

  • Micha

    Okay, so not only does the plugin not work in the way you thought it did, but that snippet doesn't work either. I uploaded a blank functions plugin which I use to insert php snippets that are plugin related instead of building into the theme functions.php.

    As soon as I did, I got this screen shot saying there was a fatal error.

    Can you please offer me another solution? I'd prefer you guys just make an update to the plugin that makes this function like you guys said it does. However, a working php snippet would suffice for now.

    Please see attached. Thanks and please let me know when we have a solution.


  • Micha

    Hey... you're right that it does work in the theme's function.php.

    However, it's not good practice to place plugin functions into the theme. The entire point of a plugin is to separate "function" from "design".

    I'd like to have a solution that works in a custom plugin, or I'd like you guys to update your plugin with a selection that makes this possible directly. Either way would be a good permanent solution for me.

    For now though, I'll leave it in the theme, but I do want to get it out of there as soon as possible.

    Thanks and please let me know. :slight_smile:


  • Jeremy

    To extend the existing scope of some plugins, it's often required to make theme level code changes. I would recommend using a child theme and placing any coding changes within its function.php. That way if you ever have to update the parent theme, you won't lose out on any changes. Same goes for CSS.
    See below for the official Wordpress article on child themes, and a plugin my company uses to create/edit them easily

  • Milan

    Hello @Micha, @Alex and @Brad

    Hope you all are doing well. :slight_smile:

    First of thanks @Alex for providing working code snippet to our community member. Dear @Brad your suggestion about child theme is definitely good way to go. Most of time people extend their themes just to be sure they don't wipe our their changes during update. So any solution which prevents member from this loss is good one according to me. :slight_smile: We really appreciate your and @Alex efforts of helping community member.

    Dear @Micha, error which came out is basically means you forgot to include "<?php" at the start of your code snippet. Please do so and let us know if it solves your issue or not. If not then please do enable support staff access so that I can check in depth regarding this issue. If you don't know how you can enable support staff access please go through this manual.

    Warmest Regards,

  • Micha

    Hey guys and thanks for the feedback.

    I'm well aware of the benefits of a child theme and of course I am using one. This is a custom child theme for the genesis framework, which we use almost exclusively.

    I'm also aware that I can put this code in the theme's functions.php and it does work there. My issue here is that, like Alex above, I simple would rather put functions not related to themes into a plugin. This helps keep the design and function separate, which is a practice we try our absolute best to adhere to at all times.

    As to the multiple notes about forgetting the "<?php" at the start, this simply isn't true. If you look above at my attached screen shot, you'll see this basic plugin is nothing more than an empty php doc with proper opening and closing tags, ready to insert functions as needed. I made this basic plug a long time ago for just such minor function insertions that don't belong in the theme and it's always worked flawlessly, until now.

    Here's the entire code of the plugin, with the open and close tags, along with the snippet provide, in my plugin.

    Plugin Name: MVMG Site Plugin
    Description: Site specific code changes. Please do not deactivate or delete.
    Author: Multiverse Media Group
    Version: 1.0
    Author URI:
    /* Start Adding Functions Below this Line */
    add_filter( 'support_system_user_can', 'my_function', 10, 3 );
    function my_function( $user_can, $user_id, $cap ) {
        if ( $cap === 'read_faq' )
            return true;
        return $user_can;
    /* Stop Adding Functions Below this Line */

    As you can see, this should work, but instead causes a fatal error that makes the plugin disable itself, which is another good reason to add this stuff into a plug instead of the theme. If you add this into a theme and it doesn't work, you normally get a white screen. If you do it in a plugin, the plugin just disables itself, leaving the rest of your site untouched.

    Anyways... any insight into why this wouldn't work in this plugin other than the opening tags?


  • Jeremy

    Try removing the PHP closer "?>". I've had similar issues in the past, and for some reason extraneous closing braces in certain files will cause plugin/theme failure. It may be causing an unexpected exit point when Wordpress executes/interprets the code.

    Not entirely sure why this happens. It seems to be some issue within the actual Wordpress core, and doesn't happen every time.

    If you open the editor on "most" plugins, you'll see their core php file doesn't close out the php tag.

    Let me know if this fixes anything. If not, I'll attempt to duplicate the issue you're having on one of our development installs.

  • Jeremy

    I found this on the Wordpress forums for you, could be whatever text/file editor you use is adding odd EOF/EOL characters that are failing to interpret outside of <?php ?>:

    When you are distributing files and can expect users to be using dodgy editors that add extra lines or erroneous spaces on the end of files..... and such.....
    It's quite easy for extra spaces to end up on the end of a file, and if you're using several includes tracking these spaces down can be a pain, especially if you're dealing with lots of files... spaces after closing PHP tags is known to cause various issues including invalid headers...
    Of course there are cases when not using closing tags causes problems to, so it's catch 22...
  • Milan

    Hello @Micha,

    Hope you are doing well. :slight_smile:

    Would you be able to send in your FTP and wp-admin credentials so I could take a look?

    You can send the info through our private contact form:

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me :slight_smile:

    Send in:

    Subject: "Attn: Milan Savaliya"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Once we have this information then I can debug the issue further :slight_smile:

    Look forward to hearing back!


  • Micha

    Hey guys... Brad's solution of removing the end php tag fixed the problem for me. I had no idea that was a possibility so thanks.

    No, I have the snippet in a MU plug and out of the theme. Anyways, thanks for the snippet and for the help getting it working. Much appreciated everyone. :slight_smile:

    Please do pass on the recommendation to add this as a feature in the core of the plugin though. It would be much easier if it was a checkbox. :slight_smile: