• Resolved colevalleygirl

    (@colevalleygirl)


    I’m using Pods and a plugin called Glossary (from Codeat). The Glossary plugin is executed on the_content filter. Debugging a problem associated with that plugin shows the_content filter is apparently not being run at all on the relevant pages, but I can’t see why (I’m not very experienced with Pods).

    Pods 2.9.13 PHP 7.4.33 WP 6.2

    ————————————————

    PODS template (article-details)

    <ul class="kb-meta">[if skill_level]<li>Skill Level: <b>{@skill_level}</b></li>[/if] [if fh_version]<li>FH versions: <b>{@fh_version}</b></li>[/if]
    	[if topic]<li>In Topics: <b>[each topic]<a href="../../topic/{@slug}">{@name}</a>&nbsp;[/each]</b></li>[/if]
    </ul>
    
    <ul class="kb-meta">[if help_file_reference_7]Help file (v7):&nbsp; [help7]{@help_file_reference_7}[/help7][/if]
    </ul>
    <ul class="kb-meta">[if help_file_reference]Help file (v6):&nbsp; [help]{@help_file_reference}[/help][/if]
    </ul>
    
    
    {@post_content}
    
    
    <div class="kb-info">Last update: {@post_modified_gmt,rjt_date}</div>
    

    POD: kb_article

    Singular template: article-details
    Singular template filter: Filter: the_content

Viewing 5 replies - 1 through 5 (of 5 total)
  • I am also having this issue using the same to plugins. Do you have an answer for this please?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @colevalleygirl and @colinsp

    Whether the_content is executed or not depends on your theme. If your theme uses the function the_content() within the post templates then the filter should be executed.

    Cheers, Jory

    Thanks for the reply. I have checked and the theme Labbook does use the_content(). However still nothing displayed from the glossary. I tried two alternative themes and both use the_content() and still no luck. Any other suggestions?

    Plugin Support Paul Clark

    (@pdclark)

    If the magic tag {@post_content} is not applying the the_content filter, you can add it by defining a custom function in your theme’s functions.php or a plugin, like this:

    <?php
    
    function apply_the_content( $content ) {
    	return apply_filters( 'the_content', $content );
    }

    The function would then be applied to the magic tag by writing {@post_content,apply_the_content}

    Thanks that works if I use that as a custom hook.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Why is the_content filter not being executed?’ is closed to new replies.