• Resolved Blipp

    (@blipp)


    I am trying out your PTA plugin which looks perfect for what I need but I am seeing an issue with it that makes it unusable.

    When I try to click on a link to view more info on each member I just get a message

    404,Page Not Found
    Sorry, the page you are looking for could not be found.

    Any idea why this might be and more importantly how I might fix it?

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

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

    (@dbar-productions)

    Can you tell me what theme you are using? Also, what WordPress version and your permalink settings?

    It’s working fine for me and many others, so I’m guessing it’s something in your theme or something else that is screwing up the links to the “member” custom posts.

    Members are just a custom post type, and the link should just be to each post. If you have your WordPress Permalinks set to “Post name”, the link should look like:
    https://yoursite.com/member/somemember-name

    The more info link is simply generated from the built-in WordPress get_permalink function for that particular post ID, so it should work no matter what you have your permalink settings at.

    Another possibility is a security plugin or some other plugin is not allowing links to custom post types?

    If you want to find out where the conflict or problem is, I would first suggest switching to another theme first (like one of the default themes), just to see if that fixes the problem… then you will know it’s something in your theme. If it still doesn’t work with one of the default themes, then deactivate all other plugins and see if it works. If it works then, you know there is a conflict with one of the other plugins, and you can activate them one at a time until you figure out where the conflict is.

    If you find a conflict, let me know, although it would probably be something that the developers for that theme or plugin would have to fix, as my plugin is using a simple custom post type and using the standard method of getting the permalink to those posts from the built-in WordPress get_permalink function.

    Thread Starter Blipp

    (@blipp)

    I am using a theme called Timeline from Themeforest and my permalink settings are /%category%/%postname%/

    I get the issue even if I just try and view page as well as if I use the link so something is blocking it.

    Even if I switch to Twenty Eleven theme I am not getting the page – just

    This is somewhat embarrassing, isn’t it?

    It seems we can’t find what you’re looking for. Perhaps searching, or one of the links below, can help.

    I have also tried disabling the plugins – same problem.

    https://www.workspaceoxford.com/community/member-directory/

    Thread Starter Blipp

    (@blipp)

    It might be easier actually just to take the link off altogether. It’s a shame as I would much rather it link through to another page but if I did want to remove the link which file would I need to edit please?

    Plugin Author DBAR Productions

    (@dbar-productions)

    Do you have any pages on your site called member or members? If so, that could cause a conflict with the permalinks to a single member post. You might want to rename any pages whose permalink includes “member” or “members” to avoid conflicts. You could also try changing the permalink structure on your site.

    Sometimes just resaving the permalinks options will fix things if changes have been made in the theme or other plugins that do custom post types. My plugin forces a rewrite flush when the custom post type is created, but saving the permalinks again will force another rewrite flush, which could fix things.

    Other things you can check before modifying the plugin can be found in this post (scroll down to the “things to check” section):
    https://dreamdare.org/blog/tips-tricks/how-to-fix-wordpress-custom-post-type-permalink-404-error/

    If you want to not show that more info link, you need to simply comment out lines 252 to 255 in the pta-display-directory.php file, which can be found in the “includes” folder of the plugin.

    I may include that as an option in the next update in case anyone else is having similar conflicts with their permalinks.

    Plugin Author DBAR Productions

    (@dbar-productions)

    OH… with an internet search, it seems to be a common issue that if your permalink structure is set to /%category%/%postname%/ , there are often 404 errors with custom post types. So, try changing that first to see if that fixes the problem. I always just use the “postname” setting for permalinks on my site, and never had any problems.

    Plugin Author DBAR Productions

    (@dbar-productions)

    Also, I checked the link to your page, and see you are showing photos. The photos are also linked to the the individual pages, so you would need to edit line 247 in that same file I mentioned above to remove the link from the photos. In other words, change it to be simply:
    $return .= $image;

    But first, I would try playing around with your permalink structures a bit, as I think that will solve the problem for you.

    I’m not sure there is anything I can do differently in my code to fix what seems to be a common problem with custom post types and some permalink structures. I will study more of the results from Google searches to see if there is something else that can be added to the custom post type setup that fixes those problems.

    Plugin Author DBAR Productions

    (@dbar-productions)

    I have also tried setting my own permalink structure to:
    /%category%/%postname%
    and it works fine on my test server with a couple of different themes (2012 and U-Design).
    So, I don’t think there is anything in particular in my plugin that is causing the not found errors. I’m using latest wordpress version as well.

    Resave the permalinks option to flush the rewrite cache and/or try a different permalink setting.

    Plugin Author DBAR Productions

    (@dbar-productions)

    Something else that could be helpful if your server is using CentOS6:

    https://www.mobiledataup.com/fix-wordpress-permalink-404-error-with-centos-6/

    Thread Starter Blipp

    (@blipp)

    Many thanks for all these suggestions but having tried them I am still getting the error unfortunately. For now I have removed the link and will continue to try and get it working since appart from the link it does just what I need.

    One more question though. Can you tell me which page is generating the headings above the directory listing

    Company, Name, Phone, Email

    I need to change the styling on them but can not see where they are pulled in from.

    Plugin Author DBAR Productions

    (@dbar-productions)

    There is not much styling of that table that displays the directory. I leave table styling mostly up to the theme so it looks consistent with your site. There is a small CSS file in the /includes/css directory called pta-contact-form.css

    Initially I just did styling to the contact form, but I added a couple of lines in there for the directory table, one to make the width 100%, and the other to align the table-headers left.

    So, if you want to change the table styles, the CSS class for the table is:
    pta_directory_table
    For example, here is my little bit of CSS for the table:

    table.pta_directory_table { width: 100%;}
    .pta_directory_table th { text-align: left;}

    You can make changes in that file, or if your theme has a place where you can enter custom CSS, you can put it in there so it doesn’t get changed if you update this plugin.

    If you are looking to change the actual header text (not the style), that can also be found in that pta-display-directory.php file. Look near the top in lines 48-56. I put all my display text there in translation ready strings. You can either edit the file directory, or use one of those plugins that let you create/edit your own translation, and overwrite that text with a translation file.

    Note that the text for the “Position” and “Location” column headers are actually set on the plugin options page. All the other columns are set in those lines of the file I mentioned above.

    Thread Starter Blipp

    (@blipp)

    All I am trying to do is get the columns headers to show uppercase. I tried

    .pta_directory_table th {text-transform:uppercase;}

    but that does not seem to work.

    Plugin Author DBAR Productions

    (@dbar-productions)

    If I add that line to the pta-contact-form.css file, it works fine for me, and I get the headers in all caps. It also works for me if I add it to my theme’s stylesheet.

    Sounds like something in your theme CSS is overriding it, or, if you put it in your theme CSS, make sure it’s actually getting loaded (for example, in the U-Design theme there is an option to enable the CSS file that you edit from Appearance->editor, and it’s turned off by default since they put all their styles in another file deeper in their folder that they don’t want you to edit).

    Thread Starter Blipp

    (@blipp)

    I will keep trying. Many thanks

    Plugin Author DBAR Productions

    (@dbar-productions)

    Sorry I can’t be of more help, but these issues seem like theme issues, and you may want to post something on their support forum to see if they have any suggestions.

    For the table headers, I would search through their theme CSS and look for any th settings, especially those with !important after them that may be overriding other CSS styles.

    If you want to send me a copy of the theme, I can install it on my test server and see if I can reproduce the issues here, which would at least let us know if it’s a theme issue, or if it’s some other plugin conflict or server problem. If you want to do that, contact me through my web site that is linked in my profile.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Member more info pages’ is closed to new replies.