How to customize your own template

While this may not be necessary for your theme, overriding the template allows you to personalize it to your needs.

Simply copy the file templates/content-partial.php in the plugin directory and paste it in your theme directory under a new folder called auto-load-next-post/content-partial.php. Auto Load Next Post will then load the template from your theme instead.

Plugin Directory:

/wp-content/plugins/auto-load-next-post/template/content-partial.php

Theme Directory:

/wp-content/themes/your-theme/auto-load-next-post/content-partial.php

When making the modifications to your template file, make sure it follows how your theme loads the content for a single post. The same for child-themes.

The Template

Set Location of Templates

To further support your theme you can filter the location of your templates. This is only needed to allow Auto Load Next Post find where the template for a content file is located if not in the parent directory of the theme. So only use the filter if you need to.

Here is an example of how to filter the location.

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

You only need to enter the folder location within the theme you are supporting nothing more.

For further customization of your template there are action hooks that you can use.