Forums

WP Realtime Sitemap
Empty paragraph included after first item (4 posts)

  1. gillespieza
    Member
    Posted 10 months ago #

    I use this plugin on several sites, and on each one, I get an empty paragraph tag added after the first parent item. See http://www.oia.co.za/sitemap/ for example. How do I prevent this?

  2. Rincewind
    Member
    Posted 10 months ago #

    I have checked my code and its the link_after parameter on this function that is causing the issue. http://codex.wordpress.org/Function_Reference/wp_list_pages

    You have another plugin or something on your site that is causing this to be set to a </p> when it should be blank ''.

    The only way for me to correct this would be for me to add this to my plugin and specifically state that is it meant to be blank, I will have to test this to make sure that it doesn't break anything else on people's websites.

    If you wish you can change this in the code for the plugin temporary, its on line 1199.

  3. gillespieza
    Member
    Posted 10 months ago #

    Hi Rincewind... appreciate your fast reply. Are you sure about the link_after though - the documentation states that it puts the link_after text in before the closing </a>, and on my site its happening afterwards. I edited the line as you suggested:

    $pages .= '<ul>' . wp_list_pages(array('link_before' => '', 'link_after' => '', 'sort_column' => $page_sort_column, 'sort_order' => $page_sort_order, 'exclude' => $page_exclude, 'depth' => $page_depth, 'show_date' => $page_show_date, 'title_li' => '', 'echo' => '0')) . '</ul></div>';

    but it did not change anything. I deactivated every plugin, but it still happens. It goes away if I choose the default theme though, so it must be something in my theme functions - I will go crawling through it tonight and see if I can find it...

  4. Rincewind
    Member
    Posted 10 months ago #

    Sorry yes I have read it again and yes I now noticed that I read it wrong and it does put it inside the tag, I see ok sorry about that then, but good luck finding whats causing the issue, if you could let me know what is was that would be great thanks!

Reply

You must log in to post.

About this Plugin

About this Topic