’ instead on ' on the title

Got a weard bug on a fresh new wordpress theme made with lastest roots sage 9
i can put “é” but not “’” so thats not a charset pb,
& when i switch to basic wordpress theme i got no bug, any help ?
i got a link to help

ok seem to be a mistake in /partials/content-single.blade.php
instead of {{ get_the_title() }} {{ the_title() }}
fix the ’ issue

This also happens when a typography plugin is used, e.g. the great wp-typography which injects HTML into the title and blade {{ }} directive escapes it. I had to replace these with {!! !!} which don’t escape the injected HTML.

I don’t recommend this method. {{ the_title() }} will output the title wherever it’s called, and with a templaing system like Blade this isn’t always what you want; far better to let Blade do the rendering as it’s designed to to.

You can resolve your problem by using {!! get_the_title() !!} or by using Sage’s built in App::title() controller function as seen in resources/views/partials/page-header.blade.php.

4 Likes

thanks for your help & your advice