Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter kevidoss

    (@kevidoss)

    Great! It’s fixed now. Thanks for your help ??

    Thread Starter kevidoss

    (@kevidoss)

    //standaard user roles verwijderen
    remove_role( 'subscriber' );
    remove_role( 'editor' );
    remove_role( 'contributor' );
    remove_role( 'author' );
    
    //nieuwe user roles toevoegen
    add_role('leerkracht', __(
        'Leerkracht'),
        array(
            'read'                  => true, // Allows the user to read
            'create_posts'          => true, // Allows user to create new posts
            'edit_posts'            => true, // Allows the user to edit their own posts
            'edit_others_posts'     => true, // Allows the user to edit others posts too
            'publish_posts'         => true, // Allows the user to publish posts
            'upload_files'          => true, // Allows the user to upload files
            'delete_posts'          => true, // Allows the user to delete posts
            'edit_published_posts'  => true, // Allows the user to edit published posts
            'manage_terms'          => true, // Allows the user to manage categories
            'edit_terms'            => true, // Allows the user to manage categories
            'delete_terms'          => true, // Allows the user to manage categories
            'assign_terms'          => true, // Allows the user to manage categories
            )
    );

    This is the code I used in my ‘funtions.php’ file to remove standard roles and add my custom role. This could be the wrong way to add the ‘manage_terms’ etc. I wasn’t completely sure what you meant (but I figured, since it works for the other capabilities why wouldn’t this)

    The only thing I use your folders for is to organise posts (so the pages and custom post are not enabled in the settings of your plugin).

    And yes, there is a large empty space (where the folders are visible in my admin account) and I also see the button in the top bar to toggle that panel (but this also doesn’t work unless I’m using my admin account). And no, the toolbar is also missing. It’s just a large empty space, so I also can’t add or remove folders. I hope this clears things enough to give you the right idea ??

    Thread Starter kevidoss

    (@kevidoss)

    That would actually be fine, so I just tried adding the ‘manage_categories’ to my ‘functions.php’ file but sadly that didn’t work. The entire folders structure is still invisible. I also tried adding the capabilities separately (manage_terms, etc) but that also didn’t help. Any more ideas I could try?

    Thread Starter kevidoss

    (@kevidoss)

    I’m not using a plugin to manage permissions. I’ve made a custom WordPress theme, so I just added a new user role (and removed most of the standard ones) in my functions.php file.

    So yes, assigning capabilities should work fine. The only problem is, I don’t know which specific capabilities I need for you plugin. Are the “assign_terms” and “edit_terms” capabilities you have used and if this is the case, did you use any other ones that I should add to give my user access?

    Thread Starter kevidoss

    (@kevidoss)

    Ah obviously it was going to be a ridiculous mistake… Thanks for fixing it ?? everything seems to work now

    Thread Starter kevidoss

    (@kevidoss)

    I’ve tried a few capabilities, I started with edit_published_posts because I knew my role had that. When I saw that didn’t work I went lower and even set it to read. Also it changed on my admin account too, so there is no option to create new quizzes anywhere.

    Thread Starter kevidoss

    (@kevidoss)

    Sorry, cried victory too soon. The “HD Quiz” tab shows up in the menu but I can only see the about page? There’s no option to create new questions?

    Thread Starter kevidoss

    (@kevidoss)

    Great, thanks for the quick response. Worked like a charm! ??

    Thread Starter kevidoss

    (@kevidoss)

    Hey Jeff, I think I have narrowed down the problem. My website uses a static front page and I used index.php and page.php to display my front page if it’s the home page.
    I have this as a line in both files “<?php if( is_home() || is_front_page() ) : ?>” and then I wrote the content that had to be shown on the front page. Then I ended with “<?php endif; ?>”

    Since the login page isn’t a home or front page, it shows a completely blank page (I didn’t define what had to be shown if it wasn’t home or front page). So I assume a could make a template file for the login page, that way the page.php will be overwritten. But I’m not really sure what the file should contain to show all of your content correctly…
    (But this could mean I’m close to solving my problem)

    Thread Starter kevidoss

    (@kevidoss)

    I didn’t see anything that could affect your plugin. I even tried deleting the contents of every page one by one to see if anything interfered… But I don’t have a lot of scripts (a script to enqueue jQuery and an Ajax call for some dynamic page linking system) and the PHP is almost all code from WordPress itself (just calling “the_title”, “the_content”, etc.) So I’m at a loss here…

    Thread Starter kevidoss

    (@kevidoss)

    So I tried changing the theme to see if that helps and in the ‘twenty seventeen’ theme by wordpress and there it works. I can see the login form and login and logout. So there is something that causes problems with my theme.

    • This reply was modified 6 years, 11 months ago by kevidoss.
    Thread Starter kevidoss

    (@kevidoss)

    The only other plugin I have installed is wp-featherlight. I disabled it but it made no difference. Could it be something in my theme? (The only thing I can think of is that I enqueued jQuery but I always made sure to use jQuery.function instead of $.function)

    Thread Starter kevidoss

    (@kevidoss)

    The shortcode is there in the back-end but when I use “inspect element” in my browser it just shows completely empty body. The only things between my body tags are the header and footer tags, no other content or anything related to the plugin.

Viewing 13 replies - 1 through 13 (of 13 total)