buttons to proper category archive

This commit is contained in:
jorge 2022-04-29 10:43:05 +02:00
parent 8df15bd96a
commit 0ed0c0c59b
3 changed files with 18 additions and 18 deletions

View File

@ -76,8 +76,8 @@
<aside> <aside>
<?php //get_template_part( 'template-parts/navigation', 'prevnext' ); ?> <?php //get_template_part( 'template-parts/navigation', 'prevnext' ); ?>
<nav> <nav>
<div class="post-previous"><?php previous_posts_link( __( 'Newer posts &rarr;', 'foundationpress' ) ); ?></div> <div class="post-next"><?php next_posts_link( __( '&larr; Older', 'foundationpress' ) ); ?></div>
<div class="post-next"><?php next_posts_link( __( '&larr; Older posts', 'foundationpress' ) ); ?></div> <div class="post-previous"><?php previous_posts_link( __( 'Newer &rarr;', 'foundationpress' ) ); ?></div>
<?php <?php
// button load more simple // button load more simple
// echo '<a class="button hollow" href="' . esc_url( get_category_link( get_cat_ID($thiscategory) ) ) . '">'; // echo '<a class="button hollow" href="' . esc_url( get_category_link( get_cat_ID($thiscategory) ) ) . '">';

View File

@ -67,8 +67,8 @@
</main> </main>
<aside> <aside>
<nav> <nav>
<div class="post-previous"><?php previous_posts_link( __( 'Newer posts &rarr;', 'foundationpress' ) ); ?></div> <div class="post-next"><?php next_posts_link( __( '&larr; Older', 'foundationpress' ) ); ?></div>
<div class="post-next"><?php next_posts_link( __( '&larr; Older posts', 'foundationpress' ) ); ?></div> <div class="post-previous"><?php previous_posts_link( __( 'Newer &rarr;', 'foundationpress' ) ); ?></div>
</nav> </nav>
</aside> </aside>
</section> </section>

View File

@ -67,22 +67,22 @@
</article> </article>
<?php endwhile;//end of the loop ?> <?php endwhile;//end of the loop ?>
</main> </main>
<?php wp_reset_postdata(); ?> <aside>
<?php else : //if no post in query ?> <?php //get_template_part( 'template-parts/navigation', 'prevnext' ); ?>
<nav>
<?php
// button load more simple
echo '<a class="button hollow" href="' . esc_url( get_site_url( null, $thiscategory ) ) . '">';
echo 'load more ' ;
echo $thiscategory;
echo '</a>';
?>
</nav>
</aside>
<?php wp_reset_postdata(); ?>
<?php else : //if no post in query ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p> <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
</main> </main>
<?php endif; ?> <?php endif; ?>
<aside>
<?php //get_template_part( 'template-parts/navigation', 'prevnext' ); ?>
<nav>
<?php
// button load more simple
echo '<a class="button hollow" href="' . esc_url( get_category_link( get_cat_ID($thiscategory) ) ) . '">';
echo 'load more ' ;
echo $thiscategory;
echo '</a>';
?>
</nav>
</aside>
</section> </section>