• Resolved chefjoef

    (@chefjoef)


    I am attempting to use both Customizr and the “Subtitles” plugin by Philip Arthur Moore (https://www.ads-software.com/support/plugin/subtitles). It seems that I am running into an issue that he addresses on his page as follows:

    I can almost guarantee that the reason this is happening is because your theme developer is using either the_title or get_the_title in places where they should not be used. This is a theme bug, not a plugin bug. When titles are used as attributes, the appropriate template tag to use is the_title_attribute, never the_title.

    I found the offending code, but when I make the change it just adds the text to no place instead of making it end up as expected.

    The problem is in class-content-post_thumbnails
    Line 159
    Can you help me out making a final version of the code that will work (and probably check it in to the theme code itself?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author presscustomizr

    (@nikeo)

    Hi @chefjoef, you are right, the_title_attribute() provides a clean way to use WP titles as title attributes. Thanks, I did not know this function and will implement it in the theme where it is relevant.

    About your issue and before the next version of the theme, applying a strip_tags() filter to the title should do the trick.
    Paste the following code into your functions.php file of theme or child theme :

    add_filter('the_title' , 'mimic_the_title_attribute');
    function mimic_the_title_attribute ($title) {
    return esc_attr( strip_tags( $title ) );
    }

    Hope this helps!

    Thread Starter chefjoef

    (@chefjoef)

    Awesome! Thanks @nikeo.

    That did fix the immediate problem, so the long-term fix can just happen when you next roll out an update to the theme. Overall, I’m pleased with all I can do in it.

    Can I cheat and direct you attention to another bug I ran into?
    Link for featured image is misplaced

    The issue can be temporarily fixed by disabling Photon, but that doesn’t seem a good long-term solution.

    Thread Starter chefjoef

    (@chefjoef)

    @nikeo

    I take it back. This doesn’t really solve my challenge. It ends up breaking the differing size of the span for the subheading which was the whole goal. It makes a good short-term fix, but I could really use a real fix.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug in Customizr – causing incompatibility with plugin’ is closed to new replies.