work on sthome and archive pages, template cleanup
This commit is contained in:
@@ -137,7 +137,7 @@ function dis2019_conditional_scripts()
|
||||
// Load dis-2019 styles
|
||||
function dis2019_styles()
|
||||
{
|
||||
wp_register_style('normalize', get_template_directory_uri() . '/normalize.css', array(), '1.0', 'all');
|
||||
wp_register_style('normalize', get_template_directory_uri() . '/css/normalize.min.css', array(), '1.0', 'all');
|
||||
wp_enqueue_style('normalize'); // Enqueue it!
|
||||
|
||||
wp_register_style('dis2019', get_template_directory_uri() . '/style.css', array(), '1.0', 'all');
|
||||
@@ -450,13 +450,22 @@ function dis_2019_more_posts_on_home(&$query)
|
||||
{
|
||||
|
||||
//Before anything else, make sure this is the right query...
|
||||
if (!$query->is_home()) {
|
||||
if (!$query->is_home() && !$query->is_archive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($query->is_home()) {
|
||||
$pposts = 14;
|
||||
}elseif ($query->is_tag()) {
|
||||
$pposts = 10;
|
||||
}else {
|
||||
$pposts = 11;
|
||||
}
|
||||
|
||||
|
||||
//set post_per_page if it's homepage
|
||||
if (!$query->is_paged) {
|
||||
$query->set('posts_per_page', 14);
|
||||
$query->set('posts_per_page', $pposts);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user