• Resolved Tnace

    (@radiocure1)


    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 to see the link]

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

    (@sebd86)

    Looks fine to me @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 plugin.

    Tnace

    (@radiocure1)

    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

    (@sebd86)

    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 in the documenation for more.

    What theme are you using by the way?

    Tnace

    (@radiocure1)

    I’m using this theme: 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

    (@optimizingmatters)

    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)

    Tnace

    (@radiocure1)

    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' );
    Tnace

    (@radiocure1)

    Thanks @optimizingmatters, I didn’t realize that!

    Tnace

    (@radiocure1)

    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

    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

    (@sebd86)

    @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.

    Tnace

    (@radiocure1)

    Any idea on how to get the theme to load the full post?

    Plugin Author Sébastien Dumont

    (@sebd86)

    I will take a look at the theme.

    Tnace

    (@radiocure1)

    Thanks Sebastien

    • This reply was modified 5 months ago by  Tnace.
    Plugin Author Sébastien Dumont

    (@sebd86)

    I’m sorry but this is a public forum and can not mark replies private.

    Tnace

    (@radiocure1)

    Np, edited the previous reply.

    Plugin Author Sébastien Dumont

    (@sebd86)

    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)
  • You must be logged in to reply to this topic.