Static front page as parent of with child pages?

Are you just outputting the pages for the navigation with wp_list_pages() or a similar function? It might be better to use the WordPress Menu feature and create a menu for the navigation, then use wp_nav_menu() to display it. Alternatively, instead of setting a static page in the backend you can edit (or create) the home.php … Read more

Front page welcome message area

Create a page theme, then call it in index.php: $recent = new WP_Query( ‘page_id=**ID**’ ); while ( $recent->have_posts() ) : $recent->the_post(); ?><h3><?php the_title(); ?></h3><?php the_content(); endwhile;

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

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

Static front page – going against the grain

If you’ve got a front-page.php template, I think this will get used, even if you change the Reading -> Static Page settings: If you read https://codex.wordpress.org/Creating_a_Static_Front_Page you’ll see: ‘On the site front page, WordPress will always use the front-page.php template file, if it exists. If front-page.php does not exist, WordPress will determine which template file … Read more

Categories with post from child categories on front page

Normally you’d use the pre_get_posts filter for this, but for your specific case, since you probably want to customize how the posts are displayed (separately), I’d recommend setting a static front page and using a shortcode in the content that uses get_posts (yet this also means that your theme’s “Blog” template won’t be used.) eg. … Read more