isset() is the wrong function to use here. $ct is set because you’re setting it here:
$ct = get_field('cennik_title')
isset() will only be false if $ct was never defined or is set to NULL. get_field() will return false or an empty string if there’s no value and isset() will return true for those.
You want to check if it has a value but is not false or empty. The simplest way to do that is just:
if ( $ct ) :
Related Posts:
- How to loop over custom fields in a page template?
- How can I add extra word in permalink when someone click download button?
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- WordPress loop by meta key that is an array? and how loop multiple arrays
- Products listing check if meta checkbox is checked
- Where does php code to load data go?
- divide custom field values in div every two values
- How can I put a custom field as the link of a button shortcode?
- I want to show image from custom field image on my custom page template
- fetch from an external api call and display results in page
- Getting only direct child pages in WordPress with get_pages
- Query multiple custom post types in single loop
- Knowing the total number of posts before to get into the loop
- Build a content and excerpt grid loop with paging and options for # of posts
- How to handle a custom form in wordpress to submit to another page?
- How to display multiple Post meta_key/meta_values by SQL query
- Installing wp3.2.1 on IIS; getting empty sessions
- Specific Loop For 2 Within Each
- Geocoding an Exploded Custom Field Array
- Two posts in same div – WP loop
- Woocommerce, recognize the loop of related products
- Removing WordPress profile fields from non-admins
- Use ajax to update_post_meta
- Easiest way to show total number of subpages
- WooCommerce: update custom fields after checkout validation failure
- If Meta Checkbox is checked, do something?
- Output 2 items within the Loop
- Show custom field if it exists, and show different elements if it doesn’t
- How can I add pagination and how can I change thumbnail size?
- Custom field value not saving when it contains a URL?
- tracking number field in Woocommerce order [closed]
- ACF page while loop breaks footer while loop
- Sort posts by custom fields value using dropdown menu
- Dynamic Stylesheet loads but doesn’t finish
- Show css depending on activity type in BuddyPress activity-loop [closed]
- Need Help Fixing My Iframes [closed]
- how to retrieve a value if a checkbox is checked
- Trouble checking if custom woocommerce checkout field is empty or not
- Two queries for a WP_User_Query search work perfectly apart, but not together
- Checking array against author id in loop
- How do I Turn This Into An if statement?
- Add / Update Custom Fields After Select Pictures in Media Window
- Trying to retrieve post meta
- Widgets in the loop if active
- Custom Field IF/ELSE PHP
- Is it possible to retrieve all posts with a certain value for metadata?
- PHP Warning: strip_tags() expects parameter 1 to be string?
- Run str_replace on title and save the output to a custom field
- How to avoid duplicates when creating recent network posts
- variable value disappears in a second loop
- Why my loop isn’t working? [closed]
- Only show first image in foreach loop
- if custom field doesn’t exist, use post thumbnail instead, as image background
- Get all posts as an array ID => Name
- How to store multiple custom meta box
- How to get post ID from button and pass title to Modal
- Wpdb get->results to out the the month from the db
- Display child page content of a specific parent on home page
- Do not duplicate posts with multiple categories in multiple loops
- How to wrap every 3 posts in a div (and close the last div too) [closed]
- Dividing the loop to style post differently
- WordPress loop is not working
- Comparing Dates from custom field
- Display movies that apear this day next
- Using a string from a custom field within a link
- Display metabox title for custom fields with values
- Problem in replacing the_content with the_excerpt()
- Search AJAX Filters – Multiple Query Loops Into One Loop (Optimization)
- Delete images from media library when user deletes an image from ACF Gallery
- Pagination contents not changing in Front page WordPress
- Display all categories including sub categories under a list ul
- Adding new divs with custom classes to products on WooCommerce shop page [closed]
- Sum All the Post Meta of Published posts of Current Logged in user
- Latest posts feed with a specific post always first
- Exclude category and post from loop in custom category.php
- How to use something like meta_query but for fields?
- How fix error in the WordPress loop?
- Efficient way of querying for a “fallback” post?
- Loop 1 user randomly
- Create a hierarchical loop at predefined markup requirements
- enumerating custom taxonomies?
- Problems With Query and/or Template Part and/or PHP
- Two loops in one function
- How to display thumbnail if post is assigned one otherwise not
- Pagenav Not appearing on custom Template
- Sorting Meta Fields?
- How to echo a different field if another field is empty?
- Remove the_content From Loop
- Adding if statement to content for homepage
- Tables not showing divs and loop/php items
- PHP Puzzle: Unique Styles with PHP loop
- How do I filter a custom post type loop by a field?
- Pagination in category.php not functioning
- For each loop will not append to the_content hook
- How to handle parent and child pages?
- How to create a loop that will display one post and stop?
- Pagination not working properly
- Convert custom field date format to “WordPress default”
- How to execute a shortcode within a custom field?
- Allow HTML in custom taxonomy description, and show it on front end