Hi,
Ive tried many of the codes mentioned in the forum to add breadcrumbs to Ethos but nothing works.
In the past I asked for breakcrumbs going back to the blog page from all single posts and this code below works, but I want all the single archives posts to go back to the main archive pages. as well as single posts going back to the blog.
Can I edit this code to function that way:
TIA!
add_action( 'x_before_view_global__index', 'print_breadcrumb_for_category' );
add_action( 'x_before_view_integrity_content', 'print_breadcrumb_for_post' );
function print_breadcrumb_for_category () {
if ( is_category() ) custom_breadcrumbs();
}
function print_breadcrumb_for_post () {
if ( is_singular( 'post' ) ) custom_breadcrumbs();
}
function custom_breadcrumbs() { ?>
<div class="custom-breadcrumb">
<a href="<?php echo get_permalink( get_option('page_for_posts') ); ?>">< Return to Blog</a>
</div>
<?php
}