WordPress.org

Forums

Strange Characters is Title (4 posts)

  1. wpnebula
    Member
    Posted 1 year ago #

    My titles look fine on my website however, when you view source the <title> shows strange characters like #8230; I tried using remove_filter('the_title', 'wptexturize'); but it didn't work. Any suggestions? It happens because I use periods or commas or apostrophes.

    Need to fix this because the strange characters show up on social sites as well.

    thanks

  2. Tara
    Volunteer Moderator
    Posted 1 year ago #

    Which theme are you using?

  3. HdSusanto
    Member
    Posted 1 year ago #

    Try this:

    function remove_more_link_scroll( $link ) {
    	$link = preg_replace( '|#more-[0-9]+|', '', $link );
    	return $link;
    }
    add_filter( 'the_content_more_link', 'remove_more_link_scroll' );
  4. wpnebula
    Member
    Posted 1 year ago #

    this worked:

    $filters_to_remove = array(
      'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'widget_title',
      'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title', 'nav_menu_attr_title', 'nav_menu_description',
      'term_description',
      'the_title', 'the_content', 'the_excerpt', 'comment_text', 'list_cats'
    );
    
    foreach ($filters_to_remove as $a_filter){
      remove_filter($a_filter, 'wptexturize');
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags