tomS-10
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Show Author information on Author archive page
Started by: tomS-10
in: Toolset Professional Support
Problem: I would like to show information about the Author being shown in the Author archive page. Solution: In most cases, the wpv-post-author shortcode is used to display information about the current Author. However in this site setup, the wpv-post-author shortcode does not behave as expected in the Author archive. This may be a result of the custom theme or another active plugin. Please add this custom shortcode to your theme's functions.php file: function get_author_id_in_archive_func($atts) { $author_id = 0; if (is_author()){ $author = get_queried_object(); $author_id = $author->ID; } return $author_id; } add_shortcode("get_author_id_in_archive", "get_author_id_in_archive_func"); Go to Toolset > Settings > Frontend content and add "get_author_id_in_archive" in the "Third-party shortcode arguments" input field. Then you can use the shortcode in your Author Archive Layout Visual Editor cell or WordPress Archive cell to supply the Author's User ID to a wpv-user shortcode: Author ID: [get_author_id_in_archive]<br /> Author first name: [wpv-user id="[get_author_id_in_archive]" field="user_firstname"]<br /> Author last name: [wpv-user id="[get_author_id_in_archive]" field="user_lastname"]<br /> Author custom field: [wpv-user id="[get_author_id_in_archive]" field="wpcf-fieldslug"]<br /> Author profile picture: [wpv-user id="[get_author_id_in_archive]" field="profile_picture" size="100"]<br /> Relevant Documentation: |
3 | 15 | 6 years, 9 months ago | ||
Posts align horizontal with views on the right
Started by: tomS-10
in: Toolset Professional Support
Problem: The grid system I have set up in a View appears to be broken when an odd number of posts is shown. Solution: Use index=pad-last to close any open rows at the end of the loop. <!-- wpv-loop-start --> <wpv-loop wrap="2" pad="true"> [wpv-item index=1] <div class="row"><!-- Open Row --> [wpv-post-body view_template="WordPress Archive 1 - loop item 3"] [wpv-item index=2] [wpv-post-body view_template="WordPress Archive 1 - loop item 3"] </div><!-- Close Row ( Even ) --> [wpv-item index=pad-last] </div><!-- Close Row ( Odd ) --> </wpv-loop> <!-- wpv-loop-end --> Relevant Documentation: |
2 | 3 | 6 years, 9 months ago | ||
Issue: net::ERR_ABORTED and 403 (Forbidden)
Started by: tomS-10 in: Toolset Professional Support |
2 | 10 | 6 years, 9 months ago | ||
If a specific category
Started by: tomS-10
in: Toolset Professional Support
Problem: The issue here is that the user wanted to check if their post had a specific taxonomy term attached to it. Solution: [wpv-conditional if="( has_term('artikler', 'category', null) eq '1' )"] <h1>Annonsørinnhold</h1> [/wpv-conditional] Where 1 or 0 represents true or false , the has_term function returns true or false if the post does contain that taxonomy Since the has_term() function is a function from wordpress and not one of our toolset functions then it needs to be added to our views 3rd party functions arguments. To add this go to Toolset->Settings->Frontend-> "Functions inside conditional evaluations" and add has_term. |
2 | 9 | 6 years, 9 months ago | ||
Create excerpt from custom field
Started by: tomS-10
in: Toolset Professional Support
Problem: The issue here is that the customer had a custom field but didn't want to display the entire contents of the field. Instead they wanted to display a short excerpt from that field. Solution: This isn't actually possible natively but with a simple shortcode you're able to achieve this. Add the following to your functions.php file // Add Shortcode function shorten_string( $atts ) { // Attributes $atts = shortcode_atts( array( 'length' => '', 'string' => '', ), $atts ); return substr($atts['string'], 0, $atts['length'])."..."; } add_shortcode( 'shorten_string', 'shorten_string' ); Then you should be able to shorten your strings and create your excerpt. [shorten_string string="[types field='ingress' output='raw']" length='50'] This will shorten the text length to 50 characters. |
2 | 3 | 6 years, 9 months ago | ||
Ability of Yoast to scan ToolSet Types Custom fields such as WYSIWYG editor
Started by: tomS-10 in: Toolset Professional Support |
2 | 2 | 6 years, 9 months ago | ||
Number format – Separated by thousands
Started by: tomS-10
in: Toolset Professional Support
Problem: Solution: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 3 | 6 years, 9 months ago | ||
Conditional if a specific category
Started by: tomS-10
in: Toolset Professional Support
Problem: I would like to create conditional HTML that tests a category ID. I am currently testing using the wpv-taxonomy-archive shortcode, but it is not working as expected. Solution: The wpv-taxonomy-archive shortcode returns the term Title by default, not the term ID. However, your conditional is set up to test the term ID. So you should modify the shortcode to return the term ID instead of term title: [wpv-conditional if="( '[wpv-taxonomy-archive info='id']' eq '2' )"] <div class="color1 padding"> <h1>Annonsørinnhold</h1> </div> [/wpv-conditional] Relevant Documentation: |
2 | 3 | 6 years, 10 months ago |