<?php if (get_the_author_meta('ID') == 7) : ?>
Do something for user with ID 7.
<?php else : ?>
Do something for anybody else.
<?php endif; ?>
Try this, where 7 is the ID of the user.
Related Posts:
- Display Authors Comments on Profile Page
- Filter post by current 2 differents users id
- get_attached_media() on author page not working
- Post ID randomly printing on page
- How to only get the content of post page while looping?
- Filter page ID outside the loop and order
- Pagination not working with custom loop
- Have different number of posts on first page
- Display all posts starting with given letter?
- wp_pagenavi() with custom wp_query()?
- how do I group content in magazine-style ‘issues’?
- How to query custom posts using a dynamic category
- WordPress “Loop” with large set of results
- WP_Query on custom post type not displaying, multiple loops & get_template_part
- Custom post type loops with different page templates
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- 404 error PageNavi custom type taxonomy | wordpress
- Query for posts in 2 taxonomies
- IF statement in a do_shortcode
- How to dynamically build a multiple taxonomy query loop within a post type’s single loop?
- How to fetch custom post by Author?
- Check if author or current user has posts published
- How to check if “is single” page
- How can I show a custom post type for users in the authors.php file?
- Using pre_get_posts to filter one loop in a multiloop archive
- Custom Post Type and Labels
- Custom Post Type Loop within Shortcode
- Very Slow Page – How to Optimize # of Queries?
- Display CPT posts based on specific taxonomy
- WordPress Genesis custom taxonomy archive shows 3 repeats of each post
- Meta Key Value in current-user-only loop
- CPT + CMB2: data not displaying for only first post in loop
- Loop custom taxonomy to get lists of cutom post types?
- Show a Category X’s custom post type on Category X archive page?
- Sort by alphabetical order archive.php page
- Displaying Custom Posts on a Page
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Three Most Recent Posts, One Per Term
- Custom Post Loop pulling all custom posts, not just one
- Wrapping x posts in html without leaving empty html
- Loop increase number
- Move Genesis Single Page/Single Post Title
- Post loop count is not in order
- hide specific div on single.php [closed]
- Looping Through Categories of a CPT
- How do you output an unknown number of images in a custom post type with desired markup?
- Get data from PHP to JavaScript to set position of each post on front page
- Assign a template to a custom post type when displayed by the main loop on the home page
- The loop does not show users
- Give a unique ID while saving
- Displaying information from custom field on custom post type
- Display only a single CPT
- Control Loop Within Loop
- How do I enforce a specific custom post type on the loop
- CPT archive page – show one post from each taxonomy term
- How do I list a custom field and custom taxonomies for each result in a loop?
- If/Else child list for Custom Post Type single template within loop?
- Custom Post Type, Pagination and 404s?
- Insert a Custom Post type into my Loop
- Custom Post Types Not Showing Up In query_posts Result
- Do I need a loop to display an object that attached to posts?
- “Order” doesn’t work in custom loop?
- Shortcode with loop stacks output
- how to display author name in custom post type
- Show custom post type event if current day using ACF
- How to create an IF statement in the Main Loop for Custom Post Types
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- How to output and alert message when updating a post
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- How do I get all authors posts of a custom post type outside loop
- CPT: multiple loops with different terms
- sorting in wp query based on custom field value
- Delete Post by User
- Custom post type loop without children
- Set a static page as a user profile page?
- How to display user-defined / custom post in wordpress?
- WordPress loop add heading before first of type
- Only show current category post
- Looping through custom taxonomy in one template
- get_post_meta for Custom Post Type ( CPT )
- How to keep a CPT stick to specific position?
- Getting wrong ID
- Loop posts in a table ordered by a custom field value
- Is it possible to add query parameters on the archive page?
- Custom post type archive pagination with HTML5Blank theme?
- WordPress loop for multiple custom post types
- How can I pull information from my loop and divide them seperately?
- Pagination not working with custom loop
- Fallback if statement based on the number filtered from it
- Turn post into simple slideshow
- Create custom post order (with custom post type meta)
- Pagination not working with custom loop
- Noob Loop Question
- Custom Post Types and 404 Pages
- show custom post’s post in two different divs [duplicate]
- Limit wordpress posts loop to continue onto another page
- Unable to display paging navigation with a custom post type loop
- How can I show posts with the same tag?
- WordPress post objects in one parent post object