• Resolved Michael Fraase

    (@mfraase)


    I’m using the Canvas theme from WooThemes (and now Automattic). The theme’s breadcrumb functionality uses <span class="caps"> for some reason, to delineate caps within the breadcrumbs. The problem is that with the wp-Typography plugin activated, the partial HTML code for the breadcrumbs is displayed, e.g., You are here: Home ? <span class="caps">ARTS</span> & <span class="caps">FARCES</span> internet publications ? Hasten down the wire

    Adding caps to WP-Admin > Settings > wp-Typography > General Scope > Ignore CSS classes has no effect; the <span class="caps"> element still renders.

    If I turn off the “Display Breadcrumbs” option in the Canvas theme settings, the pages render correctly (but I lose the breadcrumbs, of course).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author pepe

    (@pputzer)

    It’s not the breadcrumb functionality that uses <span class="caps">, but the breadcrumbs contain words in caps that are decorated with the <span> by wp-Typography’s CSS Hooks feature. Just switch off Caps on that page and you should be good to go.

    The underlying problem is the incorrect assumption that the_title() won’t contain any HTML markup. WordPress has the function the_title_attribute() for these cases, but many themes and plugins use the former in places they should not. Depending on your PHP skills and the actual implementation, you might be able to change the breadcrumbs template to use the correct function (or strip HTML tags via a filter hook) and keep caps markup for the rest of your content.

    Sample code can be found in the FAQ (in the answer to the first question).

    • This reply was modified 8 years ago by pepe.
    Thread Starter Michael Fraase

    (@mfraase)

    Thanks for the quick response, pepe.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with Ignore CSS classes’ is closed to new replies.