Hello Sarah,
To resolve your issue, because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.
After the child theme is set up, please add the following code in your child theme’s functions.php file
// Custom Parent Portfolio Link with Go Back function
// =============================================================================
if ( ! function_exists( 'x_ethos_entry_top_navigation' ) ) :
function x_ethos_entry_top_navigation() {
if ( x_is_portfolio_item() ) {
$link = "javascript:history.back();";
} elseif ( x_is_product() ) {
$link = x_get_shop_link();
}
$title = esc_attr( __( 'See All Posts', '__x__' ) );
?>
<div class="entry-top-navigation">
<a href="<?php echo $link; ?>" class="entry-parent" title="<?php $title; ?>"><i class="x-icon-th" data-x-icon-s=""></i></a>
<?php x_entry_navigation(); ?>
</div>
<?php
}
endif;
// =============================================================================
We would love to know if this has worked for you. Thank you.