• Resolved jonniboo

    (@jonniboo)


    I have used the wp_list_pages function as thus:

    <?php wp_list_pages(‘title_li=&link_before=<h4><span>&link_after=</span></h4>’); ?>

    However it doesn’t validate, even though it apears to work ok.

    can anyone tell me how to fix it?

    website url: http://a11.johnburrell.co.uk/

Viewing 8 replies - 1 through 8 (of 8 total)
  • how did you resolve this?

    wp_list_pages isn’t validating for me.

    well….it would depend on the context its used in. A link to your page could help us see the issue

    gregremote

    (@gregremote)

    anyone else on this? I have been trying to track down a solution to this for a while…

    well….it would depend on the context its used in. A link to your page could help us see the issue

    also, the fact that you are posting in a thread that has been marked as resolved, rather than starting your own topic, means that less people are apt to look here

    gregremote

    (@gregremote)

    Well I will give it a day or two and if no answer – post again.

    As far as context – I am using it to list the menu items.

    <ul id="dropmenu">
    <?php wp_list_pages('&sort_column=menu_order&title_li='); ?>
    </ul>

    with a link to your site, we can run it through the validator ourselves to see what’s up with the code, and the surrounding code since often errors cascade

    that being said, your wp_list_pages shouldn’t start with an ampersand I don’t think, that’s used for joining parameters

    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>

    gregremote

    (@gregremote)

    sorry – and thanx much for the quick response – I took out the exclude I was using to try and simplify things – which was not as intelligent =|

    <ul id="dropmenu">
    <?php wp_list_pages('exclude=' . get_page_by_title('Privacy Policy') -> ID . '&sort_column=menu_order&title_li='); ?>
    </ul>

    the exclude is working – but somehow leaves an open tag I think? I found this – not sure if it pertains to my situation:

    link

    Here is what the above outputs:

    <ul id="dropmenu">
    <li class="page_item page-item-5 current_page_item"><a href="http://www.por7al.com/wp_excelone/" title="Home">Home</a></li>
    <li class="page_item page-item-6"><a href="http://www.por7al.com/wp_excelone/?page_id=6" title="Our Perspective">Our Perspective</a></li>
    <li class="page_item page-item-7"><a href="http://www.por7al.com/wp_excelone/?page_id=7" title="Services">Services</a>
    <ul>
    	<li class="page_item page-item-8"><a href="http://www.por7al.com/wp_excelone/?page_id=8" title="Individual">Individual</a></li>
    	<li class="page_item page-item-9"><a href="http://www.por7al.com/wp_excelone/?page_id=9" title="Small Business">Small Business</a>
    	<ul>
    		<li class="page_item page-item-23"><a href="http://www.por7al.com/wp_excelone/?page_id=23" title="Business Advantage">Business Advantage</a></li>
    	</ul>
    </li>
    	<li class="page_item page-item-11"><a href="http://www.por7al.com/wp_excelone/?page_id=11" title="Corporations">Corporations</a></li>
    </ul>
    </li>
    <li class="page_item page-item-15"><a href="http://www.por7al.com/wp_excelone/?page_id=15" title="Markets">Markets</a>
    <ul>
    	<li class="page_item page-item-274"><a href="http://www.por7al.com/wp_excelone/?page_id=274" title="Emerging Markets">Emerging Markets</a></li>
    	<li class="page_item page-item-287"><a href="http://www.por7al.com/wp_excelone/?page_id=287" title="Developed Markets">Developed Markets</a></li>
    </ul>
    </li>
    <li class="page_item page-item-13"><a href="http://www.por7al.com/wp_excelone/?page_id=13" title="Team">Team</a>
    <ul>
    	<li class="page_item page-item-329"><a href="http://www.por7al.com/wp_excelone/?page_id=329" title="Careers">Careers</a></li>
    </ul>
    </li>
    <li class="page_item page-item-314"><a href="http://www.por7al.com/wp_excelone/?page_id=314" title="Process">Process</a>
    <ul>
    	<li class="page_item page-item-309"><a href="http://www.por7al.com/wp_excelone/?page_id=309" title="Performance">Performance</a></li>
    </ul>
    </li>
    <li class="page_item page-item-21"><a href="http://www.por7al.com/wp_excelone/?page_id=21" title="Contact">Contact</a></li>
    <li class="page_item page-item-17"><a href="http://www.por7al.com/wp_excelone/?page_id=17" title="Blog">Blog</a></li>
    </ul>

    gregremote

    (@gregremote)

    looks like you were right this was surrounding code.

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘wp list pages validation problem’ is closed to new replies.