Portfolio Not functioning in Firefox. Its working in all other browsers

The portfolio doesnt seem to be working in Firefox. I added a custom snippet to the functions.php file to allow cornerstone to be used on those pages. I wonder if that is affecting it. Please advise.

https://spoleta.wpengine.com/portfolio/Automotive/

Login has been added as a private note.

Hi there,

There seems to be a code in the custom JS panel that is causing this issue.

First, the lines:

  // Entry Navigation
// =============================================================================

if ( ! function_exists( 'x_entry_navigation' ) ) :
  function x_entry_navigation() {

  $stack = x_get_stack();

  if ( $stack == 'ethos' ) {
    $left_icon  = '<i class="x-icon-chevron-left" data-x-icon="&#xf053;"></i>';
    $right_icon = '<i class="x-icon-chevron-right" data-x-icon="&#xf054;"></i>';
  } else {
    $left_icon  = '<i class="x-icon-arrow-left" data-x-icon="&#xf060;"></i>';
    $right_icon = '<i class="x-icon-arrow-right" data-x-icon="&#xf061;"></i>';
  }

  $is_ltr    = ! is_rtl();
  $prev_post = get_adjacent_post( false, '', false );
  $next_post = get_adjacent_post( false, '', true );
  $prev_icon = ( $is_ltr ) ? $left_icon : $right_icon;
  $next_icon = ( $is_ltr ) ? $right_icon : $left_icon;

  ?>

should not be in the custom JS as this is a PHP code. Kindly double check the custom codes you have to avoid errors.

Hope this helps.

Thank you so much that worked perfectly.

I have one other question while we are at it.

I added some custom code to the breadcrumbs to allow it to show the parent category…however now I lost the ability to go back to the main “portfolio page” via breadcrumbs.

I only want them to show when they are in the portfolio,

My preference would be it to show

House Icon Portfolio Category Portfolio Item

Is that possible?

Thanks for you assistance.

Hello There,

Could you please post the custom code that you are using for the breadcrumbs to allow it to show the parent category in your next reply? We want to check and try it out in our local testing server.

Thank you in advance.

// Additional Functions
// =============================================================================

// Breadcrumbs Display Category Name
// =============================================================================

function get_breadcrumb_category( $cat ) {
$post = get_post( $post->ID );
$post_type = $post->post_type;
$taxonomy = $cat;

$f_categories = wp_get_post_terms( $post->ID, $taxonomy );
$f_category = $f_categories[0];

if ( $f_category->parent != 0 ) {
$f_category_id = $f_category->parent;
$parent_array = get_term_by(‘id’, $f_category_id, $taxonomy, ‘ARRAY_A’);
$f_category_name = $parent_array[“name”];
$term_link = get_term_link( $f_category_id, $taxonomy );
} else {
$f_category_id = $f_category->term_id;
$f_category_name = $f_category->name;
$term_link = get_term_link( $f_category_id, $taxonomy );
}

if ( $f_categories && ! is_wp_error($f_categories) ) {
return ’ ’ . $f_category_name . ’ ';
} else {
return ‘’;
}
}
function x_breadcrumbs() {

if ( x_get_option( 'x_breadcrumb_display', '1' ) ) {

  GLOBAL $post;

  $is_ltr         = ! is_rtl();
  $stack          = x_get_stack();
  $delimiter      = x_get_breadcrumb_delimiter();
  $home_text      = x_get_breadcrumb_home_text();
  $home_link      = home_url();
  $current_before = x_get_breadcrumb_current_before();
  $current_after  = x_get_breadcrumb_current_after();
  $page_title     = get_the_title();
  $blog_title     = get_the_title( get_option( 'page_for_posts', true ) );
  $post_parent    = $post->post_parent;

  if ( X_WOOCOMMERCE_IS_ACTIVE ) {
    $shop_url   = x_get_shop_link();
    $shop_title = x_get_option( 'x_' . $stack . '_shop_title', __( 'The Shop', '__x__' ) );
    $shop_link  = '<a href="'. $shop_url .'">' . $shop_title . '</a>';
  }

  echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter;

    if ( is_home() ) {

      echo $current_before . $blog_title . $current_after;

    } elseif ( is_category() ) {

      $the_cat = get_category( get_query_var( 'cat' ), false );
      if ( $the_cat->parent != 0 ) echo '<a href="'.get_permalink(102).'">'.get_the_title(102) .'</a>';
      echo $current_before . single_cat_title( '', false ) . $current_after;

    } elseif ( x_is_product_category() ) {

      if ( $is_ltr ) {
        echo $shop_link . $delimiter . $current_before . single_cat_title( '', false ) . $current_after;
      } else {
        echo $current_before . single_cat_title( '', false ) . $current_after . $delimiter . $shop_link;
      }

    } elseif ( x_is_product_tag() ) {

      if ( $is_ltr ) {
        echo $shop_link . $delimiter . $current_before . single_tag_title( '', false ) . $current_after;
      } else {
        echo $current_before . single_tag_title( '', false ) . $current_after . $delimiter . $shop_link;
      }

    } elseif ( is_search() ) {

      echo $current_before . __( 'Search Results for ', '__x__' ) . '"' . get_search_query() . '"' . $current_after;

    } elseif ( is_singular( 'post' ) ) {

      if ( get_option( 'page_for_posts' ) == is_front_page() ) {
        echo $current_before . $page_title . $current_after;
      } else {
        if ( $is_ltr ) {

          $f_category = get_the_category();

          if ( $f_category[0]->category_parent != 0 ) {
             $f_category_id = $f_category[0]->parent;
             $f_category_name = get_cat_name( $f_category_id );

             $f_subcategory_id = $f_category[0]->cat_ID;
             $f_subcategory_name  = get_cat_name( $f_subcategory_id );

             echo '<a href="' . get_category_link( $f_category_id ) . '">' . $f_category_name . '</a>' . $delimiter 
                  .'<a href="' . get_category_link( $f_subcategory_id ) . '">' . $f_subcategory_name . '</a>' . $delimiter . $current_before . $page_title . $current_after;
          } else {
             $f_category_id = $f_category[0]->term_id;
             $f_category_name = $f_category[0]->name;
             echo '<a href="' . get_category_link( $f_category_id ) . '">' . $f_category_name . '</a>' . $delimiter . $current_before . $page_title . $current_after;
          }

          
        } else {
          echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . get_permalink( get_option( 'page_for_posts' ) ) . '">' . $blog_title . '</a>';
        }
      }

    } elseif ( x_is_portfolio() ) {

      echo $current_before . get_the_title() . $current_after;

    } elseif ( x_is_portfolio_item() ) {

      $link  = x_get_parent_portfolio_link();
      $title = x_get_parent_portfolio_title();

      if ( $v = get_breadcrumb_category('portfolio-category') ) {
        $portfolio_category = $delimiter . $v;
      } else {
        $portfolio_category = '';
      }

      if ( $is_ltr ) {
        echo '<a href="' . $link . '">' . $title . '</a>' . $portfolio_category . $delimiter . $current_before . $page_title . $current_after;
      } else {
        echo $current_before . $page_title . $current_after . $portfolio_category . $delimiter . '<a href="' . $link . '">' . $title . '</a>';
      }

    } elseif ( x_is_product() ) {

     if ( $v = get_breadcrumb_category('product_cat') ) {
       $product_category = $delimiter . $v;
     } else {
       $product_category = '';
     }

      if ( $is_ltr ) {
        echo $shop_link . $product_category . $delimiter . $current_before . $page_title . $current_after;
      } else {
        echo $current_before . $page_title . $current_after . $product_category . $delimiter . $shop_link;
      }

    } elseif ( x_is_buddypress() ) {

      if ( bp_is_group() ) {
        echo '<a href="' . bp_get_groups_directory_permalink() . '">' . x_get_option( 'x_buddypress_groups_title', __( 'Groups', '__x__' ) ) . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
      } elseif ( bp_is_user() ) {
        echo '<a href="' . bp_get_members_directory_permalink() . '">' . x_get_option( 'x_buddypress_members_title', __( 'Members', '__x__' ) ) . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
      } else {
        echo $current_before . x_buddypress_get_the_title() . $current_after;
      }

    } elseif ( x_is_bbpress() ) {

      //remove_filter( 'bbp_no_breadcrumb', '__return_true' );

      if ( bbp_is_forum_archive() ) {
        echo $current_before . bbp_get_forum_archive_title() . $current_after;
      } else {
        echo bbp_get_breadcrumb();
      }

      //add_filter( 'bbp_no_breadcrumb', '__return_true' );

    } elseif ( is_page() && ! $post_parent ) {

      echo $current_before . $page_title . $current_after;

    } elseif ( is_page() && $post_parent ) {

      $parent_id   = $post_parent;
      $breadcrumbs = array();

      if ( is_rtl() ) {
        echo $current_before . $page_title . $current_after . $delimiter;
      }

      while ( $parent_id ) {
        $page          = get_page( $parent_id );
        $breadcrumbs[] = '<a href="' . get_permalink( $page->ID ) . '">' . get_the_title( $page->ID ) . '</a>';
        $parent_id     = $page->post_parent;
      }

      if ( $is_ltr ) {
        $breadcrumbs = array_reverse( $breadcrumbs );
      }

      for ( $i = 0; $i < count( $breadcrumbs ); $i++ ) {
        echo $breadcrumbs[$i];
        if ( $i != count( $breadcrumbs ) -1 ) echo $delimiter;
      }

      if ( $is_ltr ) {
        echo $delimiter . $current_before . $page_title . $current_after;
      }

    } elseif ( is_tag() ) {

      echo $current_before . single_tag_title( '', false ) . $current_after;

    } elseif ( is_author() ) {

      GLOBAL $author;
      $userdata = get_userdata( $author );
      echo $current_before . __( 'Posts by ', '__x__' ) . '"' . $userdata->display_name . $current_after . '"';

    } elseif ( is_404() ) {

      echo $current_before . __( '404 (Page Not Found)', '__x__' ) . $current_after;

    } elseif ( is_archive() ) {

      if ( x_is_shop() ) {
        echo $current_before . $shop_title . $current_after;
      } else {
        echo $current_before . __( 'Archives ', '__x__' ) . $current_after;
      }

    }

  echo '</div>';

}

}
// =============================================================================
// =============================================================================

I got it from this link

Hello There,

Thanks for updating in! Please be advised that this code is out dated.

// Breadcrumbs Display Category Name
// =============================================================================

function get_breadcrumb_category( $cat ) {
   $post = get_post( $post->ID );
   $post_type = $post->post_type;
   $taxonomy = $cat;
    
   $f_categories = wp_get_post_terms( $post->ID, $taxonomy );
   $f_category = $f_categories[0];

   if ( $f_category->parent != 0 ) {
      $f_category_id    = $f_category->parent;
      $parent_array     = get_term_by('id', $f_category_id, $taxonomy, 'ARRAY_A');
      $f_category_name  = $parent_array["name"];
      $term_link        = get_term_link( $f_category_id, $taxonomy );
   } else {
      $f_category_id    = $f_category->term_id;
      $f_category_name  = $f_category->name;
      $term_link        = get_term_link( $f_category_id, $taxonomy );
   }

   if ( $f_categories && ! is_wp_error($f_categories) ) {
      return '<a href="' . esc_url( home_url( '/portfolio/' ) ) . strtolower( $f_category_name ) . '"> ' . $f_category_name . ' </a>';
   } else {
      return '';
   }
}
function x_breadcrumbs() {

    if ( x_get_option( 'x_breadcrumb_display', '1' ) ) {

      GLOBAL $post;

      $is_ltr         = ! is_rtl();
      $stack          = x_get_stack();
      $delimiter      = x_get_breadcrumb_delimiter();
      $home_text      = x_get_breadcrumb_home_text();
      $home_link      = home_url();
      $current_before = x_get_breadcrumb_current_before();
      $current_after  = x_get_breadcrumb_current_after();
      $page_title     = get_the_title();
      $blog_title     = get_the_title( get_option( 'page_for_posts', true ) );
      $post_parent    = $post->post_parent;

      if ( X_WOOCOMMERCE_IS_ACTIVE ) {
        $shop_url   = x_get_shop_link();
        $shop_title = x_get_option( 'x_' . $stack . '_shop_title', __( 'The Shop', '__x__' ) );
        $shop_link  = '<a href="'. $shop_url .'">' . $shop_title . '</a>';
      }

      echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter;

        if ( is_home() ) {

          echo $current_before . $blog_title . $current_after;

        } elseif ( is_category() ) {

          $the_cat = get_category( get_query_var( 'cat' ), false );
          if ( $the_cat->parent != 0 ) echo '<a href="'.get_permalink(102).'">'.get_the_title(102) .'</a>';
          echo $current_before . single_cat_title( '', false ) . $current_after;

        } elseif ( x_is_product_category() ) {

          if ( $is_ltr ) {
            echo $shop_link . $delimiter . $current_before . single_cat_title( '', false ) . $current_after;
          } else {
            echo $current_before . single_cat_title( '', false ) . $current_after . $delimiter . $shop_link;
          }

        } elseif ( x_is_product_tag() ) {

          if ( $is_ltr ) {
            echo $shop_link . $delimiter . $current_before . single_tag_title( '', false ) . $current_after;
          } else {
            echo $current_before . single_tag_title( '', false ) . $current_after . $delimiter . $shop_link;
          }

        } elseif ( is_search() ) {

          echo $current_before . __( 'Search Results for ', '__x__' ) . '"' . get_search_query() . '"' . $current_after;

        } elseif ( is_singular( 'post' ) ) {

          if ( get_option( 'page_for_posts' ) == is_front_page() ) {
            echo $current_before . $page_title . $current_after;
          } else {
            if ( $is_ltr ) {

              $f_category = get_the_category();

              if ( $f_category[0]->category_parent != 0 ) {
                 $f_category_id = $f_category[0]->parent;
                 $f_category_name = get_cat_name( $f_category_id );

                 $f_subcategory_id = $f_category[0]->cat_ID;
                 $f_subcategory_name  = get_cat_name( $f_subcategory_id );

                 echo '<a href="' . get_category_link( $f_category_id ) . '">' . $f_category_name . '</a>' . $delimiter 
                      .'<a href="' . get_category_link( $f_subcategory_id ) . '">' . $f_subcategory_name . '</a>' . $delimiter . $current_before . $page_title . $current_after;
              } else {
                 $f_category_id = $f_category[0]->term_id;
                 $f_category_name = $f_category[0]->name;
                 echo '<a href="' . get_category_link( $f_category_id ) . '">' . $f_category_name . '</a>' . $delimiter . $current_before . $page_title . $current_after;
              }

              
            } else {
              echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . get_permalink( get_option( 'page_for_posts' ) ) . '">' . $blog_title . '</a>';
            }
          }

        } elseif ( x_is_portfolio() ) {

          echo $current_before . get_the_title() . $current_after;

        } elseif ( x_is_portfolio_item() ) {

          $link  = x_get_parent_portfolio_link();
          $title = x_get_parent_portfolio_title();

          if ( $v = get_breadcrumb_category('portfolio-category') ) {
            $portfolio_category = $delimiter . $v;
          } else {
            $portfolio_category = '';
          }

          if ( $is_ltr ) {
            echo '<a href="' . $link . '">' . $title . '</a>' . $portfolio_category . $delimiter . $current_before . $page_title . $current_after;
          } else {
            echo $current_before . $page_title . $current_after . $portfolio_category . $delimiter . '<a href="' . $link . '">' . $title . '</a>';
          }

        } elseif ( x_is_product() ) {

         if ( $v = get_breadcrumb_category('product_cat') ) {
           $product_category = $delimiter . $v;
         } else {
           $product_category = '';
         }

          if ( $is_ltr ) {
            echo $shop_link . $product_category . $delimiter . $current_before . $page_title . $current_after;
          } else {
            echo $current_before . $page_title . $current_after . $product_category . $delimiter . $shop_link;
          }

        } elseif ( x_is_buddypress() ) {

          if ( bp_is_group() ) {
            echo '<a href="' . bp_get_groups_directory_permalink() . '">' . x_get_option( 'x_buddypress_groups_title', __( 'Groups', '__x__' ) ) . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
          } elseif ( bp_is_user() ) {
            echo '<a href="' . bp_get_members_directory_permalink() . '">' . x_get_option( 'x_buddypress_members_title', __( 'Members', '__x__' ) ) . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
          } else {
            echo $current_before . x_buddypress_get_the_title() . $current_after;
          }

        } elseif ( x_is_bbpress() ) {

          //remove_filter( 'bbp_no_breadcrumb', '__return_true' );

          if ( bbp_is_forum_archive() ) {
            echo $current_before . bbp_get_forum_archive_title() . $current_after;
          } else {
            echo bbp_get_breadcrumb();
          }

          //add_filter( 'bbp_no_breadcrumb', '__return_true' );

        } elseif ( is_page() && ! $post_parent ) {

          echo $current_before . $page_title . $current_after;

        } elseif ( is_page() && $post_parent ) {

          $parent_id   = $post_parent;
          $breadcrumbs = array();

          if ( is_rtl() ) {
            echo $current_before . $page_title . $current_after . $delimiter;
          }

          while ( $parent_id ) {
            $page          = get_page( $parent_id );
            $breadcrumbs[] = '<a href="' . get_permalink( $page->ID ) . '">' . get_the_title( $page->ID ) . '</a>';
            $parent_id     = $page->post_parent;
          }

          if ( $is_ltr ) {
            $breadcrumbs = array_reverse( $breadcrumbs );
          }

          for ( $i = 0; $i < count( $breadcrumbs ); $i++ ) {
            echo $breadcrumbs[$i];
            if ( $i != count( $breadcrumbs ) -1 ) echo $delimiter;
          }

          if ( $is_ltr ) {
            echo $delimiter . $current_before . $page_title . $current_after;
          }

        } elseif ( is_tag() ) {

          echo $current_before . single_tag_title( '', false ) . $current_after;

        } elseif ( is_author() ) {

          GLOBAL $author;
          $userdata = get_userdata( $author );
          echo $current_before . __( 'Posts by ', '__x__' ) . '"' . $userdata->display_name . $current_after . '"';

        } elseif ( is_404() ) {

          echo $current_before . __( '404 (Page Not Found)', '__x__' ) . $current_after;

        } elseif ( is_archive() ) {

          if ( x_is_shop() ) {
            echo $current_before . $shop_title . $current_after;
          } else {
            echo $current_before . __( 'Archives ', '__x__' ) . $current_after;
          }

        }

      echo '</div>';

    }

}
// =============================================================================
// =============================================================================

This is no longer applicable to the latest release. Please do not use this code.

OK. I will delete that from my functions.PHP

however I would still like to have those breadcrumbs appear in the way i requested. Is that possible?

Hello There,

Thanks for updating in! It may only possible with custom override for the breadcrumb function. It is best that we will add this as a feature request so that an official code from the developers will be used. I already added this to our feature lists so that our developers will be made aware of and this can be taken into consideration.

Thank you for your understanding.

When should i expect a response?

Hey There,

Regretfully we do not have an ETA yet. Rest assured it is already added to our feature lists to be taken into consideration.

Best Regards.

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