Skip to main content
1 of 2

show custom field content in jquery tabs

I am trying to make a post which will contain several custom fileds. the custom fields should show within jqery tabs. I have already made it in here: http://algodonesdentistreview.com/ahmad/dentists/a-test-dentist-post but the problem is, the tabs aren't dynamic, that is, if I'm adding a field from dashboard, it won't show up in the page. instead, I have to modify the code every time. here's my code:

        <ul>
            <li><a href="#tabs-1">Profile</a></li>
            <li><a href="#tabs-2">Staff</a></li>
            <li><a href="#tabs-3">Treatments & Prices</a></li>
        </ul>
        <div id="tabs-1"><?php the_field('Profile'); ?></div>
        <div id="tabs-2"><?php the_field('Staff'); ?></div>
        <div id="tabs-3"><?php the_field('treatments_&_prices'); ?></div>
    </div>

I know what I'm doing wrong, but I'm not much of a coder, so can't find a way to correct it. any help will be much appreciated.

BTW, don't know if it's relevant,but the post is also a custom-post.