If its not frontpage

You have the WordPress function is_front_page() that you need to invert with “!” . if(!is_front_page() && in_category( array(10,11,12,13,14,15,18,19,20) ))

How to redirect WordPress home page to custom static HTML page

This code may help resolve the issue for this particular situation. Put this code in yor theme’s functions.php. add_action(‘template_redirect’, ‘default_page’); function default_page(){ if(is_home() or is_front_page()){ exit( wp_redirect(“http://path/to/your/html/file”)); } } Replace http://path/to/your/html/file to exact url of html file. I hope this helps.

is_home, and is_front_page conditional problem

Let’s see if I can confuse myself. If either of your two OR conditions is true the code executes. is_home and is_front_page can return true for different pages, negated in your case. If you have a static from page, which it sounds like you do, then is_home is the blog index page. Note: WordPress 2.1 … Read more

Pagination not working on home page

I had faced the same problem. And finally, I solved the problem. Getting the current Pagination Number <?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; ?> For getting the current pagination number on a static front page (Page template) you have to use the ‘page’ query variable. <?php $paged = (get_query_var(‘page’)) ? get_query_var(‘page’) : 1; … Read more

How to use custom Html file instead of wordpress homepage

I strongly advise you to heed the advice already given. If your PHP is well structured and you take advantage of caching methods, it won’t have a significant increase on your page load time. We’ve got pages with extremely complex queries that are hardly optimized, but using some clever caching methods, we’re able to get … Read more

How to use a specific category archive index as the site front page?

Create a file front-page.php with the following content: locate_template( ‘category-image-gallery.php’, TRUE, TRUE ); That’s all. For the theme’s functions.php If you want to restrict the front page content to posts from that category, filter the front page query: add_action( ‘pre_get_posts’, ‘wpse_74225_frontpage_categories’ ); function wpse_74225_frontpage_categories( $query ) { if ( $query->is_main_query() && is_front_page() ) { $query->set( … Read more