Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #430305

    Do you have a suggestion how to manipulate, i.e. override, the breadcrumb text? See green arrow http://note.io/1Jb0Pup

    This is an ‘Archives’ page generated for the ‘Audio’ custom post type. I would rather have it say ‘Audio’ instead of ‘Audios’. The reason it says ‘Audios’ is because it’s not advised to name the plural and singular of the CPT the same. (Though I cannot find exactly why.) Hence the request to be able to override this on the ‘Archives’ page.

    If you say it can be OK to name the singular and plural CPT the same, I can just do that. But if not, please advise on a way to override this in the breadcrumb. Thanks.

    #431048

    Hey Rogier!

    Thank you for using Enfold.

    If that is an archive page, you can use this in the functions.php file:

    add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 10, 2 );
    function avia_breadcrumbs_trail_mod( $trail, $args ) {
    	if ( is_archive() ) {
    		$cut = substr($trail['trail_end'], -1);
    		if($cut == "s") {
    		$trail['trail_end'] = substr($trail['trail_end'], 0, -1);
    		}
    	}
    	return $trail;
    }

    Best regards,
    Ismael

    #431993

    Hi Ismael,
    Thanks, but is there a way to rewrite on a more universal level? It would be nice if the single pages were also affected, which currently isn’t the case…

    #434134

    Hi!

    you could try to use this plugin: https://wordpress.org/plugins/breadcrumb-navxt/

    Or maybe you want to try out this solution: https://kriesi.at/support/topic/how-do-i-change-you-are-here-in-the-breadcrumb/#post-121933

    Regards,
    Andy

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