Title: Main page code error
Last modified: August 21, 2016

---

# Main page code error

 *  Resolved [msienn](https://wordpress.org/support/users/msienn/)
 * (@msienn)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/main-page-code-error/)
 * Hi,
    When I set results of rating position before/after title there is something
   wrong with the code: [http://i.imgur.com/OJwXNdC.png](http://i.imgur.com/OJwXNdC.png)
 * But in this post view everything looks allright:
    [http://i.imgur.com/yJVTYba.png](http://i.imgur.com/yJVTYba.png)
 * I am using Point theme ([http://wordpress.org/themes/point](http://wordpress.org/themes/point))
   
   Thank you in advance for your support
 * [https://wordpress.org/plugins/multi-rating/](https://wordpress.org/plugins/multi-rating/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [dpowney](https://wordpress.org/support/users/dpowney/)
 * (@dpowney)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/main-page-code-error/#post-5086466)
 * 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/](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.

 * ![](https://s.w.org/plugins/geopattern-icon/multi-rating_d6dfe6.svg)
 * [Multi Rating](https://wordpress.org/plugins/multi-rating/)
 * [Support Threads](https://wordpress.org/support/plugin/multi-rating/)
 * [Active Topics](https://wordpress.org/support/plugin/multi-rating/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multi-rating/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multi-rating/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [dpowney](https://wordpress.org/support/users/dpowney/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/main-page-code-error/#post-5086466)
 * Status: resolved