Support

Account

Home Forums Add-ons Repeater Field Repeater field for Sidebar Page Links Reply To: Repeater field for Sidebar Page Links

  • Ok I now have this which displays the category image and all the posts associated with the category beneath it `<?php $args = array (
    ‘orderby’ => ‘name’,
    ‘order’ => ‘ASC’,
    ‘hide_empty’ => true,
    );

    $terms = get_terms( ‘category’, $args );
    foreach ( $terms as $term ) {
    echo ‘<br />’;
    echo ” . ‘<img src=”‘ . get_field(‘category_image’, $term->taxonomy . ‘_’ . $term->term_id) . ‘”>’;
    $post_args = array (
    ‘category_name’ => $term->slug,
    ‘posts_per_page’ => ‘-1’,
    ‘no_found_rows’ => true
    );

    $query = new WP_Query( $post_args );

    while ( $query->have_posts() ) {
    $query->the_post(); ?>

    <br /><div class=”hidepost”><?php the_title(); ?></div>

    <?php }
    } ?>`

    What I now need is a way to show or hide the page links on a page by page basis.

    Anybody have any ideas how I might achieve this?