Support

Account

Home Forums Backend Issues (wp-admin) Custom field elements appear within a tab plugin on a page?

Helping

Custom field elements appear within a tab plugin on a page?

  • Hi,

    I created this page

    http://shiftisgoodweb.com/pep/who-we-are/staff-board/

    which is populated via a couple of custom fields and this code for the page template

    <?php
    the_post();

    // Get ‘team’ posts
    $team_posts = get_posts( array(
    ‘post_type’ => ‘team’,
    ‘posts_per_page’ => -1, // Unlimited posts
    ‘orderby’ => ‘menu_order’,
    ‘order’ => ‘ASC’,
    ) );

    if ( $team_posts ):
    ?>
    <div id=”bio”>

    <?php
    foreach ( $team_posts as $post ):
    setup_postdata($post);
    ?>

    <div id=”cont-mod” class=”aligncenter”>
    <div class=”thumb-wrap”>
    <?php if ( has_post_thumbnail() ) {the_post_thumbnail(); } ?>
    <div class=”img-content”>
    <?php the_field(‘quote’); ?>
    </div>
    </div><h3><?php the_title(); ?></h3>
    <p><?php the_content(); ?></p>
    </div>

    <?php endforeach; ?>
    </section><!– /.row –>
    <?php endif; ?>
    </div>

    It works great. Unfortunately the client wants to make a second option for “staff” (this is the board currently) and wants to put them inside a tab. I have set up a test one here so you can see what I am referring to.

    http://shiftisgoodweb.com/pep/test/

    What you are seeing here is the tab plugin I used. I then got a php snippet plugin to hopefully be able to paste the above php code into a snippet and insert it via the wyswig editor for the tab. It ALMOST worked, although it’s only picking up the_conetent for some reason. The thumbnail and the_title are not populating like they should (and seen on the original staff & board page).

    If anybody can help me out with any suggestions or fixes, it would be greatly appreciated!

    In the meantime, I’ll try to learn how to just create a tab functionality in html in the first place and try it on that page template.

  • Well it turns out just custom coding the tab was the way to go. Please disregard this post. I’m sorry if you made it all the way through that novel only to see this.

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

The topic ‘Custom field elements appear within a tab plugin on a page?’ is closed to new replies.