Viewing 3 replies - 1 through 3 (of 3 total)
  • It looks fine. My veiw is that you want to modify the code as little as possible. It makes it harder to update later on.

    By the way, I like your site!

    The replacement is part of wp-texturize, a function through which a lot of your sites content gets filtered to make things look nice. What version of WordPress are you using? In my 1.5.1.1 installation, the function is found in wp-includes/functions-formatting.php right at the top. The offending line is line 36:
    $curl = preg_replace('/(d+)x(d+)/', "$1×$2", $curl);
    which replaces all “x”‘s between two numbers with ×.

    Possible Solutions:

    1. Delete (or comment out) that line – Disadvantage: you’re altering core code. That’s bad unless you know (and remember!) what you’re doing.
    2. Stop the function from filtering your text by editing your wp-includes/default-filters.php (1.5+) or wp-includes/vars.php (1.2-). Edit that file and delete or comment out whichever wptexturize lines you see fit. To keep that “x” in the title of your post a real “x”, for example, you’ll need to comment out the line
      add_filter('the_title', 'wptexturize');
      Disadvantages: still editing the core. You’ve stopped that whole function, not just the × part. Things like curly quotes won’t show up anymore.
    3. Stop the function from filtering your text by creating a new file in your wp-content/plugins/ directory called notexturize.php:
      <?php
      /*
      Plugin Name: No WPTexturize
      Plugin URI: https://www.ads-software.com/support/topic/34242
      Description: This plugins keeps various pieces of your site's content from being "texturized" (i.e. filtered through <code>wptexturize()</code>)
      Author: The Support Forums
      Version: 0.1
      Author URI: https://www.ads-software.com/support/
      */
      remove_filter('the_title', 'wptexturize');
      ?>

      You can remove wptexturize from other bits of content as you see fit (such as ‘the_content’). Just add a similar remove_filter(X, 'wptexturize') line for each bit. Then activate that plugin through your Plugins Administration Panel.
      Advantage: no modification of core! Disadvantage: You’ve stopped the whole function as above.
    Thread Starter viper007bond

    (@viper007bond)

    Wow, thanks a lot, mdawaffe! ??

    However, now that I think of it, I guess it looks fine, or possibly even better that way since it’s a plain X without… flares on the ends of the lines of the X.

    Very good to know though that I can modify that kinda stuff via a plugin. Using a plugin to do so never occured to me!

    And glad you like the site, cron. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why is my “x” being replaced with a “?—” ?’ is closed to new replies.