Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter nenjahinurgras

    (@nenjahinurgras)

    For everyone just as desperate as me to change “correct behavior”, please find the code where the br is added in classes.php (under wp-includes) on line 639.

    And for the programmers of WP: First of all, let me emphasize that I love what you do, for free! That’s great, it really is. Just one tip for a next version, please make wp_list_categories, wp_list_bookmarks and wp_get_archives have similar arguments for styling, so it easy to change them all to the same layout.. Thanks everyone!

    Thread Starter nenjahinurgras

    (@nenjahinurgras)

    Please read my initial post. I did not ask whether adding a br is correct behavior or not. Yes indeed it does add br because it was programmed to. I have no problem going through the php and changing the code myself. But someone please find the spot where the br is added, since I cannot find it anywhere…

    Thread Starter nenjahinurgras

    (@nenjahinurgras)

    Sorry, typo. That does not change anything to my question though..

    Thread Starter nenjahinurgras

    (@nenjahinurgras)

    Mmm, let’s repost that to display the code as well:

    Hi everyone,

    Since I have spent the last four hours on finding a solution (in Codex and the forum) but could not find one, I decided posting this. I would like to remove all formatting (<li></li> and <br />) from the wp_list_categories output. Is that possible? I have already found the tag

    wp_list_categories('show_count=0&style=nonetitle_li=');

    which gives a list without <li></li>. The only disadvantage is that it still adds a <br /> after each category link. I have looked through category-template.php but couldn’t find anywhere the code where this <br /> is added. Does anyone know where I should look to remove this code? Any help appreciated!

    Thread Starter nenjahinurgras

    (@nenjahinurgras)

    ok, in a last resort I decided to Google for “_wswwpx_page_get_ancestor_ids” and found my solution in the WordPress Support forum which I could not find with the search box here. The following code is what you need to find the id of the upmost Parent for a page:

    // get id of current page
    $g_page_id = $wp_query->get_queried_object_id();
    // find ancestor pages
    $ancestors = _wswwpx_page_get_ancestor_ids($g_page_id);
    // find topmost ancestor
    $ancestor = reset($ancestors);
    print "$ancestor";
Viewing 5 replies - 1 through 5 (of 5 total)