• Resolved imprint web design

    (@imprint-web-design)


    i activated this plugin but after looking it over, i realized it was more than i needed so it was deactivated and deleted. now, when i add a new user to my wordpress website, under ‘role’ i still have the ‘MSTW Schedules & Scoreboards Admin’ and MSTW Admin’. how do i get rid of these as choices since i no longer have the plugin?
    THANKS!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mark O’Donnell

    (@markodonnell)

    Hi imprint web design,
    Great question. First time I’ve seen this one! I don’t believe you can remove a role via the WP Admin interface. But you can do it via code. Add this code to your current theme’s functions.php file:

    $wp_roles = new WP_Roles(); 
    $wp_roles->remove_role("mstw_ss_admin")

    After you’ve run it once, and checked the roles list, you can remove these lines of code.

    If you want to see a list of all your roles and their slugs, here’s quick trick. Add the following lines of code to any template file in your theme, say footer.php.

    <?php 
    $wp_roles = new WP_Roles(); 
    $names = $wp_roles->get_names(); 
    print_r($names); 
    ?>
    

    -Mark

    Thread Starter imprint web design

    (@imprint-web-design)

    Mark,
    thanks for the reply. i assumed it would have to be done with code.
    is the first bit of code one and done? ie: do i add it, strip the role ‘mstw_ss_admin’ and then remove the code? or leave it in place?
    where do i see the results on the second bit of code?
    thanks again!!

    Rick O’Donnell

    p.s. great name ??

    Plugin Author Mark O’Donnell

    (@markodonnell)

    Ah yes, I thought that might me my long lost cousin from Donegal!

    I think your first question was answered:

    After you’ve run it once, and checked the roles list, you can remove these lines of code.

    As for your second question, where the results appear depends on which template you choose and where you insert the code in that template. If you put them in footer.php as suggested above, they will appear in the footer (bottom) of every page (unless your theme does something very non-standard).

    -Mark

    Thread Starter imprint web design

    (@imprint-web-design)

    Mark,

    I added the first bit of code and after i save it, my screen goes blank. the website is still up but i cant access any pages on the backend. they are all white with no content or anything. i went into my server cpanel and deleted the code and all is well again.

    do you have any other suggestions?

    Plugin Author Mark O’Donnell

    (@markodonnell)

    Looks like I lost a ‘;’ in the cut and paste. This should be better:

    $wp_roles = new WP_Roles(); 
    $wp_roles->remove_role("mstw_ss_admin");
    

    BTW, the thing to do would be to turn on debug, probably dumping it to the debug.log in your wp-content directory. There’s a long post on www.ads-software.com about WP debugging and how to do this. If you did so, you would see there was a syntax error at that line in functions.php.

    -Mark

    Thread Starter imprint web design

    (@imprint-web-design)

    worked like a champ. roles removed.

    thanks for your help !!

    p.s. even if i saw the error in the debug.log, and on what line, i wouldnt know what to do with it. i am good with html/css but really know nothing about php. would love to learn it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘roles still sow after plugin deletion’ is closed to new replies.