Back to directory goes to wrong page

HomeForumsGravity Forms Directory & AddonsBack to directory goes to wrong page

This topic has 2 voices, contains 7 replies, and was last updated by  Marina 60 days ago.

Viewing 8 posts - 1 through 8 (of 8 total)
Author Posts
Author Posts
October 12, 2011 at 2:30 pm #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?

October 13, 2011 at 10:12 am #2678

Zack Katz

Please provide a link.

October 17, 2011 at 1:20 pm #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);

November 10, 2011 at 2:26 pm #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/’);

February 1, 2012 at 3:10 pm #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

February 15, 2012 at 12:21 pm #4567

Zack Katz

@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.

February 22, 2012 at 7:12 pm #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

March 17, 2012 at 6:17 pm #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!

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Back to directory goes to wrong page
Your information:






<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>