Stop Authors from submitting spam post

If your really worried I would probably create custom write panels or custom meta boxes tied into custom post types. That way you can make the custom post types based on user role and control what shows up very easily. For instance you can make a custom post type called “tweens” with the user role … Read more

Make ‘Page’ slug the ‘index’

I would take the current code you have and drop it into a page template called tpl-news.php or whatever you choose. Add the following to the header before your index.php code: <?php /* Template Name: News */ //Add your index.php code here //You can also use wp_redirect(home_url()) here as well if I misunderstood your question … Read more

Custom background for the index page only?

You can check in your callback function if you are an the front page. Sample code for the theme’s functions.php: add_action( ‘after_setup_theme’, ‘wpse_67480_theme_setup’ ); function wpse_67480_theme_setup() { $bg_options = array ( ‘wp-head-callback’ => ‘wpse_67480_background_frontend’, ‘default-color’ => ‘f0f0f0’, ‘default-image’ => ”, ); add_theme_support( ‘custom-background’, $bg_options ); add_theme_support( ‘custom-header’, array ( ‘width’ => 960, ‘height’ => 200, … Read more

One post on frontpage and an archive page

Alter the main query for the front/home page with is_front_page() and/or is_home(), like shown below: add_action(‘pre_get_posts’,’wpse104878_alter_main_query’); function wpse104878_alter_main_query($query){ if ( is_admin() || ! $query->is_main_query() ) { return; } if( $query->is_main_query() && is_front_page() || is_home() ){ $query->query_vars[‘posts_per_page’] = ‘1’; } } The archive page should work, if underscore starter theme has an template for it. You … Read more

Using page template as Static Front Page

If you want the page to display your blog posts then you need to either change the front page reading option to latest posts then use either index.php or create a new file named front-page.php. If you want your page query ordered by menu_order you need to add ‘orderby’ => ‘menu_order’ to the query.

Set static page as default front page on newly created sites in multisite

Try the following code. Based on these two Q&A’s (not tested): How to add Custom Blog Options to new blog setup form? Programmatically set page_on_front add_action( ‘wpmu_new_blog’, ‘process_extra_field_on_blog_signup’, 10, 6 ); function process_extra_field_on_blog_signup( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { switch_to_blog($blog_id); $homepage = get_page_by_title( ‘Sample Page’ ); if ( $homepage ) { update_blog_option( $blog_id, … Read more