• Resolved Marco

    (@mcivita)


    Hi, I changed the function the_content() into my function.php child theme for some reasons.
    Now I discovered that the cc_child page plugin doesn’t work because it calls “the_content()” function too.
    Is there a way to apply an hook in order to use this plugin as child?
    Thanks for the support

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author caterhamcomputing

    (@caterhamcomputing)

    Hi.

    There is not currently a filter on the page excerpt within the plugin.

    An alternative approach would be to filter the page content using the the_contentfilter (see https://codex.www.ads-software.com/Plugin_API/Filter_Reference/the_content) rather than trying to replace the the_content function within WordPress – that way all functions that get the page content (the_content, get_the_content, …) will return consistent results.

    cc_child_pages uses the get_the_contentfunction provided by WordPress.

    I hope this is of some help … let me know if you need further assistance. (Details of why you replaced the the_content function and what you are doing with it may help in coming up with alternative approaches.)

    • This reply was modified 6 years, 11 months ago by caterhamcomputing. Reason: clarifying code within the post
    Thread Starter Marco

    (@mcivita)

    thanks a lot!

    Plugin Author caterhamcomputing

    (@caterhamcomputing)

    Did my post give you the information you needed, or do you need further assistance?

    Plugin Author caterhamcomputing

    (@caterhamcomputing)

    As I have not heard back, I am assuming that the problem is resolved … If you are still having problems please let me know.

    I have added creating a filter hook for the page excerpt within the plugin to the list of enhancements for future releases as it may be useful in some circumstances.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change the_content() call’ is closed to new replies.