If your ACF “_tl” is located on Options page, you don’t have to use the code provided in a link ( ob_start();
, $content = ob_get_contents(); ob_end_clean();
).
You just need to specify the page that contains this field in have_rows function, in your case – it is Option page. So:
if( have_rows('_tl','option') ):
...
while( have_rows('_tl','option') ): the_row(); ?>
Instead of echo
it is better to use this structure:
$out="";
$out .= '<table class="">';
$out .= '...';
$out .= '</table>';
return $out;
Related Posts:
- How to import CSV into Custom Post Type custom fields?
- ACF – get fields from group
- How to get “Additional CSS Class” for ACF Gutenberg block
- Advanced Custom Fields select field : How to echo the label, not the value? [closed]
- ACF: get_field() returning false [closed]
- Adding custom fields to the header.php
- How to get_terms() only of terms matching an ACF meta value?
- Query between dates using Date Picker fields
- Advanced custom field – gallery – display one random image
- Showing an ACF field in admin posts dashboard
- Google Places API With ACF [closed]
- ACF Repeater Field, need IF statement for if sub field has content
- Can not create fields in ACF with code
- Advanced Custom Fields – Check if multiple get_fields exist?
- ACF – Custom fields have dissappeared [closed]
- Error in Validate Field with ACF plugin in WordPress
- disable (read only) a field if within a custom post type name
- How to change the page title from functions.php
- Acf Pro repeater field returns null [closed]
- Insert Commas into ACF number field
- How I can check if get_theme_mod is in header or a template part
- Using pre_get_posts for meta value of LIKE comparison on ACF repeater sub field
- WP Rest endpoint with custom post type and ACF Fields
- Advanced custom fields: Customise date picker’s start date (need to choose year 1500 onwards) [closed]
- ACF Advanced Custom Fields | Help me grab the fields on my WooCommerce homepage [closed]
- My get_terms not working for custom fields
- Updating the database with advanced custom fields
- How to share repeated fields across multiple pages?
- ACF: replace comma with another sign [closed]
- Remove headings option from Wysiwyg editor from ACF in a certain custom post type
- Organize media library into folders and get folders via WP Rest API?
- How to break a date from ACF?
- ACF (Advanced Custom Fields) not updating post or postmeta values
- Remove YoastSEO meta description from output/source [closed]
- ACF Multiple Checboxes Output
- Filter posts by advanced custom field
- Insert Content into Script with Advanced Custom Fields
- Migrating data from ACF to WordPress custom meta boxes
- Get image data from advanced custom field [closed]
- Check for image with same filename but different extension
- ACF: Querying relationship fields with Author
- Advanced Custom Fields if else issue
- Function wp_enqueue_style was called incorrectly
- how make file upload field through custom field
- ACF Clone Field – Set Default Value
- ACF save json to custom directory not working, default acf-json used instead
- ACF URL behavior, duplicating links
- Advanced Custom Fields oembed only outputs YouTube URL
- Do comparision after updates hooks of acf-fields?
- Importing ACF code in other page templates
- Order get_terms by multiple meta_values
- How do you display a custom field on a new page? [closed]
- Hash password field to database, unhash in admin?
- Check for duplicate custom field value before running wp_insert_post
- Pulling in content from another page [closed]
- Adding new parent item to admin bar
- Display category multi-select with Advanced Custom Felds
- Advanced Custom Fields – Check multiple Empty Fields [closed]
- Simple Calendar
- How to only show ACF field if another block is being used?
- ACF Select Field can’t return Array
- Advanced Custom Field Textarea not Showing (ListingPro Theme)
- Using the WP CLI to output the HTML results of calling a post?
- Image is displaying with the url of the image as well
- How to add a custom field for image in “Text and Full Image(text right)” layout?
- Trying to add ACF to authors meta and adding a class at the same time
- Fill up advanced custom field of a custom post type via API REST POST
- Two problems that are likely related to AJAX
- Fancybox3 ACF repeater. URL strip out from the caption field
- ACF – Eliminate unnecessary data and print
- Is it okay to use an ACF field to store a password for a protected area of a page?
- Get values from an advanced custom field
- ACF Map with custom styles field
- Edit (advanced) customs fields on page template
- ACF Posts in Theme Options only returning when logged in? Bug?
- Front End User Registration – How to Save ACF Values?
- Which is faster: Loading images from the repo, or loading them using ACF Image Content via Media Library
- ACF don’t save the selected value
- help with really simple csv importer
- Advanced Custom Fields Gallery and Flex Slider [reformuled]
- WordPress API response filter by ACF value
- ACF Pro Date Picker not coming through on Loop
- Convert number to date format within an array
- ACF not updating value correctly
- ACF Repeater and Sort
- How to display dropdown filters for posts
- Creating a page from acf fields
- Use an image’s url as argument in update_field function
- Add a mailto button next to custom field download link
- Acf Pro repeater field returns null when call inside foreach
- Relationship field search not retriving posts in admin
- advanced custom fields plugin last input field in new posts
- WordPress loop based on url sting
- Display “Today” Instead of Date for Pubslished Posts
- Updating custom fields with data from the database
- Advanced Custom Fields repeter field expiration
- Getting “Invalid argument supplied for foreach()” Warning
- WordPress/Timber/Twig – Trying to output checkbox values [closed]
- How to use WordPress to embed a SoundCloud download link?
- ACF – if field has value within Field Group conditional statement [closed]