Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter the-dude

    (@the-dude)

    SORRY for the repost but I messed up the code tags in the first post.

    Hi,

    I am building a CSS based drop-down menu – influenced by THIS and I need to parse the output of wp_list_pages('echo=1&title_li=') for certain tag combinations and replace them to make the menu IE compliant.

    To be specific, wp_list_pages returns something like:

    <ul>
     <li><a>Level 1</a></li>
     <li><a>Level 1</a>
      <ul>
       <li><a>Level 2</a></li> == CHILD
      </ul>
     </li>
    </ul>and I need to replace the

    and the
    before and after the CHILD line with the following expression:

    </a><ul> becomes:
    <!--[if IE 7]><!--><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
    </ul></li> becomes:
    <!--[if lte IE 6]></td></tr></table><![endif]-->

    I tried PhP str_replace but this function does not find the expressions I am looking for.

    I even tried removing “\n” before parsing for the tags since wp_list_pages formats the code – ideally, my search string should be tolerant to this too.

    Any advice?

    Thank you in advance,

    David

Viewing 1 replies (of 1 total)