Viewing 12 replies - 16 through 27 (of 27 total)
  • @karl,

    If there was no closing PHP tag you may have created a corrupt file by adding in another opening tag, try removing both of the PHP tags you added and see if that works.

    If not please can you post the entire file on PasteBin or similar.

    I’m using the twenty twelve theme with child theme and I’ve not amended the core functions file at all.
    Having looked at other 2012 installs, none of them seem to have a closing php tag either.

    Here’s the code: https://pastebin.com/82CytPsW

    @karl,

    The file you have added to the pastebin is the core functions.php file from the TwentyTwelve theme but it does not contain the code snippet from the comments above. Is this the file from your site?

    That’s right, the code in my child theme functions file is here : https://pastebin.com/E2sdEqbh

    @karl,

    Does it work if you move the code from the child theme functions.php file to the main theme functions.php file?

    Nope, copied the above code into the parent functions file and an editor login still can’t see and manage subscribers.

    @karl,

    Face palm!! Can’t believe I missed this for so long! The hook name in the above code is wrong so it’s never going to work. I was thrown off as the OP had it working. The code you need for the child theme functions.php file is this:

    <?php
    function s2_admin_changes( $capability, $menu ) {
    	if ( $menu == 'manage' ) {
    		return 'edit_posts';
    	}
    	return $capability;
    }
    add_filter('s2_capability', 's2_admin_changes', 10, 2);
    ?>

    I’ve fixed the hook name and also used ‘edit_posts’ so the menu will only show to Editors and above – not Subscribers and above.

    Huge thanks Matt, your tenacity is much appreciated and it now works just fine.

    I’ve just made a small donation to your cause. Hopefully it’s enough to buy you a big coffee (or beer, as the case may be).

    @karl,

    Thank you very much indeed for your donation, your gesture is very much appreciated. It might be a beer celebrating cracking this one as I was really scratching my head! ??

    Sorry to bring this one up again but now i need to add the code to the core functions file but when I do it makes a mess of the site.

    Can you help?

    cheers
    Karl

    @karl,

    I’m not sure what you mean by “add the code to the core functions file”, can you be a little more specific? Do you mean you need to add this to the parent functions.php file of your theme rather than the child theme?

    It may be a case of looking whether you need the opening (<?php) and closing (?>) PHP tags, they may not be needed now.

    No worries on this, worked around it.

    thanks again
    Karl

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Allowing Editors to see the Subscriber list?’ is closed to new replies.