Screws up "Recent Blog Post" widget on sidebar…

Home Forums Calendar Products Community Events Screws up "Recent Blog Post" widget on sidebar…

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #114013
    sciotomile
    Participant

    I don’t know what to make of this… If you look at the Recent Blog Posts widget on my side bar you will see that the description/excerpt displayed for each post is “Add Event to Calendar Please fill out the following form as completely as possible. Once you have submitted your event, please allow 1 to 2 business days for approval…” When I increase the word cut off length, I can see that it is just mirroring the entire form. It doesn’t do this on any other events pages… only on the submission form.

    Here is the submission form:
    http://www.sciotomile.com/events/submission/add

    Here is the general events page (as you can see the description/except displays normally in the sidebar):
    http://www.sciotomile.com/events/

    UPDATE (3/11/2014): I fixed this issue but the topic was already “closed”… But I could edit my post, so I wanted to give this info to anyone who needs it. You can see how to fix this problem here: http://wordpress.org/support/topic/excepts-pulling-text-from-the-current-pages-template-and-not-from-recent-posts?replies=11

    #115747
    Casey
    Participant

    sciotomile,
    So sorry that you’re having some theme conflicts here, but hopefully I can help. Basically the ‘recent posts’ widget is incorrectly grabbing post info from the Community page. Can you try adding the following code to the bottom of your edit-event.php file to see if this fixes the issue?


    <?php wp_reset_query(); ?>

    Give that a try, and let me know if that resolves the problem. If not, I can investigate further. Thanks! 🙂

    -Casey-

    #115755
    sciotomile
    Participant

    Thanks… unfortunately that didn’t resolve it 🙁

    #115757
    Casey
    Participant

    Bummer. Ok, could you send me a private reply with a login to the site so I can investigate further? Thanks!

    #115759
    sciotomile
    Participant

    This reply is private.

    #115767
    sciotomile
    Participant

    I sent you a private response… But one other question that is more public…

    When I placed my edited edit-event.php file in the wp-content/themes/my-theme/tribe-events/community/ directory it still pulled the edit-event.php file from:
    wp-content/plugins/the-events-calendar-community-events.3.4/the-events-calendar-community-events/views/community/

    Therefore, I had to edit it and replace the file directly in the plugin… Should the folder in my theme folder be labeled differently in order for it to pull the edited file over the default plugin file? I like having my edited files in the theme folder so that when there are updates to plugin, my changes aren’t wiped out 🙂

    #116084
    Casey
    Participant

    sciotomile,
    I was able to login and see that you’re using a third-party widget (recent posts extended) and not the default ‘Recent Posts’ WordPress widget. I tested your page with the default WordPress widget, and noticed that it’s working correctly (screenshot) on the Community submission page. Since we can’t provide support for third-party plugins, I would recommend reaching out to the developer of this widget to see if they can help you troubleshoot further.

    I’m sorry I’m not able to provide any more help than that, but please let me know if I can help with any other issues.

    Regarding your last question, did you replace the ‘my-theme’ part of the folder path with the folder of your active theme? Thanks!

    -Casey-

    #116209
    sciotomile
    Participant

    [quote]Regarding your last question, did you replace the ‘my-theme’ part of the folder path with the folder of your active theme? Thanks![/quote]

    Yes… I just typed “my-theme” to be generic in this post so that the resolution could be applied to other users sites. Obviously in my case I used wp-content/themes/sciotomile2011/tribe-events/community/

    As to my initial question, The reason the regular “Recent Posts” widget looked fine is because it only is displaying titles… no excerpts. The titles part of the Recent Posts Extended Widget works fine as well… It is the excerpts that seems weird. Anything I add to the edit-event.php file it spits out for each excerpt. Anyway, this is a very common plugin used on a ton of sites that’s why I bring it up. Can you at the very least point me in a direction? It’s not pulling page data or post data for the page from wordpress… it’s getting that content direct from the php template file for the form (edit-event.php). It is an interaction issue since this does NOT happen on any other page — including the other events calendar pages. So it is something in the code for the community events pages that is causing it.

    This plugin generates the excerpt using the following function:
    function rpwe_excerpt( $length ) {$content = get_the_excerpt(); $excerpt = wp_trim_words( $content, $length ); return $excerpt;}

    Could the string being titled $content be the issue?

    #116223
    sciotomile
    Participant

    It does the same thing on the other Community page…

    http://www.sciotomile.com/events/submission/list

    But as you can see this time it pulls “Add New Display Not admin ? Log Out 123 Status Title Organizer Venue Category Recurring? Start Date End Date Conversations & Coffee View”… So it is just pulling all text from any community page. Isn’t that weird?

    #116240
    Casey
    Participant

    The Community add-on uses custom routing and re-writes the WordPress loop in order to display the Event Submission form and other pages. I would suggest modifying the rpwe_excerpt() function to get the excerpt using the post ID. Here’s a good example of getting the_excerpt outside of the WordPress loop: http://uplifted.net/programming/wordpress-get-the-excerpt-automatically-using-the-post-id-outside-of-the-loop/

    I would try using that as an example to re-write the rpwe_excerpt() function and see if that does the trick. I hope that points you in the right direction, and feel free to let me know if you have further questions. Thanks!

    -Casey-

    #118287
    Casey
    Participant

    Great! Thanks for confirming that this got you sorted. Since it looks like you’re all set, I’m going to mark this thread “Answered” and close it out.

    By the way, if you have a minute or two, we would love it if you’d write a few words for us here: http://wordpress.org/support/view/plugin-reviews/the-events-calendar?filter=5

    Thanks in advance. 🙂

    Cheers,
    Casey

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Screws up "Recent Blog Post" widget on sidebar…’ is closed to new replies.