Title: Theme Selectors
Last modified: April 17, 2019

---

# Theme Selectors

 *  Resolved [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/)
 * Hi Sébastien,
    I’m having trouble identifying the correct theme selectors. This
   is what I have: main.inner h1.entry-title nav.navigation.post-navigation div#
   comments
 * Would you be able to take a quick look and tell me which ones are incorrect?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftheme-selectors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/theme-selectors/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/theme-selectors/page/2/?output_format=md)

 *  Plugin Author [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * (@sebd86)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11444352)
 * Looks fine to me [@radiocure1](https://wordpress.org/support/users/radiocure1/).
   Try enabling the JavaScript to run in the footer instead. You can find the option
   under **Misc** in the ALNP settings. You may also need some tweaking with [Autoptimize](https://wordpress.org/plugins/autoptimize/)
   plugin.
 *  Thread Starter [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11444381)
 * Hi Sebastien,
    I enabled JS to run in the footer for ALNP and temporarily disabled
   Autoptimize but it’s still not working. I believe the content container should
   be main>.inner instead. I’m not sure why the “>” is in there, but when I inspect
   the container it has the greater than sign. Also, when I switched from main.inner
   to main>.inner the styling of the pagination changed. Any other ideas on why 
   it’s not working?
 *  Plugin Author [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * (@sebd86)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11444408)
 * For your theme it appears you need to either filter the location of the template
   or override the repeater template.
 * See [the general overview guide](https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/general-overview.md#general-overview)
   in the documenation for more.
 * What theme are you using by the way?
 *  Thread Starter [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11444431)
 * I’m using this theme: [https://swiftthemes.com](https://swiftthemes.com)
 * I’ll work on the guide. What do you mean by filter the location of the template?
   Do you mean my theme’s single post template?
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11444542)
 * for future reference; for debugging-purposes you can also disable Autoptimize
   on a per-request basis by adding `?ao_noptimize=1` to the URL 🙂
 * frank (ao dev)
 *  Thread Starter [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11445558)
 * Hi Sebastien,
    So I got it to work by adding the code below to my functions.php
   file. However, it doesn’t load the entire new article, just the title, featured
   image and an excerpt that says “read more” however the url is for the new post.
   Do you know why it’s not loading the full post?
 *     ```
       function my_template_location() {
           return 'template-parts/';
       }
       add_filter( 'alnp_template_location', 'my_template_location' );
       ```
   
 *  Thread Starter [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11445559)
 * Thanks [@optimizingmatters](https://wordpress.org/support/users/optimizingmatters/),
   I didn’t realize that!
 *  Thread Starter [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11447760)
 * I think the issue is that the `template-parts/` folder has lots of template php
   files. Perhaps the plugin is just pulling the first one which is content-archives.
   php. Here’s a screenshot: [http://tinypic.com/r/330xtuh/9](http://tinypic.com/r/330xtuh/9)
 * I tried to update the functions.php code to the following it breaks the auto 
   load next post:
 *     ```
       function my_template_location() {
           return 'template-parts/content-post.php';
       }
       add_filter( 'alnp_template_location', 'my_template_location' );
       ```
   
 * Any ideas on how to make the plugin load the full post not just excerpts?
 *  Plugin Author [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * (@sebd86)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11447774)
 * [@radiocure1](https://wordpress.org/support/users/radiocure1/) The first time
   round was correct. This filter is just for the location not the file. The repeater
   template loads the correct file if it exists which it does. The problem is that
   your theme is loading only the excerpt.
 *  Thread Starter [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11447780)
 * Any idea on how to get the theme to load the full post?
 *  Plugin Author [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * (@sebd86)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11447828)
 * I will take a look at the theme.
 *  Thread Starter [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11447832)
 * Thanks Sebastien
    -  This reply was modified 7 years, 1 month ago by [Tnace](https://wordpress.org/support/users/radiocure1/).
 *  Plugin Author [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * (@sebd86)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11447846)
 * I’m sorry but this is a public forum and can not mark replies private.
 *  Thread Starter [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11447850)
 * Np, edited the previous reply.
 *  Plugin Author [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * (@sebd86)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/#post-11454731)
 * I have a patch coming that will help detect another template file which helps
   the repeater template but this theme has some JavaScript issues that prevent 
   any other JavaScript from running including ALNP so I don’t know if after the
   patch ALNP will work for you until the theme author has resolved the error issues.
 * The filter I gave you however does work with the coming patch.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/theme-selectors/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/theme-selectors/page/2/?output_format=md)

The topic ‘Theme Selectors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/auto-load-next-post_ccaf26.svg)
 * [WordPress Infinite Scroll by Auto Load Next Post](https://wordpress.org/plugins/auto-load-next-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/auto-load-next-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/auto-load-next-post/)
 * [Active Topics](https://wordpress.org/support/plugin/auto-load-next-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/auto-load-next-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/auto-load-next-post/reviews/)

 * 18 replies
 * 3 participants
 * Last reply from: [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/theme-selectors/page/2/#post-11456776)
 * Status: resolved