Solution: 1. Please add this code in your theme’s or child theme’s functions.php file:
function get_user_id() {
$author = get_user_by( 'slug', get_query_var( 'author_name' ) );
return $author->ID;
}
add_shortcode( 'get_user_id', 'get_user_id' );
-
Register the ‘get_user_id’ shortcode first in Toolset >> Settings >> Front-end Content >> Third-party shortcode arguments.
-
Then use shortcode like this in the Author Archive View:
[wpv-user field=”user_login” id=”[get_user_id]”]
[wpv-user field=”profile_picture” id=”[get_user_id]”]
WP Author Templates are below, currently we are talking about author.php: https://codex.wordpress.org/Author_Templates#Which_Template_File_is_Used.3F
Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user
Related Posts:
- Get terms by taxonomy AND post_type
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Allow user to Edit Posts but not Add New?
- WordPress 4.4+ : How to revision CPT + metadata
- How can I filter posts by post_parent in the admin?
- Rewriting ‘rewrite’ slug for custom post type used by plugin
- Using Templates with Custom Post Type UI
- How to setup a Custom Taxonomy Term template
- Remove Custom Post Type menu for non-administrator users.
- Using Query Posts With Multiple Post Types And A Taxonomy
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- Display Custom Post Type in divs just thumb and title
- Custom Taxonomy List links being re-written
- wp_list_categories and custom post types
- How to show particular category all post in custom single file
- Bulk 301 redirect for custom post type
- Associate Taxonomies Across Post Types
- ‘category__and’ for custom taxonomy?
- Custom field default value with counter
- Custom post type hierarchical permalinks not behaving as expected for parent/child pages
- Warning when attempting to edit/add custom post type
- Check if a specific custom field exists?
- How does register_post_type know how and which function to use from the add_action function?
- Fetch ID’s associated with a custom post type when translated with WPML?
- Custom post type show on both Home and Date Archive
- Custom post types archive redirect
- Update CPT post meta with update_post_meta and cron job
- Can’t query tag and post_type at the same time
- Moving ‘register_post_type’ to seperate file not working
- Get post from custom post type order by two taxonomies
- Checking if Post Title is Unique as Loop Criteria
- Custom Taxonomy Archives on Custom Post type Page [duplicate]
- Override a page template from a plugin in a child theme
- Display custom fields from custom posts in RSS feed
- On update or create post redirect to current post position in list
- Can I override a CPT template on a per post basis with Gutenberg block editor?
- Versioned Custom Post Type (Not the same as revisions)
- Is it better to use WordPress Custom Post Types or Taxonomies?
- A custom post within a custom post
- custom post type pagination error 404
- Display Woocommerce Orders for specific author [closed]
- What’s the equivalent of Hide From Menus on MODX on WordPress?
- TinyMCE style formats for different post types
- Lost of query parameter when using permalink
- How to add multiple images to a custom post type without plugin [closed]
- get_the_title() is returning results from previous loop
- Moving meta boxes in admin
- Post-thumbnail only for specific post-types?
- Add post meta programmatically to attachment
- Custom Posts values in custom post overview
- Get Specific Template Part if Custom Field is Some Value
- Page as Archive page
- 3 random images from custom post type, each in a div with a diffrent class
- Displaying multiple post types on home page
- Shortcode leaves no space for other elements?
- Show All Custom Post Types On A Single Archive Page
- Make a custom column sortable by a value from a different custom post type
- Custom post type returns bad post ID
- Custom Post Types,Permalink and Heirarchy
- Send post changes to set email addresses (not users or subscribers)
- Foreach loop returning more than one item when querying taxonomy
- Permalinks for single-[custom-post-types] not working
- Most viewed post of custom post type
- How to enable parent-child relationships and post attribute admin widget for posts
- Preventing Truncation of First Post
- how to compare different timestamps in wp-query for events custom post types?
- custom posts permalinks url rewriting
- Can I get an auto-populated dropdown list of other custom posts in a custom post edit page?
- Custom post types
- Manually adding or updating CPT automatically sets post_status of future
- Images not load on custom post type sidebar, related posts
- Replace Content of Sidebar on Custom Post Type
- open custom post type in popup window instead of page
- Filling custom post type posts from a rest api
- Custom post type shortcode
- How to enable to change Permalinks for Individual Custom Post Type
- Show Post Types customized in Template Page
- Conditional editing CPT – using editor’s role and author’s usermeta
- Get category name of custom post type
- Tags being removed upon updates to related posts: ACF/Genesis/WP5.4.1
- Get all of a user’s posts (custom post type) then get cumulative value of a specific meta_key value from those posts
- Pagination for a cpt filtered with a category
- How do I force a CPT to select a shared custom template in Post Attributes?
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- Filter before manage_posts_custom_column
- WordPress deletes custom posts instead of trash them
- Creating custom post type relationships
- How to create groups like that in buddypress?
- wordpress query_posts with foundation 6 Accordion not working correctly
- Include template if a post is a single product
- Allow viewing the edit screen for a post type, but not make/save/publish/update changes
- Render custom taxonomy query as single template
- Custom Post within a custom post
- General question about Parent and Child Post type relationships
- Custom My account page and custom page for editing posts
- What’s the best way to show custom post types? With page template it’s not perfect!
- show custom post types for a month
- How to write an if statement which reads: ‘if is this custom post type or a child of it do the following’?
- Post count for particular term
- Multiple posts selection [closed]