How do I turn off the blog and archives?

You are already using pages which does not work the same as posts. You have to remember, pages don’t have taxonomies and they are excluded from the main query by default on all archive pages and the homepage, so there can never be any links to any kind of archive. Archive pages, whether date, category … Read more

Exclude post category in a blog page

In your functions.php file, use pre_get_posts and swap out the -1 in the following code with the category I.D you want to exclude from your posts page. function exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( ‘cat’, ‘-1’ ); } } add_action( ‘pre_get_posts’, ‘exclude_category’ );

Display subcategories in dropdown

You can use a similar block of code to display the categories in a dropdown. I have picked the following example from WordPress codex article on get_categories(): <select name=”event-dropdown” onchange=”document.location.href=this.options[this.selectedIndex].value;”> <option value=””><?php echo esc_attr(__(‘Select Event’)); ?></option> <?php $categories = get_categories(‘child_of=10’); foreach ($categories as $category) { $option = ‘<option value=”/category/blog/’.$category->category_nicename.'”>’; $option .= $category->cat_name; $option .= ‘ … Read more

Is there a way to multiply archive loop results sequentially?

<?php $counter = 1; if(have_posts()) : while(have_posts()) : the_post(); ?> <?php if($counter == 1) : ?> <div class=”row clear” style=”margin-bottom:0px;”> <div class=”col-md-12 border-12″> <a class=”thumb” href=”https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”><?php the_post_thumbnail(‘category-thumbnail’); ?></a> <div class=”blog-details-wrapper clear”> <h2 class=”title”> <a href=”https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a> </h2> <span class=”date”><?php the_time(‘F j, Y’); ?> <?php … Read more

Later blog post pages give 404 error

First, try rebuilding your permalinks. Go to Settings >> Permalinks and click Save, which will rebuild them. If that doesn’t work, go into your Settings >> Reading >> Blog pages show at most setting and try increasing or decreasing that and see how that changes things. Some themes have a setting that lets you adjust … Read more

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