Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #719366

    Hello,

    The breadcrumb container at the top of portfolio entries currently pulls the item category as well as the designated ‘breadcrumb parent page’ that has been selected via the page editor dropdown. I would only like this breadcrumb parent page to appear. How do I turn off the crumbtrail from viewing categories?

    Thanks,
    Kristen

    #720687

    Hey Kristen,

    Please add following code to Functions.php file in Appearance > Editor

    add_filter( 'avia_breadcrumbs_args', 'avia_breadcrumbs_args_mod', 10, 1 );
    function avia_breadcrumbs_args_mod( $args ) {
    if(is_single()){
    	$args['show_categories'] = false;
    	$args['show_posts_page'] = false;
    	}
    	return $args;
    }

    If that does not help, please post a screenshot showing the changes you would like to make. You can upload your screenshots on imgur.com or Dropbox public folder and post the links here

    Best regards,
    Yigit

    #722633

    This doesn’t seem to work right.

    I’ve decided that maybe the crumbtrail/right content should just be hidden; I’d like the place of the current page title to simply be a link.
    On this page:

    Where you have the page title”Single Portfolio: 2/3 Slider”, I would like this to be a page link. But. I need to set it up so if it is a standard portfolio item, it will link to /work/, and if it is a portfolio item in the category “team”, it will link to /who-we-are/.

    Thanks.

    #724064

    Hi,

    Please try adding following code to Functions.php file in Appearance > Editor

    add_filter('avf_title_args', 'fix_single_portfolio_title', 10, 2);
    function fix_single_portfolio_title($args,$id)
    {
        if (is_singular('portfolio') && in_category('team'))
        {
            $args['link'] = get_home_url() ."/who-we-are/";
        }
        elseif(is_singular('portfolio') && !in_category('team')){
            $args['link'] = get_home_url() ."/work/";
        }
    
        return $args;
    }

    Best regards,
    Yigit

    #724091

    Thanks, Yigit. It’s very close… half of it is working. With a few modifications, I was able to link the portfolio items back to the Work landing page. However, the Team category items are using the code for work. Probably because the && !in_category(”) was removed… however I can’t set it to just one category because the portfolio items span many categories. Is there an if/then statement if it is NOT in the category ‘team’?

    Here’s what I used:

    add_filter('avf_title_args', 'fix_single_portfolio_title', 10, 2);
    function fix_single_portfolio_title($args,$id)
    {
        if (is_singular('portfolio')){
            $args['link'] = get_home_url() ."/work/";
            $args['title'] = "Work";
        }
        elseif(is_singular('portfolio') && !in_category('team')){
            $args['link'] = get_home_url() ."/who-we-are/";
            $args['title'] = "Who We Are";
        }
    
        return $args;
    }

    I’m thinking if I can add something into this calling all other categories other than ‘team’, it will work.
    if (is_singular('portfolio')){
    Thanks so much for your help!

    #724285

    Hi,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    Login credentials include:

    • The URL to the login screen.
    • A valid username (with full administration capabilities).
    • As well as a password for that username.
    • permission to deactivate plugins if necessary.

    Best regards,
    Yigit

    #724354

    Sure – login info below.

    #725069

    *bump*

    #725139

    Hi,

    I do not think it will be possible this way. Will you be adding more posts that has Team category? I am thinking about a different approach

    Best regards,
    Yigit

    #725145

    No, we won’t be adding more posts with the team category.

    In order to get posts to have the “What we know” page title, I created a copy of single.php in my child theme and added this under the get_header() call:

    $title  = __('What We Know', 'avia_framework'); //default blog title - CHANGED
    	$t_link = home_url('/what-we-know');
    	$t_sub = "";
    
    	if(avia_get_option('frontpage') && $new = avia_get_option('blogpage'))
    	{
    		$title 	= get_the_title($new); //if the blog is attached to a page use this title
    		$t_link = get_permalink($new);
    		$t_sub =  avia_post_meta($new, 'subtitle');
    	}
    
    	if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title(array('heading'=>'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub));

    Maybe there is a way to do this for ‘team’ portfolio items?

    #726300

    —bump—

    #726321

    Hi!

    Please use the code as following

    add_filter('avf_title_args', 'fix_single_portfolio_title', 10, 2);
    function fix_single_portfolio_title($args,$id)
    {
        if(is_singular('portfolio')  && !is_single(array(7854,46))){
            $args['link'] = get_home_url() ."/work/";
        }
        elseif(is_singular('portfolio') && is_single(array(7854,46)))
        {
            $args['link'] = get_home_url() ."/who-we-are/";
        }
    
        return $args;
    }

    7854 and 46 are post ID’s. Please replace it with the ID’s of posts that are in “team” category

    Regards,
    Yigit

    #726337

    I’m assuming therre’s a typo in this—are those arrays supposed to both be (7854,46)? They are returning the same result as of now.

    I have updated the code to include correct titles:

    add_filter('avf_title_args', 'fix_single_portfolio_title', 10, 2);
    function fix_single_portfolio_title($args,$id)
    {
        if(is_singular('portfolio')  && !is_single(array(7854,46))){
            $args['link'] = get_home_url() ."/work/";
            $args['title'] = "Work";
        }
        elseif(is_singular('portfolio') && is_single(array(7854,46)))
        {
            $args['link'] = get_home_url() ."/who-we-are/";
            $args['title'] = "Who We Are";
        }
    
        return $args;
    }
    #726339

    Hey!

    7854 and 46 are the ID’s of my posts on my local installation. You should check the post ID’s of all of your portfolio posts that are in “team” category and replace “7854,46” with “59,60,61” etc. with your post ID’s

    Cheers!
    Yigit

    #726348

    That worked!!! Thank you so much!

    #726350

    Hi!

    Not at all!
    Let us know if you have any other questions or issues!

    Cheers!
    Yigit

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Change portfolio breadcrumbs to only display Breadcrumb parent page’ is closed to new replies.