Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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

jQuery('#page-id').attr("href", "http://www.google.com/");
share|improve this answer
    
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
add comment
up vote 0 down vote accepted

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

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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