Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In the WordPress admin/dashboard under "Add New Post", I want to set an option for if someone wants to show posts in a slider: Yes/No.

enter image description here

And upon the option I need to do something like this in the post page:

if ( isset( $post_slider ) ) {
    // show slider code goes here
share|improve this question

migrated from Nov 3 '13 at 13:12

This question came from our site for professional and enthusiast programmers.

start here: Custom Fields – Milo Nov 3 '13 at 16:47
By default i want the option for all my post , I dont want to create a custom variable for each new post i create. – epynic Nov 3 '13 at 16:52 some thing as shown – epynic Nov 3 '13 at 17:00
add_meta_box and search the metabox tag here, many examples. – Milo Nov 3 '13 at 17:06
Thanks chap., i didnt knw they wer called as metabox . :P let me try and ping you back :) – epynic Nov 3 '13 at 17:31

Your Answer


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

Browse other questions tagged or ask your own question.