• Resolved tvnweb

    (@tvnweb)


    After updating to WP 5.0.3 plugin does not work anymore.
    It seems that it can’t find the PHP code inside THEME/auto-load-next-post directory, or the post content PHP code ( template-parts/content.php )

    Please help to resolve.

    Thanks,
    Alessandro

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sébastien Dumont

    (@sebd86)

    Hi @tvnweb

    I don’t see how the WordPress update would cause my plugin not to work for you but I will do my best to resolve the issue with you.

    If the repeater template was working before the update, did you also have a theme update? If so, it is possible the theme has made a change to the location of it’s templates so you may need to filter the template location so the repeater template can read them.

    You can do this by adding a filter like so to your functions.php file. All that you have to do is set the location to where the theme’s templates are.

    function my_template_location() {
    return 'template-parts/post/';
    }
    add_filter( 'alnp_template_location', 'my_template_location' );

    Let me know how it goes and if you still need assistance.

    Thread Starter tvnweb

    (@tvnweb)

    The theme is based on foundationpress ( https://foundationpress.olefredrik.com ) version 2.10.4, with post content in this path: template-parts/content.php

    I have created a directory MYTHEME/auto-load-next-post with the file content-alnp.php in it, with following code added:
    function my_template_location() {
    return ‘template-parts/’;
    }
    add_filter( ‘alnp_template_location’, ‘my_template_location’ );

    Still doesn’t work (even withuot the my_template_location function).
    Thank you for your support

    Plugin Author Sébastien Dumont

    (@sebd86)

    @tvnweb I said to add the template location filter to your functions.php file, NOT in the repeater template. Please try again and get back to me. Thank you.

    Thread Starter tvnweb

    (@tvnweb)

    Thank you Sébastien, now it works perfectly!

    • This reply was modified 5 years, 10 months ago by tvnweb.
    Plugin Author Sébastien Dumont

    (@sebd86)

    Glad to hear it. Enjoy!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin not working after WP update’ is closed to new replies.