Viewing 1 replies (of 1 total)
  • Plugin Author dpowney

    (@dpowney)

    Hi Msienn,

    I just answered another support issue on this.

    This is a theme issue which is a seen a lot. See https://pippinsplugins.com/use-the_title-and-the_title_attribute-correctly/.

    the_title() function should not be used in a HTML element attribute. This will cause broken HTML markup. the_title_attribute() function should be used instead.

    Here’s an example of incorrect code usage of the_title() function:
    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">My title</a>

    Using the auto placement settings to display the rating results would result in broken HTML like this:
    4.35/5(3)">My title

    Correct usage is to use the_title_attribute() function instead for output of a HTML element attribute:
    <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">My title</a>

    I hope this makes sense.

    Thanks,
    Daniel.

Viewing 1 replies (of 1 total)
  • The topic ‘Main page code error’ is closed to new replies.