Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ************************How to add a Drop Down blog post viewer in your website ********************************
- //First paste the bellow code where you want to add drop down post view
- <div class="drop_post_view">
- <pre>
- <h2 id="title_drop">Use Our Quick Viewer</h2>
- <form action="<? bloginfo('url'); ?>" method="get">
- <select name="page_id" id="page_id">
- <?php
- global $post;
- $args = array( 'numberposts' => -1);
- $posts = get_posts($args);
- foreach( $posts as $post ) : setup_postdata($post); ?>
- <option value="<? echo $post->ID; ?>"><?php the_title(); ?></option>
- <?php endforeach; ?>
- <input type="submit" name="submit" value="view" id="Drop_view_action" />
- </select>
- </form></pre>
- </div>
- //Than using with css you can design this drop down box as you want.
- Tutorial Details Here : http://www.techtunes.com.bd/wordpress/tune-id/335135
- ****************************************************** THANK YOU *************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement