Back to Blog breadcrumb in icon

Hi,
Im trying to add a ‘back to blog’ button/breadcrumb to be displayed on all posts pages. I did it once before in itegrity with the following code. But this is icon. I tried changing the word integrity to icon but that didint work. How can do this?
Heres a link to one of the posts: https://needleinthegrooveny.com/fire-island-weddings/

TIA,
Rena

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') ); ?>">&#60; Return to Blog</a>
		</div>
		<?php
}

Hello Rena,

Thanks for writing in!

Your new site is using Ethos and not Icon. Your code will be:

add_action( 'x_before_view_global__index', 'print_breadcrumb_for_category' );
add_action( 'x_before_view_ethos_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') ); ?>">&#60; Return to Blog</a>
		</div>
		<?php
}

Please let us know if this works out for you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.