Advanced Post List
[resolved] Excluding posts not working correctly (3 posts)

  1. kryvulena
    Posted 3 years ago #

    Hi there

    I use 2 ways to list my posts on my page:

    1. WP loop listing only 2 posts from category "A"

    2. Shortcode built with your plugin - also listing category "A"

    I set the options to exclude current/duplicate post but only 1st of the posts is being excluded. The 2nd one is being repeated by the second list generated by APL.

    I could provide urls to the issue but I'd prefer to send it privately as this regards one of my clients who can't set the site public or announce its address before it's ready to be published.

    Thanks for your help in advance!


  2. EkoJr
    Plugin Author

    Posted 3 years ago #

    That's completely understandable not wanting to provide urls in a public area, but in this case, I already know what the issue is that you are running into.

    The exclude current page setting should be working fine, and it seems that's not the case. The real issue lies with 'exclude duplicates', and there is a good reason why, especially in the manner that you are using it. The 'exclude duplicates' only pertains to the APL plugin.

    Whenever the plugin is used, each time it gathers the posts that it is going to display for a preset post list, it will also store the post IDs in the class variable. So, from the time it is first used on a given page, the post list itself, has the option to exclude those post IDs that the APL plugin has already queried. Which means, any other function and/or plugin that is outside of the APL plugin, will not be stored in the class variable exclude list.

    Creating your own WP loop creates a function that is outside the APL plugin, and isn't added to the exclude list. The exclude functions probably could use some more enhancements like excluding post IDs by created post lists that you don't want repeated, but for now I created a way to exclude any duplicates that may be created by the APL plugin on a given page.

    I would be interested in how you are using the plugin though, and what tasks you are trying to accomplish. Kind of gives me some ideas from time to time for future enhancements, but I guess that would be up to you if you want to share.

  3. kryvulena
    Posted 3 years ago #

    Hi thanks for your quick answer. The only reason I wish not to post public links here is that I could have problems or even lose my job then :(

    I disabled all plugins but yours and it's clear it's not plugin but theme related issue.

    Unfortunately using post IDs' exclusion is not a perfect solution: IDs change as new posts appear automatically = needs changing IDs in APL cfg each time news will be updated = extra work and not handy.

    How can I pass a priv message to you with the link/login?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Post List
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.