|
Parametric search for logged in users
Started by: Swaminathan
in: Toolset Professional Support
Quick solution available
Problem:
How can I create a post View that displays only the posts of the current logged in user?
Solution:
1. Add a view with "Full Custom Display"
2. Add a Query filter as:
Select posts with the author the same as the current logged in user.
3. Add any Custom Filter in the Custom Filter section you need.
|
|
2 |
3 |
6 years, 11 months ago
Swaminathan
|
|
When adding
Started by: lindsayH
in: Toolset Professional Support
Quick solution available
Problem:
When adding toolset Access in a paragraph it appears that an extra paragraph is added along with the trailing line that doesn't have any html output at all.
<p>You can customise the code below [toolset_access role="Supplier" operator="deny"]by replacing the address in bold with a direct link to your listing (e.g https://yoursite.co.uk/wedding-supplier/your-business-name/) or [/toolset_access]by adjusting the width to fit the layout of your website.</p>
This produces https://d7j863fr5jhrr.cloudfront.net/wp-content/uploads/2017/11/586148-output.png?x12835
Solution:
Add the Access code with the "raw" attribute.
You should be able to check that when you insert the Access ShortCode.
When Raw is true, then you will not have any additional HTML around the Access ShortCode.
If it's false, then the Access ShortCode will come along wrapped in a
tag.
|
|
2 |
3 |
7 years ago
lindsayH
|
|
Access can no longer control permissions of a custom post type
Started by: gaborN
in: Toolset Professional Support
Quick solution available
Problem: I would like to give Shop Manager users access to the log of emails created by the Log Emails plugin, but Access permissions do not seem to work as expected.
Solution: Use custom code to modify the permissions defined by the Log Emails plugin.
add_filter('register_post_type_args', 'site_log_emails_capabilities', 10, 2);
function site_log_emails_capabilities($args, $post_type){
if ($post_type == 'log_emails_log'){
$args['capabilities']['edit_post'] = 'manage_woocommerce_orders';
$args['capabilities']['edit_posts'] = 'manage_woocommerce_orders';
$args['capabilities']['edit_others_posts'] = 'manage_woocommerce_orders';
$args['capabilities']['delete_post'] = 'manage_woocommerce_orders';
$args['capabilities']['delete_posts'] = 'manage_woocommerce_orders';
$args['capabilities']['read_post'] = 'manage_woocommerce_orders';
}
return $args;
}
|
|
3 |
30 |
7 years ago
gaborN
|