Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #329099

    Hi I need help with the following 2 problems please:

    1. Breadcrumbing

    How do I show a sub of a subcategory from the Portfolio page in the breadcrumbs?

    For example – When a person clicks on the main “Portfolio” link (http://tmcenterprises.net/tas/?page_id=2340) they will arrive at a page which has the 6 main portfolio categories. The breadcrumb says: You are here: Home / Portfolio.

    A person will click “Bathrooms” for example, and then the breadcrumb says:

    You are here: Home / Portfolio / Bathrooms.

    A person will then click on the Bathroom project they want to see for example “Powder Rooms”, and they will see:

    You are here: Home / Portfolio / Powder Rooms.

    Here is what I NEED them to see:

    You are here: Home / Portfolio / Bathrooms / Powder Rooms.

    2. Image Clipping

    I updated the theme today and now I have a new section on my blog pages called “Share this entry”. I am using the blog template for my “Press” section. Since the update 2 of the images have the very tops clipped off. No matter how I try to re-size or scale them they still have the tops clipped off. They were not clipped prior to me doing the update. Any suggestions please?

    #329592

    Hey TASInteriors!

    1) The portfolio urls/permalinks do not support categories or other dynamic elements – I’m sorry. You would need to hire a developer who can help you to customize the permalinks code.

    2) If you want to show the categories in the breadcrumb insert this code into the child theme functions.php file (or insert it at the bottom of enfold/functions.php) if you’re not using a child theme:

    if(!function_exists('avia_modify_portfolio_breadcrumb'))
    {
    	function avia_modify_portfolio_breadcrumb($trail)
    	{
            $parent = get_post_meta(avia_get_the_ID(), 'breadcrumb_parent', true);
    
    		if(get_post_type() === "portfolio")
    		{
    			$page 	= "";
    			$front 	= avia_get_option('frontpage');
    
    			if(empty($parent) && !current_theme_supports('avia_no_session_support') && session_id() && !empty($_SESSION['avia_portfolio']))
    			{
    				$page = $_SESSION['avia_portfolio'];
    			}
                else
                {
                    $page = $parent;
                }
    
    			if(!$page || $page == $front)
    			{
    				$args = array( 'post_type' => 'page', 'meta_query' => array(
    						array( 'key' => '_avia_builder_shortcode_tree', 'value' => 'av_portfolio', 'compare' => 'LIKE' ) ) );
    
    				$query = new WP_Query( $args );
    
    				if($query->post_count == 1)
    				{
    					$page = $query->posts[0]->ID;
    				}
    				else if($query->post_count > 1)
    				{
    					foreach($query->posts as $entry)
    					{
    						if ($front != $entry->ID)
    						{
    							$page = $entry->ID;
    							break;
    						}
    					}
    				}
    			}
    
    			$parents = get_the_term_list( $post_id, 'portfolio_entries', '', '$$$', '' );
    			$parents = explode('$$$',$parents);
    
    			if($page)
    			{
    				if($page == $front)
    				{
    					$newtrail[0] = $trail[0];
    
    					foreach ($parents as $parent_item)
    					{
    						if($parent_item) $newtrail[] = $parent_item;
    					}
    
    					$newtrail['trail_end'] = $trail['trail_end'];
    					$trail = $newtrail;
    				}
    				else
    				{
    					$newtrail = avia_breadcrumbs_get_parents( $page, '' );
    					array_unshift($newtrail, $trail[0]);
    
    					foreach ($parents as $parent_item)
    					{
    						if($parent_item) $newtrail[] = $parent_item;
    					}
    
    					$newtrail['trail_end'] = $trail['trail_end'];
    					$trail = $newtrail;
    				}
    			}
    		}
    		
    		return $trail;
    	}
    
    	add_filter('avia_breadcrumbs_trail','avia_modify_portfolio_breadcrumb', 15, 1);
    }
    

    With regards to your second issue, please forward me a screenshot of the issue, which browsers you have tested it on, the screen resolution you have tested it on and your OS for me to troubleshoot the issue.

    Best Regards,
    Arvish

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Breadcrumbing & Image Clipping Problem’ is closed to new replies.