Sydney Employee widget + slug

Hello.

I’m using Sydney theme for this website http://demandes.debienbonnesidees.fr/musica/.
I would like to have all the employees (artists) on the front page without the slider and without creating a slug for each row because some of the artists presented can be linked to two categories.
I would like to use a widget for this to appear automatically on the page. Is there a way ?

Also, I changed the employees slug in the php, but it seams like the breadcumb of the employees categories doesn’t work anymore:

Thank you very much for your time and help

Hello there,

If I get it right, you’d want to display all employees at once in a form of grid. If so, firstly, try doing the below steps:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box
    /**
     * Javascript-Equal-Height-Responsive-Rows
     * https://github.com/Sam152/Javascript-Equal-Height-Responsive-Rows
     */
    (function($){'use strict';$.fn.equalHeight=function(){var heights=[];$.each(this,function(i,element){var $element=$(element);var elementHeight;var includePadding=($element.css('box-sizing')==='border-box')||($element.css('-moz-box-sizing')==='border-box');if(includePadding){elementHeight=$element.innerHeight();}else{elementHeight=$element.height();}
    heights.push(elementHeight);});this.css('height',Math.max.apply(window,heights)+'px');return this;};$.fn.equalHeightGrid=function(columns){var $tiles=this.filter(':visible');$tiles.css('height','auto');for(var i=0;i<$tiles.length;i++){if(i%columns===0){var row=$($tiles[i]);for(var n=1;n<columns;n++){row=row.add($tiles[i+n]);}
    row.equalHeight();}}
    return this;};$.fn.detectGridColumns=function(){var offset=0,cols=0,$tiles=this.filter(':visible');$tiles.each(function(i,elem){var elemOffset=$(elem).offset().top;if(offset===0||elemOffset===offset){cols++;offset=elemOffset;}else{return false;}});return cols;};var grids_event_uid=0;$.fn.responsiveEqualHeightGrid=function(){var _this=this;var event_namespace='.grids_'+grids_event_uid;_this.data('grids-event-namespace',event_namespace);function syncHeights(){var cols=_this.detectGridColumns();_this.equalHeightGrid(cols);}
    $(window).bind('resize'+event_namespace+' load'+event_namespace,syncHeights);syncHeights();grids_event_uid++;return this;};$.fn.responsiveEqualHeightGridDestroy=function(){var _this=this;_this.css('height','auto');$(window).unbind(_this.data('grids-event-namespace'));return this;};})(window.jQuery);

    ;(function($) {

       'use strict'

       $(window).on('load resize', function() {
       
         if( $('.roll-team').length ){

            $('.roll-team .owl-item').responsiveEqualHeightGrid();
            
         }

       });
        
       
    })(jQuery);
  1. Update
  2. Add this CSS code to Appearance > Customize > Additional CSS from dashboard.
    .roll-team .owl-wrapper{
      max-width: 100% !important;
      transition: none !important;
      transform: none !important;
    }

    .roll-team .owl-controls{
      display: none !important;
    }

Regards,
Kharis

Hello

Thank you very much it works perfectly.
Do you see the second part of my question with the breadcumb ?
Do you know if this issue is because of the change of the employee slug ?

If I am correct, it’s appearing at the top of employee title.

57

If I am not, please share the code you added. Probably I could revise it.

Regards,
Kharis

Hello.

The breakcumb appears but the links doesn’t work
http://demandes.debienbonnesidees.fr/musica/category/catalogue/
Every categories created for the employees have a page error for the archives.

The code added in functions.php (child theme)

/**
 * Change services permalink slug
 */
add_filter('sydney_services_rewrite_slug', 'sydney_child_services_slug');
function sydney_child_services_slug() {
  return 'spectacles';
}

/**
 * Change employees permalink slug
 */
add_filter('sydney_employees_rewrite_slug', 'sydney_child_employees_slug');
function sydney_child_employees_slug() {
  return 'artistes-associes';
}

Hello there,

Try flushing your site’s permalink by going to Settings > Permalinks and just hit the save button.

If it still doesn’t give any changes, you might need to add the below function:

function sydney_include_posttype_archive($query) {
	if ( !is_admin() && $query->is_main_query() ) {
	    if ( $query->is_archive() ) {
			$query->set('post_type', array( 'post', 'spectacles', 'artistes-associes' ) );
		}
	}
}
add_action('pre_get_posts','sydney_include_posttype_archive');

Regards,
Kharis

Hello,

Sorry for the delay.
I tried wht you recommend but the breakcumb issue is still there…
What am I doing wrong ?

Please trey flushing the pemalinks once again. Let me know how it goes.

Regards,
Kharis

Hello,

I tried again, but it doesn’t fixed the issue.