Remove Archive Title Labels error
-
Out of like 1800 people using my Seasonal theme (and the pro one), the method I used in my functions file to remove the archive title labels is this:
add_filter( 'get_the_archive_title', function ($title) { if ( is_category() ) { $title = single_cat_title( '', false ); } elseif ( is_tag() ) { $title = single_tag_title( '', false ); } elseif ( is_year() ) { $title = get_the_date( '', false ); } elseif ( is_month() ) { $title = get_the_date( '', false ); } elseif ( is_day() ) { $title = get_the_date( '', false ); } elseif ( is_post_type_archive() ) { $title = post_type_archive_title( '', false ); } elseif ( is_author() ) { $title = '<span class="vcard">' . get_the_author() . '</span>' ; } return $title; });I’ve had 2 people, one using the free Seasonal theme and one using the pro version, both versions use the same filter. But what is odd is that only 2 people out of the 1800 are getting this kind of error:
Parse error: syntax error, unexpected T_FUNCTION in /home/content/65/10216865/html/wp-content/themes/seasonal/inc/extras.php on line 209
I got that from a support question on my free Seasonal theme.
Line 209 for both people is the first line of add_filter(….etc.
As far as I know, the code I have is the correct method. Long story short, I do not want the title labels to show for any of the archives, as they are labeled by default in the core.
Any idea why only a couple people got that error?
The topic ‘Remove Archive Title Labels error’ is closed to new replies.