You are right, using the category name in the shortcode is a bad idea. I have added a new attribute called “cat_filter” in the new version 0.6.1 and declared “cat_name” as deprecated. “cat_filter” has the same usage than “cat_name” before but uses the category slug instead of the name.
“exclude_cat” attribute still uses the category names.
I want to add additional and more complex filters for cat_filter attribute in a later version. This also will include the actual functionality of “exclude_cat” which will also be marked as deprecated then.
I’ve just upgraded to 0.6 and something is not right:
my shortcode is as follows:
[linkview]
when I preview the page I get the following error:
Fatal error: Call to undefined function wp_get_current_user() in /home/waterway/public_html/alrewasplan.co.uk/wp-includes/capabilities.php on line 1356
I should also have added that I am running wp 4.1
This appears to have been a problem 4 years ago and I have solved it again by following the solution given below:
Insert the following line at the top of wp-include\capabilities.php:
require_once('pluggable.php');
Having satisfied myself that that worked, a year later I found an even better solution from Michael Dozark:
Instead of adding a line to capabilities.php where it will be overwritten by updates, add this line right before require_once(ABSPATH . ‘wp-settings.php’); in my wp-config.php file:
require_once(ABSPATH . 'wp-includes/pluggable.php');
Cheers
Will