LaTeX for WordPress strips codes in loop

Installed LaTeX for WordPress and added post:

Some text $$alpha+betageqgamma$$ other text.

Read More

I see that equation in post page, but it stripped in loop.

How can I see equation in loop too?

Related posts

1 comment

  1. I don’t know much about that plugin but it applies filters to both the_content and the_excerpt, which seems reasonable to me. I have to assume that your theme is bypassing those filters somehow in the index listing. I can only guess at what it is doing, but you could add a filter to get_the_content and get_the_exceprt as well and that might help (but no guarantees).

    // in functions.php, at least for testing
    $latex_object = new latex_for_wp;
    add_filter('get_the_excerpt', array($latex_object, 'parseTex'), 10001);
    add_filter('get_the_excerpt', array($latex_object, 'parseTex'), 10001);
    

    If that doesn’t work I’d need to see what your theme is doing.

    It is also possible that some other plugin is interfering.

Comments are closed.