Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #289430
    #289581

    Hey Rupert!

    You can change the portfolio permalinks in the WordPress Settings>Permalinks section. Though it is limited to a single option unfortunately so you would need to pick between patient-stories *or* our-team but not both.

    Cheers!
    Devin

    #289632

    Thanks Devin, are you getting any nearer to being able to differentiate the portfolio items into groups e.g. for the scrolling through the portfolio items using the left and right arrows on the edges of a page? At the moment the user ends up scrolling through a mixture of staff and patients.

    #289895

    Hey!

    Thank you for the update.

    If you want to filter the portfolio navigation by category, please use this on functions.php:

    add_filter('avia_post_nav_settings','avia_same_category_filter', 10, 1);
    function avia_same_category_filter($settings)
    {
    $settings['same_category'] = true;
    return $settings;
    }

    Best regards,
    Ismael

    #289926

    Many thanks Ismael, the only issue is that when you cycle to the right from here http://admin.theimplantcentre.com/people/jan/ the last two keep repeating.

    #290255

    Hey!

    That is correct. The function limits the previous and next buttons to stay in the same category. So it will no longer scroll through all of the various categories for that single item.

    Regards,
    Devin

    #290399

    I was assuming that when you get to the last one going right you wouldn’t be able to go any further, rather then the last two repeating! It doesn’t do this when going through the staff e.g. there’s no right arrow on this page http://admin.theimplantcentre.com/people/brooke/. The right arrow is still there on this page even though it’s the last one http://admin.theimplantcentre.com/people/james/

    #290716

    Hey!

    I’m sorry but you might need to hire someone if you want the navigation to perform that way. Please visit Envato Studio or Werkpress for further customization. You can also vote or post the feature on our Feature Requests page.

    Cheers!
    Ismael

    #291614

    Hi Ismael,
    I’m having the same issue with next/previous arrows. I would expect the behavior to be; when you reach the end of the category, the right arrow would either go to the FIRST item in that category, or not be available at all. Instead, the right arrow loops to the THIRD from the last item, which is confusing to the user.

    Is that the way it was intended to be working?

    Regards,
    Greg

    #291784

    Hey!

    Do you have a live url where we can take a look? The function should only be restricting the navigation to the same category but maybe there is something else going on causing a conflict or other interaction.

    Best regards,
    Devin

    #291829

    http://donnaporterfineart.com/galleries/sea-and-landscapes/

    Click on the last thumbnail, then using the next/previous arrows, it loops not to the first item in the category, but an item 3 back.

    We are using a plugin Post Types Order by nsp-code.com to re-order the portfolio posts. And the portfolio items that are in the sea-and-landscapes category are last in the list, in case that helps.

    Regards,
    Greg

    #292568

    Hey!

    If you’re using the nsp code plugin the arrows will not work correct because the plugin breaks the default wordpress functions for next/prev post queries ( http://codex.wordpress.org/Function_Reference/get_next_post and http://codex.wordpress.org/Function_Reference/get_previous_post ). Personally I wrote some code for a workaround which works with the premium version of the plugin and which runs on my website:

    
    add_filter('avia_post_nav_entries', 'avia_apply_custom_sort_order_to_post_nav', 10, 2);
    function avia_apply_custom_sort_order_to_post_nav($entries, $settings)
    {
    	if(class_exists('APTO_functions'))
    	{
    		$APTO = new APTO_functions();
    		$category_ids = false;
    		$args = array();
    		$the_id = get_the_ID();
    
    		if(!empty($settings['same_category']))
    		{
    			$taxonomies  = get_object_taxonomies(get_post_type($the_id));
    			$excluded_taxonomies =  apply_filters('avf_exclude_taxonomies', array('post_tag','post_format'), get_post_type($the_id), $the_id);
    
    			if(!empty($taxonomies))
    			{
    				foreach($taxonomies as $taxonomy)
    				{
    					if(!in_array($taxonomy, $excluded_taxonomies))
    					{
    						$category_ids = wp_get_post_terms($the_id, $taxonomy, array("fields" => "ids"));
    
    						if(!empty($category_ids))
    						{
    							$args = array(
    								'taxonomy' => $taxonomy,
    								'term_id' => array_shift($category_ids)
    							);
    							break;
    						}
    					}
    				}
    			}
    		}
    
    		$entries['prev'] = $APTO->apto_get_adjacent_post($args, true);
    		$entries['next'] = $APTO->apto_get_adjacent_post($args, false);
    	}
    	return $entries;
    }
    

    but I’m not sure if it works with the free version. You can place it into the theme functions.php file. If it doesn’t work please contact the plugin author because we can’t support third party plugins and it’s beyond the scope of our support forum. As a temporary solution you can deactivate the nsp plugin.

    Cheers!
    Peter

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.