• hey, i want the editor to use <B> and not <strong> when using the bold button in the text editor. how and where can i change it? the <strong> is creating an error for some reason while using PODS plugin and testing it with <b> does work fine, so i need a quick fix somehow.

    any ideas? thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hi there @yotam101 – ideally you’d work with the PODS plugin folks to solve the issue with strong tags, since there are differences in meaning between the two tags.

    If you really just want to replace strong with b, I borrowed the code from the answer here and it seems to work. Here’s the full code, with their update incorporated:

    function change_strong_to_b($content){
        $content = str_replace('strong>', 'b>', $content);
        return $content;
    }
    
    add_filter( 'the_content', 'change_strong_to_b' );
    add_filter( 'the_editor', 'change_strong_to_b' );
    $content = get_the_content();
    $content = apply_filters('the_content', $content);

    You could add this as a snippet using the Code Snippets plugin.

    What sort of issue are you having with <strong> exactly?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘change to with the “B” button’ is closed to new replies.