Support

Account

Home Forums Add-ons Repeater Field Split & Move Field Group

Solved

Split & Move Field Group

    • Nuro

    • September 23, 2013 at 4:47 pm

    Hi,

    I am using your plugin to create a table displaying a lot of items. For each item I am displaying the title, featured image or first image of post, a link, and a short description.

    I have created a custom template with a loop for each category, I just copy and paste the slug, the title, the image, the description, and using a counter to display the item number. Have a repeater for each category and hundreds of items, so the repeater on the backend is very long due to having 100s of items.

    So to get to my question, is there a way I could split up the field groups for each item category?

    Thanks a lot for your help! 🙂

    • Elliot

    • September 24, 2013 at 12:29 pm

    Hi @nuro

    Sorry, I don’t understand the question.

    You are using a repeater field to store all the category data?

    I think you would be better off just using the get_terms function to loop through the terms and render the data you want.

    Perhaps you could explain the issue with a bit more clarity?

    Thanks
    E

    • Nuro

    • September 28, 2013 at 5:18 am

    Hi.

    sorry for the late reply.

    I am using a custom post type (just one post) to enter all the info for the table of contents. Then in my template I am pulling the entered info from that particular post using the post number like this:

    <?php
     
                        if( get_field('repeater', 128) )
                        {
                          $i = 1;
                          while( has_sub_field('repeater', 128) )
                          { 
                            $link = get_sub_field('sub_field_1');
                            $desc = get_sub_field('sub_field_2');
    
                               echo ...
    
                               $i++;
                          }
                        }
     
                    ?>

    Because the single post where I am entering the info is getting so big, I want to instead create a custom post type for each section of the table of contents. I can easily do this for new stuff that I need to add, but the stuff that I have already added I would like to move some of the entered info to a new post type.

    I am using a post type just so it’s easier later to see where the info needs to be entered.

    Sorry for my poor explaining, let me know if I’m still not making sense. Thanks!

    • Nuro

    • September 28, 2013 at 7:14 am

    I figured it out 🙂

    Just duplicated the field group. Then added taxonomies to the custom post type. Now have the large table split into smaller section. Each gets a field group that only displays if the custom post type post containing the table info is posted in a specific category.

    Know this probably doesn’t make sense, but thanks anyway 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.