Two loops on archive page

From your question it is not clear which posts you want to select precisely. In any case, you clearly want to display different posts than are normally presented on the archive page. This means you will need to make a different selection in your template, using wp_query. The trick is to select the right arguments. … Read more

Page redirects to archive

It seems like you have the same slug “news” for custom post type and page. If it is the case, I would like to recommend to change the slug for custom post type to something like “cpt_news” or anyone that you think is best.

List category posts alphabetically on archive.php

I suggest you use the pre_get_posts action hook provided by WordPress. Then, in your functions.php add the following code below: function custom_pre_get_posts($query) { // validate if(!is_admin() && $query->is_main_query()) { if(is_archive()) { $query->set(‘orderby’, ‘title’); // order posts by title $query->set(‘order’, ‘ASC’); // and in ascending order } } } add_action(‘pre_get_posts’, ‘custom_pre_get_posts’); You can learn more about … Read more

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