Support

Account

Forum Replies Created

  • Thank you, John. I knew it was something simple.. I don’t know how I missed it. Also, I isolated the heading number using the PHP explode function:

    
    					<?php
    
    						// check if the flexible content field has rows of data
    						if( have_rows('page_layout') ):
    
    						     // loop through the rows of data
    						    while ( have_rows('page_layout') ) : the_row();
    
    								
    								
    						        if( get_row_layout() == 'heading_text' ):
    		        	
    							        $headingLevel = get_sub_field('heading_level');
    							    	$headingLevelIsolated = (explode(" ",$headingLevel));
    							    	$headingContent = get_sub_field('heading_content');
    
    						        	echo '<h' . $headingLevelIsolated[1] . '>' . $headingContent . '</h' . $headingLevelIsolated[1] . '>';
    
Viewing 1 post (of 1 total)