Archived topic
Changing the output - Headline block
3 replies · Started by Gerva on January 11, 2022
Good morning everyone and happy new year
Some time ago I had a plugin created/edited to handle events, necessary for the creation of a work in progress site.
Everything has always worked fine.
After about a month, I've started again the site and I noticed this "hitch" that I think is due to the theme.
As a matter of fact, some characters are changed and this prevents the correct output.
Practically:
- I insert a short-code that should publish a link category, but in fact this is converted into a text string.
I tried to put it in different areas but I get the same result.
generated short-code
if ( ($page_cats_hide != 'yes') ) {
$cats_raw = wp_strip_all_tags( get_the_term_list( get_the_ID(), 'event_cat', '<span>', ' '.$cat_separator.' ', '</span>' ) );
$cats = get_the_term_list( get_the_ID(), 'event_cat', '<span>', ' '.$cat_separator.' ', '</span>' );
di fatto viene pubblicato in questo modo
<span><a href="https://siteweb/corsi-eventi-categorie/leadership/" rel="tag">Leadership</a> | <a href="https://siteweb/corsi-eventi-categorie/mbraining/" rel="tag">mBraining</a></span>
it seems that instead of the < character the code ascii > is put;
I don't understand what is the reason
Thanks for the support
Hi there,
Not sure if I fully understand - can't see how this would be a theme issue though.
Can you try activating a Twenty series WP theme to test if the code works there?
Sorry.
OK solved in the plugin there was a function esc_attr( string $text ) that converted everything to plain text for me.
Happy new year to all
No problem :)