0

I'm creating a Theme Option page for my own wordpress theme and I've been trying to create something like this on my option page

It means my user(admin) can add any number of input fields (in this image, they're drop down elements)

I need to add this feature as a inbuilt option page, so plugins like ACF will not work for me in this case. I have to build this from scratch.

Thanks...

1
  • Please read hhttp://wordpress.stackexchange.com/help/dont-ask and wordpress.stackexchange.com/help/on-topic .. this question is not suitable for any site. You must try to solve the issue, supply the code where you are stuck and what you tried to so far. Commented Dec 14, 2014 at 13:29

1 Answer 1

1

You can do this by adding the following class in your theme for admin options;

Custom-Metaboxes-and-Fields-for-WordPress

And you can call your repeatable fields with some thing like this;

    array(
        'name' => 'Name of field',
        'id'   => 'prefix_option_name',
        'type' => 'text',
        'default'  => '',
        'repeatable' => true,
    ),

For more details on how to use this class you can go through following documentation and example code.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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