WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms Directory
[resolved] "back to directory" link on entry details p (24 posts)

  1. tmuka
    Member
    Posted 2 years ago #

    Not sure why the "back to directory" link on entry details page is linking to the wrong page. The page instead of my "members" page, it is linking to my "contact" page which also has a gravity form on it with a form id=2 instead of 1. It's probably a small bug to fix- i may dig around in the code to see what I can do.

    http://wordpress.org/extend/plugins/gravity-forms-addons/

  2. rebl27
    Member
    Posted 2 years ago #

    I'm having the same problem. "back to directory" goes to my download page, which does not have a gravity form on it. It happens in Foxfire 9 with WP 3.0.

  3. orgassist
    Member
    Posted 2 years ago #

    For me, it's linking back to my main blog page.

  4. rsainteractive
    Member
    Posted 2 years ago #

    There seems to be a bug with WP's menu and the "back to" link. When I click to view a single entry, WP's menu gets the URL parameters appended to each item. This seems to only be affecting pages and not post categories.

    That said, a person could probably hard code (ewwwwwwww) in your link in place of $href in gravity-forms-addons.php on this line:

    $link = apply_filters('kws_gf_directory_backlink', '<p class="entryback"><a href="'.$href.'">'.esc_html($entryback).'</a></p>', $href, $entryback);

    I'm still tinkering and if I find the issue, I'll post the solution.

  5. Zack Katz
    Member
    Plugin Author

    Posted 2 years ago #

    This should be fixed in version 3.2.2. Sorry for the delay; I've been very busy! Please let me know if you continue to have issues.

    Also, @rsainteractive - the proper way to do that would be to create your own link using:

    add_filter('kws_gf_directory_backlink', 'your_custom_link_creator', 3);
    
    function your_custom_link_creator($current_link, $url, $entryback) {
    	// You can return the replacement HTML with a custom url based on the passed $url variable. You could do a str_replace, for example.
    	return $current_link;
    }
  6. tmuka
    Member
    Posted 2 years ago #

    Thanks, Zack, i'll check it out!

  7. rebl27
    Member
    Posted 2 years ago #

    I just uploaded the latest version (3.2.2) using automatic update on the WP Plugin page. Now the "Back to Directory" link just reloads the same single-entry page. If I select Directory from my menu after going to a single-entry page, that same page just re-loads. (This is better than what happened before the update, when I landed on the Download page!) To get back to the table directory, I have to load another page and then reload the directory page.

  8. orgassist
    Member
    Posted 2 years ago #

    I have the same problem as @rebl27. Also, if I display the directory below the single entry, it won't load any other entries, it just keeps loading the same one you're already on.

  9. dmillbank
    Member
    Posted 2 years ago #

    I'm having the same problem as rebl27 and orgassist.

    running GF Directory and Addons 3.2.2

    and GF version 1.6.2

  10. MouseClicks
    Member
    Posted 2 years ago #

    I have v3.2.2 and using permalinks. My back to directory link goes nowhere :(

  11. heintore
    Member
    Posted 2 years ago #

    Same thing happens here: The back link from a single entry just takes you to the same entry instead of the directory overview.

  12. martinog
    Member
    Posted 2 years ago #

    I too am using permalinks. My Back to directory button returns /#lead_row_84

    Has anyone figured out how to delete or stub out "Back to directory"?

    This is a useful plugin, except it doesn't support permalinks. The Search Engines won't index our hundreds of entries.

  13. martinog
    Member
    Posted 2 years ago #

    I found the fix, in the WordPress short code add: entryback=""

  14. MouseClicks
    Member
    Posted 2 years ago #

    Ok, that's great martinog, but where do you put this?

  15. martinog
    Member
    Posted 2 years ago #

    @MouseClcks - You place it in the Shortcode on your WordPress page.

    [directory form="1" page_size="150" approved="true" entryback=""  lightboxsettings="images" sort="1" dir="ASC"]

  16. perrodin
    Member
    Posted 2 years ago #

    The entryback="" shortcode didn't actually fix the problem for me, it just removes the link. Is this the same for everyone else?

  17. DJ Smith
    Member
    Posted 2 years ago #

    Yes, it removed the link if you leave it blank. I believe that shortcode just lets you remove or rename the link. But it doesn't resolve the issue of the link actually not working.

    Anyone come up with a solution?

  18. tmuka
    Member
    Posted 2 years ago #

    FWIW, i'm still using a jQuery workaround to make the link point to the correct place. This code assumes your entries slug is "entry", you'll have to change this snippet if yours is different.

    <script type="text/javascript"><!--
    jQuery(function($) {
        // this hack fixes a bug in the gravity directory plugin that breaks the back to directory links
        $('.entryback a').attr('href',function(i,href){ return href.slice(0,href.indexOf("/entry")); });
    });
    //--></script>

    Hope this helps somebody else!

  19. bigshoeinc
    Member
    Posted 2 years ago #

    @ tmuka. Where exactly do I add this snippet of code? In the meantime, I will try a few things. Thanks in advance.

  20. DJ Smith
    Member
    Posted 2 years ago #

    @bigshoeinc, put the code above in your page that has the directory shortcode. I went into HTML mode and posted the code at the top of my page. Thanks @tmuka for the solutions.

    You wouldn't happen to have a work around for the problem with users editing their own entry?

    Thanks,
    DJ

  21. bigshoeinc
    Member
    Posted 2 years ago #

    Thanks DJ for clearing that up for me. Perfect.

  22. Troy Dunn
    Member
    Posted 2 years ago #

    I have the same problem with the back link. I use permalinks and the back link goes no where. :(

  23. tzeldin88
    Member
    Posted 1 year ago #

    @tmuka -- Thanks, that basically worked for me. I just added that JS to my header.php file, and changed the "$" to "jQuery", so it became

    jQuery(document).ready(function(){
    	jQuery('.entryback a').attr('href',function(i,href){
    		return href.slice(0,href.indexOf("/entry"));
    	});
    });
  24. tmuka
    Member
    Posted 1 year ago #

    glad that helped!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic