Please check this page.
if ( has_post_thumbnail( $post_id ) {
// has thumbnail, so show thumbnail
} else {
echo the_title();
}
The class exlink appears to be hardcoded and there’s no IF involved so I don’t know what you want to compare it to.
Related Posts:
- How come Featured Image isn’t showing up in my Custom Post Type?
- How to use a custom post type archive as front page?
- Set posts of a custom post type to be private by default?
- Custom post status not working
- clients list using wordpress
- Find callback function for custom taxonomy metabox
- Date archives for custom post type
- How can I add dropdown widget/box to admin post page?
- Using Default WordPress Custom Header Image Crop Feature in a Post Type / MetaBox
- How do I add a custom post type to the Featured Content in twenty fourteen theme?
- Limiting number of custom posts shown on taxonomy page
- Custom post type loops with different page templates
- Append taxonomy terms as class names in markup?
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- Loop through posts of a custom-post-type (event) and create .ics (iCal) file?
- How To Enable Block Editor (Gutenberg) for Existing Post Type via functions.php
- GravityForm: Populate Dropdown with custom post type [closed]
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- WooCommerce product search titles only
- Notice: Undefined index: suppress_filters
- Custom Taxonomy Permalinks Redirection
- Add custom column in custom post type edit page
- I did group my search results by post type, but how can i give each of them its own order?
- custom post type not showing in menu
- Change custom post type slug from plugin options
- Change CPT archive title
- I need to add endpoint for wordpress categories
- How to target a specific custom post type post and its all children and grandchildren?
- Featured image overlay when changing post status
- Query taxonomy of taxonomy of custom post type
- Hide a widget inside a div on specific type of post
- How to change permalink to include custom post type
- Global custom meta box
- Template not working for the custom Post type
- Warning: Invalid argument supplied for foreach() [closed]
- Custom post type isn’t working
- PHP question: how to combine syntax?
- Loop increase number
- custom post for slider
- ACF in wordpress
- Navigate posts with different post type that are in the same categories
- Show Custom Message in WordPress Admin
- How to inherit field value from parent post into in child / sub post
- How exclude or skip post type with get_next_post_link
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- Create short URL with auto 301 redirect
- Custom post type’s posts are not showing anywere but in xml sitemap
- Is it possible to use array_walk() to append terms to an array of posts?
- WordPress notification if new post published
- Get current user id
- Custom post type in Custom widget – $listItem
- Custom posts – tag pagination
- Adding custom post formatting options in custom post types
- Twitter Product Cards
- Custom meta box in custom post type not working
- Excerpt length: get first paragraph
- Function to add custom HTML into head in custom post-type list page
- Submit Custom Postypes from frontend
- Need help with Custom Post Types and Taxonomies
- new post-type how do i retain the plugins on my sidebar?
- Custom Post Type Dashboard Tab not displaying any posts
- set object terms after some some time of published post – functions.php
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- How to add specific terms in a custom post type?
- Assigning categories to custom post types via a front-end form; only works for native post type
- Default excerpt for parent of a custom post type
- Limit custom post type to the authors only on front-end!
- Urgent – WordPress keeps creating posts
- Move to trash custom post type post after ACF Date Picker date is older than today
- Create posts inside CPT post
- ACF field check value of field on all other articles
- Load custom post type with ID in a shortcode
- Recovering data about custom post and taxonomy types
- Using get_post_type with a custom URL format?
- wordpress does not see the correct custom taxonomy hierarchy
- is using “require_once” in wordpress theme affect the speed ???
- Duplicate posts in my custom loop
- Custom permalink rewrite rules – how do I fix this?
- Populate custom post type/custom fields from an external database
- How to sort custom post’s category by id from the theme’s function.php?
- Work and Display a Custom Post Type as a normal Post
- Custom Field to post_title
- Post Custom & Taxonomy 404 error
- How To Display Category list from Portfolio post type plugin?
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- call_user_func_array() error after moving to another server
- WP_Query function for custom post type
- Modify shortcode to work with custom taxonomies and slugs
- Calling the first & last post by category in custom post type
- Query custom post type and showing its content
- I want to split this into two functions
- Allow authors to create article image
- Code in custom widget queries all posts, when it should only query the current post
- Add HTML before a specific div?
- Comments are not working on Custom Post Type
- How to make a non-public post on wordpress approval?
- add_rewrite_rule not working with custom post type
- wordpress category form fields in popup
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs