Support

Account

Forum Replies Created

  • Anyone have a similar experience? Kind of lost on an answer for this.

  • So just to be clear (for my own sake…), if I have a Flexible Content with:

    if (have_posts()) : while(have_posts()) : the_post(); 
    if(have_rows('general_layout')) :
    while (have_rows('general_layout')): the_row;
       ...
    endwhile;
    endif;
    endwhile; 
    endif;

    on a page template that can be used multiple times through a site, there should be any conflict. It’s only if have two of those Flexible Content fields with general_layout on a single page that would cause the conflict. Is that correct?

  • Found my solution here:

    <?php
    			$args = array( 'hide_empty' => '0');
    			$categories = get_categories($args);
    			if($categories){
    				echo '<ul class="product-categories">';
    				foreach($categories as $category) {
    					echo '<li>';
    					$link = get_field('category_link', 'category_'.$category->term_id);
    					
    					echo '<a href="'.$link.'"><span class="cat-title">' . $category->name . '</span></a>';
    					
    					echo '</li>';
    				} 
    				echo '</ul>';
    			}    
    
    			?>
Viewing 3 posts - 1 through 3 (of 3 total)