I actually struggling with problem on this URL: Problematic URL
The problem can be described like this: Page on that URL was set as main blog page in WordPress settings, but the page does not output list of posts, it just only outputs name of page "Herní články" and button read more (číst více) links to this page.. article id="post - id" showing classes "page type-page" and I really don't know how to resolve this problem.. The archive.php code is here:
<?php get_header(); ?>
<?php
$title_style = 'margin-bottom: 50px;';
$blog_content_style = 'margin-bottom: 30px;';
?>
<div id="primary" style="<?php echo esc_attr($blog_content_style); ?>">
<?php
$title_color = (!empty($tdl_options['tdl_blog_title_color_scheme'])) ? $tdl_options['tdl_blog_title_color_scheme'] : 'mta-light';
$default_image_header = "";
if ( (isset($tdl_options['tdl_blog_default_header_bg']['url'])) && (trim($tdl_options['tdl_blog_default_header_bg']['url']) != "" ) ) {
$default_image_header = $tdl_options['tdl_blog_default_header_bg']['url'];
}
if ($default_image_header) {
$header_content_type = 'image';
$image_header = $default_image_header;
} else {
$header_content_type = '';
}
$title_align = $tdl_options['tdl_blog_title_align'];
?>
<?php
if ($header_content_type == 'image')
echo '<div style="' . $title_style . 'background-image:url(' . $image_header . ')">';
else
echo '<div style="' . $title_style . '">';
?>
<div ></div>
<div >
<div >
<?php
if ((isset($tdl_options['tdl_shop_breadcrumb'])) && ($tdl_options['tdl_shop_breadcrumb'] == "1"))
{
// BREADCRUMBS
echo woodstock_breadcrumbs();
}
?>
<h1 >
<?php
if ( is_category() ) :
single_cat_title();
elseif ( is_tag() ) :
single_tag_title();
elseif ( is_author() ) :
/* Queue the first post, that way we know
* what author we're dealing with (if that is the case).
*/
the_post();
printf( esc_html__( 'Author: %s', 'woodstock' ), '<span >' . get_the_author() . '</span>' );
/* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
elseif ( is_day() ) :
printf( esc_html__( 'Day: %s', 'woodstock' ), '<span>' . get_the_date() . '</span>' );
elseif ( is_month() ) :
printf( esc_html__( 'Month: %s', 'woodstock' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
elseif ( is_year() ) :
printf( esc_html__( 'Year: %s', 'woodstock' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
esc_html_e( 'Asides', 'woodstock' );
elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
esc_html_e( 'Images', 'woodstock');
elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
esc_html_e( 'Videos', 'woodstock' );
elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
esc_html_e( 'Quotes', 'woodstock' );
elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
esc_html_e( 'Links', 'woodstock' );
else :
esc_html_e( 'Archives', 'woodstock' );
endif;
?>
</h1>
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div ><p>%s</p></div>', $term_description );
endif;
?>
</div><!-- .large-12 -->
</div><!-- .row -->
</div><!-- .site_header -->
<?php if ( $blog_with_sidebar == "yes" ) : ?>
<div ><div >
<?php endif; ?>
<div id="content" role="main">
<?php if ( have_posts() ) : ?>
<!--masonry style-->
<?php if ( $blog_with_sidebar == "blog-masonry" ) : ?>
<div >
<div >
<div >
<div >
<div id="filters" >
<button data-filter="*">show all</button>
</div>
<div >
<div ></div>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<div >
<div >
<?php get_template_part( 'includes/content', get_post_format() ); ?>
<hr />
</div><!--blog-post-inner-->
</div><!-- .blog-post-->
<?php endwhile; ?>
</div><!-- .blog-isotope -->
</div><!-- .blog-isotop-container-->
</div><!--.large-12-->
</div><!--.row-->
<?php woodstock_content_nav( 'nav-below' ); ?>
</div><!--blog-isotop-master-wrapper-->
<!--default style-->
<?php else : ?>
<?php if(is_author()) {
echo '<h1 >Články od autora: '.get_the_author_meta('display_name', $author_id).'</h1>';
echo '<div >'.get_the_author_meta('description', $author_id).'</div>';
} ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'includes/content', get_post_format() ); ?>
<hr />
<?php endwhile; ?>
<?php woodstock_content_nav( 'nav-below' ); ?>
<?php endif; ?>
<!--no posts found-->
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</div><!-- #content -->
<?php if ( $blog_with_sidebar == "yes" ) : ?>
</div><!-- .columns -->
<?php endif; ?>
<?php if ( $blog_with_sidebar == "yes" ) : ?>
<div >
<div >
<div >
<?php get_sidebar(); ?>
</div>
</div>
</div><!-- .columns -->
<?php endif; ?>
<?php if ( $blog_with_sidebar == "yes" ) : ?>
</div><!-- .row -->
<?php endif; ?>
<?php if ( $blog_with_sidebar == "yes" ) : ?>
<?php if (is_active_sidebar( 'sidebar')) : ?>
<div id="button_offcanvas_sidebar_left"><i ></i></div>
<?php endif; ?>
<?php endif; ?>
</div><!-- #primary -->
<?php get_footer(); ?>
Same code works well on this URL I've already tried update WordPress but it still doesn't work, so I'm helpless..
CodePudding user response:
Problem was resolved by switching theme, so, it was maybe some bug in WP.