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.
-
AuthorPosts
-
October 12, 2011 at 2:30 pm #2673
Anton ZuikerI’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?
October 13, 2011 at 10:12 am #2678Please provide a link.
October 17, 2011 at 1:20 pm #2705
Daniel MillbankTry 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);
November 10, 2011 at 2:26 pm #3545
TonyI 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/’);February 1, 2012 at 3:10 pm #4528
Wayne CoxI’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
WayneFebruary 15, 2012 at 12:21 pm #4567@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_queryand 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.February 22, 2012 at 7:12 pm #4583
Wayne CoxZack – 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,
WayneMarch 17, 2012 at 6:17 pm #4630
MarinaI 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!
June 20, 2012 at 11:39 am #4744
Jonathan PerrodinI’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?
-
AuthorPosts
You must be logged in to reply to this topic.
