How to display only sticky posts on my automatically generated front page?

WordPress saves sticky posts inside the option named sticky_posts. You can retrieve them via get_option(‘sticky_posts’). With that knowledge it is possible to change the query to only query for sticky posts, you usually do so via the pre_get_posts hook. add_action(‘pre_get_posts’, ‘WPSE_home_only_stickies’); function WPSE_home_only_stickies($query) { // only run for homepage & main query if ($query->is_home() && … Read more

No posts on front page

You don’t say if you are on wordpress.com or self-hosted, or which theme you are using. Does it help to look at WordPress display posts shortcode and put [display-posts] into your page content? https://en.support.wordpress.com/display-posts-shortcode/ If you are self-hosting and your theme supports it (most do), the Display Posts plugin enables and extends this function to … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)