Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter gjuddy

    (@gjuddy)

    Afraid not. Not even sure this plugin is supported anymore. Sorry.

    Thread Starter gjuddy

    (@gjuddy)

    Thanks Patrick, works great. How about if I want to find the title of a post I’m loading on the same page and use that…so I’m loading 2 different featured posts on my homepage. I want to be able to grab the title of one of the featured posts and use it as the tag on the other featured post…

    First one:

    <?php echo do_shortcode('[ic_add_posts category="' . date("F") . '" showposts="1" orderby="rand" template="posts_homepage_template.php"]'); ?>

    Second one:

    <?php echo do_shortcode('[ic_add_posts post_type="recipes" tag="' . $title . '" showposts="1" orderby="rand" template="posts_homepage_template.php"]'); ?>

    Now how do I get the title variable to reflect the title of the post loaded in the first call?

    Thread Starter gjuddy

    (@gjuddy)

    Finally got it figured out…

    <form action="<?php bloginfo('url'); ?>/" method="get">
    <?php
    if($post->post_parent)
    $select = wp_dropdown_pages("sort_column=menu_order&selected=".$post->ID."&title_li=&child_of=".$post->post_parent."&echo=0");
    else
    $select = wp_dropdown_pages("title_li=&child_of=".$post->ID."&echo=0");
    $select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
    echo $select;
    ?>
    </form>

    Thanks ensignkid for the sort column tip as well.

    Thread Starter gjuddy

    (@gjuddy)

    So now I’ve got it figured out…

    <form action="<?php bloginfo('url'); ?>/" method="get">
    <?php
    if($post->post_parent)
    $select = wp_dropdown_pages("title_li=&child_of=".$post->post_parent."&echo=0");
    else
    $select = wp_dropdown_pages("title_li=&child_of=".$post->ID."&echo=0");
    $select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
    echo $select;
    ?>
    </form>

    The above code pulls all the sub pages with the same parent as the live page and puts them in a jump menu.

    Can anyone tell me how to utilize the “selected” parameter to have the menu default to whatever page is live. Currently it always just lists the first item in the menu…

    Just wondering…was this ever resolved? I’m trying to do the same thing…create a jump menu for my pages.

    Thread Starter gjuddy

    (@gjuddy)

    ok, I’ve figured out how to list the child pages as a select menu instead of a list…(quite easy, just change wp_list_pages to wp_dropdown_pages).

    So now I’ve got this…

    <?php
      if($post->post_parent)
      $children = wp_dropdown_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      else
      $children = wp_dropdown_pages("title_li=&child_of=".$post->ID."&echo=0");
      if ($children) { ?>
      <ul>
      <?php echo $children; ?>
      </ul>
      <?php } ?>

    Can anyone tell me how to turn this list into a jump menu…so when any one of the items in the list are selected, you are forwarded to that page.

Viewing 6 replies - 1 through 6 (of 6 total)