0

I'm using this bit of code to generate a menu:

          <div id="menu">
  <?php $args = array(
    'depth'        => 1,
    'show_date'    => '',
    'date_format'  => get_option('date_format'),
    'child_of'     => 0,
    'exclude'      => '426, 508',
    'include'      => '',
    'title_li'     => __(''),
    'echo'         => 1,
    'authors'      => '',
    'sort_column'  => 'menu_order, post_title',
    'link_before'  => '',
    'link_after'   => '',
    'walker' => '' ); ?>
    <ul><div class="menu-button"><?php wp_list_pages( $args, 'sort_column=menu_order' ); ?></div></ul>
    </div>

It's generating the menu fine but one of the links I need it to goto another page.

Is it possible to pick out that page by ID and tell it to goto a different address? If so, how can I do it?

0

its a simple one liner if you want to use jQuery:

jQuery('#page-id').attr("href", "http://www.google.com/");
  • This will affect the way all the other links work though. – Rob Jun 6 '11 at 10:31
  • not if you put a specific page id as a selector! – Bainternet Jun 6 '11 at 16:35
0

I'm now using the Page Links To plugin to achieve this.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.