Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //return all adventures for current user
- //snippet from guide-portal.php
- $this_id = get_current_user_id();
- $author_id = $this_id;
- $args=array(
- 'author' => $author_id,
- 'post_type' => 'guides',
- 'post_status' => 'publish',
- 'posts_per_page' => -1,
- 'caller_get_posts'=> 1
- );
- $my_query = null;
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() ) {
- echo '<h2>List of Your Guide Profiles</h2>';
- while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <p style="padding-left: 20px; font-size: 16px;"><b><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></b><form class="edit-listing" action="http://sherpademo.co.cc/voodoo-form/" method="post"> <?php /* the url of the "sherpa-edit-guide.php" */ ?><input type="hidden" id="postid" name="postid" value="<?php the_ID(); ?>" /> <?php /* get the post ID into "postid" and later pass it to "sherpa-edit-guide.php" */ ?><input type="submit" value="Edit" /></form></p>
- <?php
- endwhile;
- }
- wp_reset_query(); // Restore global post data stomped by the_post().
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement