Archived topic
HTML in the title of the blog post, i need shown as text
1 reply · Started by Ogi22 on October 27, 2018
I need to shown <iframe Border </iframe> as text in the title of the blog post.
But, if I write this HTML in the blog post name:
- permalink can not be automatically generated (numeric only)
- if I open a category in web browser, the browser can not generate a listing of blog posts normally , stuck on a name, and does not generate anything.
Any solution please?
I've been having this problem for a long time.
I need the written HTML code to be displayed as text in the title of the blog post and menu.
Like a wordpress visual editor, if I write HTML code to a visual editor, wordpress automatic overwrite to other symbols, so the browser on the user side will shown for user like text, do not run as HTML.
I need the written HTML code to be displayed as text.
PS: if I wrote the same title as the title of the post in this forum, the post did not add to the toot.
I had to write it all over again. Uh.
I don't think it's possible to include any sort of HTML characters in a permalink - browsers simply don't accept it.
However, it should be possible to show it within the actual page if you use a function like this:
add_filter( 'the_title', function( $title ) {
return esc_html( $title );
} );