Restrict Viewing of post on both front and backend?

to restrict on the back-end you can use the default author role. and on the front-end you ca use something like: function check_rights_8876(){ global $post,$current_user; $author_id=$post->post_author; get_currentuserinfo(); if ( is_user_logged_in() ) { if ( current_user_can(‘manage_options’) ){// admin return true; } if ($author_id = $current_user->ID ){// curent post author return true; } } return false; } … Read more

WordPress noob, assign custom stylesheet using @import or if? Didn’t work for me

There’s a part in your header template that’s already doing conditional loading: <?php if ( is_singular() ) wp_enqueue_script( ‘comment-reply’ ); ?> This code loads the JavaScript for comments into the queue; WordPress then loads all of the scripts when it fires the wp_head() trigger. My recommendation would be to use your functions.php file to register … Read more

What is theme-editor.tmp?

.tmp-files are temporarly files created by incomplete WordPress- or plugin actions. These files appear also in general computing. In this case, they are often created during plugin updates that are performed from the WordPress backend (wp-admin). If the plugin upgrade fails for some reason, or termitated by the user, the .tmp files may not be … Read more

Garbage in uploads folder

The easiest way would probably be: 1) perform a WordPress XML export ( Dashboard -> Tools -> Export ) 2) import into a clean WordPress install ( Dashboard -> Tools -> Import ) At this point, everything in the /uploads directory of the clean install is attached. You can now: 3) backup/delete your original /uploads … Read more

Best Practice for Displaying Categorized Posts on Front Page

You can use WP_Query in your template to select groups of posts by type, category, tag, custom taxonomy, meta field, etc., and create additional loops: <?php $news = new WP_Query(“post_type=mynews&posts_per_page=1”); while($news->have_posts()) : $news->the_post(); the_title(); endwhile; $events = new WP_Query(“cat=2&posts_per_page=3”); while($events->have_posts()) : $events->the_post(); the_title(); endwhile; // etc.. It’s up to you how to best organize your … Read more

Simplify the admin end

First, once you assign users to the role of Author or Editor they will see quite a few fewer menu items (Settings and Appearance goes away) – see Roles and Capabilities. Try creating a second account for yourself and seeing if that helps. You can then remove additional menu items using the Admin Menu Edtior … Read more