Back to directory goes to wrong page

Home Forums Gravity Forms Directory & Addons Back to directory goes to wrong page

This topic contains 8 replies, has 2 voices, and was last updated by  Jonathan Perrodin 12 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2673

    Anton Zuiker

    I’ve got a directory working on a page, and can click through to a single entry. But, the ‘Back to directory’ link goes to a page with a different GF form altogether. Suggestions?

    #2678

    Zack Katz
    Member

    Please provide a link.

    #2705

    Daniel Millbank

    Try to put this in your functions.php page. It should fix it. You’ll have to modify the links to match the ones on your website.

    // This generates the correct backlink for the member directory

    add_filter(‘kws_gf_directory_backlink’, ‘link_to_member_directory’);
    function link_to_member_directory($entryback)
    return str_replace(‘http://the_url_that_it_goes_to_now’, ‘http://the_url_you_want_it_to_go_to’, $entryback);

    #3545

    Tony

    I have the same issue with two sites. I suspect it has to do with having multiple gravity forms since the back button goes to form id 1.

    I hacked around it client side with jquery.
    jQuery(‘.entryback a’).attr(‘href’,'/members/’);
    jQuery(‘#nav-main a:contains(“Policies”)’).attr(‘href’,'/members/’);

    #4528

    Wayne Cox

    I’m having the same problem described in the initial post. The “Back to directory” link takes me to, randomly enough, the “Contact Us” page.

    http://www.2011yes.com/laruecountychamber/member-directory

    I’ve not found a browser that it works in except Safari on the iPad. For some reason, it works there!

    I’d appreciate any insight -
    Thanks
    Wayne

    #4567

    Zack Katz
    Member

    @Wayne (and possibly others), your site’s navigation has a funky interaction with the plugin; it adds the different “query args” to the nav links. I think since your “Contact” link is the last in the navigation, it’s being used for the get_permalink() function.

    That WP loop should be reset using wp_reset_query and it would likely fix the issue.

    I am also fixing this issue in version 3.2.2 by telling the get_permalink() function to use the current page/post’s ID for building the back link.

    #4583

    Wayne Cox

    Zack – thanks for your reply.

    Unfortunately, I’m not following you on the WP loop reset thing … (just my ignorance/inexperience). So I’ll await v. 3.2.2! Thanks for a great plugin!

    Best wishes,
    Wayne

    #4630

    Marina

    I have the most recent version and instead of going back, it loops back to the listing; the link in the top navbar is also replaced with the link to full current entry. (I know it’s ugly :) -> see here.

    Thanks!

    #4744

    Jonathan Perrodin

    I’m having this issue also. The back to directory link is the same as the current entry page.

    http://arkansasorthodontics.com/seminar-user-edit/entry/14/4738/

    Can you help?

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.