Making draft page as the main page

Go to the “Settings” menu Then to “Reading” Click the “A static page” radio button next to “Front Page Displays” And select your “page-5” in the dropdown next to “Front Page”. Make sure you have a blog page selected as well. (The image is from the Codex. The correct buttons are not clicked but that … Read more

show recent posts php code error?

Looks like you have the Posts for Page plugin installed. I don’t know where you have put that code you mention, but the page is generated by the shortcode, which says that output should be limited to the beauty category. You probably don’t need to write code yourself. Read the manual of the plugin and … Read more

how to add a comment button to be displayed only for the posts in the home page [closed]

In the template part used in the loop on your home page, something like this should get you started. Someplace after the_content(); or the_excerpt(), depending on what you’re using. <?php if ( is_home() ) { ?> <a class=”button” href=”<?php echo esc_url( get_permalink() );?>#comments”> Comment Link Text </a> } ?> You can make it look like … Read more

Problem with older entries in homepage

Why don’t you try with default query and use like this if ( get_query_var(‘paged’) ) { $paged = get_query_var(‘paged’); } elseif ( get_query_var(‘page’) ) { $paged = get_query_var(‘page’); } else { $paged = 1; } $args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 6, ‘paged’ => $paged, ); query_posts($args); while (have_posts()): the_post(); // do something … Read more

Amend theme php to include certain category in header

You can use the action pre_get_posts. It gets fired after the query object is created but before the query is run. This is an example from the official documentary for displaying only one category: In your functions.php add the following: function my_home_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( ‘cat’, ‘123’ … Read more

Is it possible to create slug on homepage and how?

What you are asking would make those pages NOT be the home page, at least in WordPress’s definition of the homepage. If you want people to go straight to /some-page and not be able to access the root, then you would create a 301 redirect for this (but there will still technically be something on … Read more

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