• Resolved MM

    (@reginawebsolutions)


    Hi! AWESOME Plugin. Been building with WP for 3 years now but plugins like this remind me of what I miss about Joomla.

    So I have inserted the [pta_member_directory] shortcode into a page, and the member directory is functioning properly.

    However, at the end of the table, there is an erroneous title being generated, based on the name of the last person in the table. Here is an image of what is being generated:

    https://oi40.tinypic.com/10dcy2x.jpg

    Here is a link to the page in question:

    https://goo.gl/ctHP9a

    A last-undesirable-resort would be to disable the title for this page with some custom css, which ends up removing both the correct title, and the erroneous title.

    The theme support has been unable to figure out what’s going on so far.

    Warm Regards,

    MM

    https://www.ads-software.com/plugins/pta-member-directory/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author DBAR Productions

    (@dbar-productions)

    All that shortcode does is generate a table, those other divs and sections are all being generated by your theme.

    Since members are a custom post type, when the directory table is generated, a new WordPress Query object is made for each position and it loops through the retrieved posts in the normal fashion.

    It appears to me that you might have put this shortcode on a POST instead of a PAGE?? Because it seems like your theme is using its POST template, and showing the meta for the last post in the query at the bottom, as well as a link to the previous POST under a section called POST Navigation.

    If that’s indeed the case, switch your directory to a PAGE instead of a POST, and that should fix your problem.

    If it is on a PAGE already, then you are going to need to create a special template for the directory that gets rid of all that extra stuff, although I don’t see why they would be including POST meta and next/previous post links at the bottom of a PAGE template.

    The other possibility is that you have some other plugin hooking into your footers and generated POST meta and navigation links based on the most recent WP_Query object.

    My plugin definitely uses WP_Query to generate the directory listings, so you don’t want to use it on any kind of POST template or POST archive template.

    Thread Starter MM

    (@reginawebsolutions)

    Thank you!

    That worked. Marking as resolved.

    Plugin Author DBAR Productions

    (@dbar-productions)

    Great! Glad it fixed the problem for you.

    Thread Starter MM

    (@reginawebsolutions)

    More or less … a workaround for now.

    Either way it’s a theme issue. You helped diagnose the problem, so hopefully it will provide a little more insight into the possible fix. I really want to use this plugin.

    Plugin Author DBAR Productions

    (@dbar-productions)

    I haven’t had any reports of that kind of behavior with other themes, nor with any of the themes I have tested it with. It’s definitely a theme issue, and I don’t believe there is anything I could change in my plugin that would fix it.

    Let me know if you come across any other issues.

    Been super busy with several album mixing projects, so haven’t had time to work on this for a little while now… have some extensions for it in the works that will be separate plugins, so people can install only the ones for the features they want. The plugin already does a lot more than what I originally designed it for (school PTA web site).

    Plugin Author DBAR Productions

    (@dbar-productions)

    I finally ran across this problem with a new theme I was trying out for another client, and found a simple WordPress command that lets me reset global post data after I do my little sub-loop to create the directory. This seems to fix the problem, at least with the theme I tested with.

    So, if you update to the latest version, you want have to modify the theme’s templates to correct this issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Erroneously creating a new header title, based on the last member in list’ is closed to new replies.