• Resolved BigfootNetworks

    (@bigfootnetworks)


    Hi There
    I was wondering if you could help.
    I would like more than on sticky list to appear on a particular wordpress page.

    Ideally I would have one long list and it would show are entries but I would be happy with multiple lists also.

    I assumed you could just add the shortcodes to the page but it doesnt seem to work.

    [stickylist id='1']
    [stickylist id='5']

    Can you help?
    Thanks

    https://wordpress.org/plugins/gravity-forms-sticky-list/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author fried_eggz

    (@fried_eggz)

    That should work. What happens when you put that in a post?

    Thread Starter BigfootNetworks

    (@bigfootnetworks)

    when i do that neither of the lists show?
    If I test each one they all appear independently.

    The forms are similar and use the same fields names for search purposes.

    Would that make a difference?

    Plugin Author fried_eggz

    (@fried_eggz)

    That is strange. Can you please try and turn on WP_DEBUG and post the output (if any) here.

    Thread Starter BigfootNetworks

    (@bigfootnetworks)

    I turned on Debug and got this on the screen when trying to load the page with 2 lists on.

    Fatal error: Cannot redeclare get_sticky_setting() (previously declared in /home/sites/awlinspection.net/public_html/wp-content/plugins/gravity-forms-sticky-list/class-sticky-list.php:217) in /home/sites/awlinspection.net/public_html/wp-content/plugins/gravity-forms-sticky-list/class-sticky-list.php on line 217

    Any ideas?

    Plugin Author fried_eggz

    (@fried_eggz)

    Ok, it seems that you are using an older version of Sticky List. This issue was fixed in 1.2.10 (latest version is 1.2.12). Updating Sticky List should solve this issue. You can see the changelog here.

    Thread Starter BigfootNetworks

    (@bigfootnetworks)

    That’s done the trick.
    thanks very much for your help.

    Plugin Author fried_eggz

    (@fried_eggz)

    No probelm. If you like the plugin after having used it for a while, please consider writing a short review. Thanks!

    Hi – I have a related issue.

    I can include multiple [stickylist] shortcodes on the same page, but because the delete <script> block is included for EACH sticky, it means the window.listUpdated() function gets subsequently overwritten, and so uses the wrong form ID in the ajax call. (The form_id is hardcoded into each script block)

    Would it be possible to scope the .click() function in each script block? Something like

    $(‘#stick-list-wrapper_X .sticky-list-delete’).click(…

    Where X is the form ID being hardcoded into the script block? That way, each <script> block would only target the delete button in its shortcode output.

    Even better – perhaps either make the onload function anonymous (or at least unique, by including the form ID) so that it doesn’t get overwritten at all? Looking at a test I did, it seems the first [sticklist] will set the function, and subsequent shortcode functions get ignored.

    Is this doable?

    Thanks!

    Plugin Author fried_eggz

    (@fried_eggz)

    Thanks for the detailed bug report. It’s absolutely doable and I’ll fix this in the next release. I’m on a work trip atm but I’ll try to get this updated within a couple of days.

    Also, if you like, you can submit a pull request on the Github page. See link in description.

    Sweet! Not done much collab with Git before but if I get a sec, I’ll try a pull request.

    Either way, I sent you few bucks to say thanks for the quick reply! Your plugin is a small part of a client project I’m making, and I’m trying to avoid having to use the more complex (but awesome) GravityView plugin.

    Plugin Author fried_eggz

    (@fried_eggz)

    I have fixed this. I added scope to the delete function as you suggested. I will release an update later today. Let me know if it works for you.

    …and thanks for the donation!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Multiple Sticky lists on one page…’ is closed to new replies.