brook1979
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: "add new" postNOPE, still getting the same errors! But im sure its just something like a closing bracket or opening one BUT i cant spot it! Its so frustrating when you cant spot this stuff 🙂 i guess this is what the learning curve is.
Forum: Fixing WordPress
In reply to: "add new" postPlease don’t apologize, ITS FINE! i appreciate the help and you taking the time to help!
OK, will test this now!Carl
Forum: Fixing WordPress
In reply to: "add new" postHi RSP,
Cheers for the quick help, really do appreciate it, ive been trying this for a couple of days now!
Ok, i just put the new code in DW and that to is showing a syntax error! Its like theres a closing missing or something!??
Cheers again for the help.
Carl
Forum: Fixing WordPress
In reply to: "add new" postHi RSP,
Thanks for that BUT there seems to be a problem….i made the changes as you mentioned above and so my code is now like this (below)…But this is causing syntax errors and displays the white page when trying to update the functions.php file. SO i used DW to try and see if i can see where the problem is but i cant seem to figure out what it is..
Can you help with this??
//functions hooking to their actions add_action('admin_init','mod_cap'); add_action('admin_init','display_notice'); add_action('admin_menu','mod_umenu'); add_action('admin_menu','admin_redirect'); add_action('admin_head','hide_button'); //user roles without the subscriber. however, can be added function modify_cap() { $author_role = get_role('author'); $author_role -> remove_cap('publish_post'); $editor_role = get_role('editor'); $editor_role->remove_cap('publish_post'); $contributor_role = get_role('contributor'); $contributor_role -> remove_cap('publish_post'); } //unsetting the menu item and changing capability function mod_umenu() { global $submenu; unset($submenu['edit.php'][10]); $submenu['edit.php'][10][1] = 'publish_posts'; } //hiding the button function hide_buttons() { global $current_screen; if($current_screen->id == 'edit-post' && !current_user_can('publish_posts')) } function admin_redirect() { $result = stripos($_SERVER['REQUEST_URI'], 'post-new.php'); if ($result!==false && !current_user_can('publish_posts')) { } function permissions_admin_notice() { echo "<div id='permissions-warning' class='error fade'><p><strong>".__('You do not have permission to access that page.')."</strong></p></div>"; } function display_notice() { if($_GET['permissions_error']) { add_action('admin_notices', 'permissions_admin_notice'); } }[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]
Forum: Fixing WordPress
In reply to: "add new" postHi RSP,
Cheers for the reply; im almost their now! The plugins are great if you want your users NOT to be able to view post or “ADD NEW” post at all, i want my users to be able to view theirs and others and be able to only delete theirs WHICH is what i have accomplished up to now.
What i want to do is get EVERYONE who is NOT an administrator to NOT be able to access this page (page below) AND because i grant access to view the post-> all post page, USERS can see the “ADD NEW” button…..
/wp-admin/post-new.php
Thanks for helping RSP, very much appreciated.
Forum: Fixing WordPress
In reply to: "add new" postHi esmi, rspublishing,
Thanks for the replies! I have s2 member installed and the default role for my users is s2 level 1! I have it now set so that they can actually view their post and delete them (but not others, only their own), the only problem im having is that on the “post->all post” page there is a button called add new, and i thought the best way to do this rather than just hide it would be to restrict access to the page.
Hope this is a better explanation, thanks for the help AND if you can help me with this it will be very much appreciated.
carl
Sorry the “Paypal” buttons are what im referring to….
Forum: Fixing WordPress
In reply to: "Add New" page button in admin areaYeah true true….but i also removed capabilities (thanks to you)from any other user (just incase)and so as you said above it wont let them publish pages…and you were right the button does still appear..
So its all good, but thanks again Mitchell for all your help
Brook
Forum: Fixing WordPress
In reply to: "Add New" page button in admin areaThanks for all the help mitchell….but i DONE IT!!,,,,code below for anyone else trying this.
// functions.php
function hide_buttons()
{
global $current_screen;if($current_screen->id == ‘page’);
{
echo ‘<style>.add-new-h2{display: none;}</style>’;
}// for posts the if statement would be:
// if($current_screen->id == ‘edit-post’ && !current_user_can(‘publish_posts’))
}
add_action(‘admin_head’,’hide_buttons’);Forum: Fixing WordPress
In reply to: "Add New" page button in admin areaHi Mitchell,
Ok im done….ive installed this plugin now, but how do i do it so that it just removes the add new pages button…i still want the client to see and edit his pages that are already there…
Cheers for the help.
Brook
Forum: Fixing WordPress
In reply to: "Add New" page button in admin areaThanks for the help mitchell, but im determined to do this without installing a plugin….there must be a way, it’s just a button…lol
Thanks again.
Brook
Forum: Fixing WordPress
In reply to: "Add New" page button in admin areaHi Mitchell,
Thanks for your reply……i need to delete the button, its not a member site, just a standard website that the client dosnt need to include anymore pages and would so want it removed.
Can you help, im still searching but i cant find anywhere with instructions on how to remove it…im sure its something simple and maybe somethin i missed along the way.
Cheers again for the help….ps, the member plugin has been downloaded,thanks for that, will come in handy.
Forum: Fixing WordPress
In reply to: PLEASE HELP!! Blog permalinksHi Ipstenu,
Evrything i have tried has failed, i switched themes and that didnt help, i very rarely quit on problems i have to face, but this is beatin the crap out of me…lol
heres the .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
Forum: Fixing WordPress
In reply to: PLEASE HELP!! Blog permalinksHi Ipstenu…
I tried another theme but it didnt work, cause me a few problems to, which i managed to solve…Ok heres where im upto, the latest news page is now where my post are appearing, but if i change the settings within “settings” reading settings” to show the homeage and then the post pages as the “news” page, the news page then starts re-driecting to the home page.
????Cheers again for the help.
Brook
Forum: Fixing WordPress
In reply to: PLEASE HELP!! Blog permalinksif this cant be helped….how would i change it so each post would have “good4rentals.com/latest-news????