I’m using wordpress on my site and for some reason the wp_list_pages() isn’t showing a title attribute?
I’d love to add it for the SEO purposes.
Any help?
My current code is
wp_list_pages('depth=1&title_li=&exclude=9');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
wp_list_pages()not supposed to have a title attribute by default. You can always write your own functions if the given functions don’t fit your needs.Place this in your themes function.php and use it instead of
wp_list_pages(). If you are using a standard wordpress theme I recommend creating a child theme for this, since theme updates will remove your changes in the future. Feel free to add any ids and classes as you need them.It gets a little more complicated when you add css classes like
current_page_itemfor the currently visible page to the generated HTML markup.