Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #42759
    Anonymous
    Inactive

    I’m trying to create an “archive” page using a list of past events, with a different format than the main events list. I’m trying two different approaches, and neither are working.

    The first plan was to use the shortcode, but it is somehow ignoring my format tag and also putting some extra text into the output. So then I thought I’d try putting in a widget, but the eventslist widget isn’t pulling past events. When I ask for past, it says “no events” and when I ask for all, it only gives me future events.

    My page is: http://www.onefeinday.com/sdincose/archives/

    The first section is the widget, currently set to pull “all”. (The sidebar is another widget set to pull only future.)

    The second section is the shortcode, just to see what’s going on: [events_list scope=past order=DESC limit=0]

    The third section is this:

    <ul>[events_list scope=past order=DESC limit=0 format=”

    <li>#M #j #Y – #_LINKEDNAME #_ATT{SPEAKER}[events_if tag='#ESC_ATT{SPEAKER}'] [events_if2 tag='#ESC_ATT{TOPIC}'] on [/events_if2][/events_if]<em>#_ATT{TOPIC}</em></li>

    “]</ul>

    Any idea how to make this work? Or how to make the widget pull past events (since I’m hopeful I can make the formatting work there)?

    Thanks!

    #47621
    Franky
    Keymaster

    Formatting should always work, but you need to be careful with quotes there.

    The widget works just fine for past events, see my example on http://www.e-dynamics.be/wordpress

    You can also use a filter, see http://www.e-dynamics.be/wordpress/?cat=41

    #47622
    Anonymous
    Inactive

    * Hrm. I think all of my quotes are matched correctly. How would you suggest I tackle the quotes, since I need quotes to surround the entire format tag and I need quotes to identify the events_if tags? Do I perhaps not need all of those quotes?

    * Any ideas on why my widget isn’t pulling past events? I’ve got it set to pull all events, but as you can see it’s only pulling future events. There are clearly past events in the database, since the second and third calls on the page are pulling them. What can I do to troubleshoot?

    #47623
    Franky
    Keymaster

    Concerning the quotes: I can’t tell from here. I would need to see/experiment for myself with your settings.

    The widget: no idea. Again I would need to test on your system myself, and maybe get a dump of your db.

    #47624
    Anonymous
    Inactive

    Is that something you’d be willing to try? I could set you up with a WordPress account, since it’s still a pre-production site.

    #47625
    Franky
    Keymaster

    Well sure, mail me an account: liedekef [at] telenet.be

    But I can’t promise you anything before tomorrow evening though (probably Wednesday, construction works are starting here …)

    #47626
    Anonymous
    Inactive

    Done. Thanks! (Please let me know if the email didn’t come through; I’m not positive I have that part configured correctly…)

    #47627
    Franky
    Keymaster

    Mail arrived ok. The widget works fine: when selecting past events, make sure you select the correct category (or none) to show: you only have 2 past events and they have no category.

    Is that enough?

    #47628
    Anonymous
    Inactive

    OK, I feel pretty silly about the widget/category thing. Thanks for that.

    I’d love to get the shortcode/quotes working, too, though, since I think that may prove more versatile in the end. The widget was just a workaround…

    #47629
    Franky
    Keymaster

    Ok, the format issue is a bit weird. I’m moving this to bugs so I don’t forget to look at it.

    For reference to myself: the problem seems to be with encapsulated shortcodes (which I don’t know if wordpress supports fully). The page content:

    <ul>[events_list scope=past order=DESC limit=0 format="<li>#M #j #Y - #_LINKEDNAME #_ATT{SPEAKER}[events_if tag='#ESC_ATT{SPEAKER}'] [events_if2 tag='#ESC_ATT{TOPIC}'] on <em>#_ATT{TOPIC}</em> [/events_if2] [/events_if] </li>"] </ul>

    #47630
    Anonymous
    Inactive

    OK, I’ll run with the widget for now. I took the shortcodes out of the page. Thanks again!

    PS, to help other troubleshooters — I had a similar (looking) problem with the formatting in my widget, which turned out to be caused by inadvertently having back to back brackets. I didn’t see it in my code, because they were separated by a placeholder. But when the placeholder’s value was empty, that space went away…

    #47631
    Franky
    Keymaster

    It’s a wordpress thing: encapsulated shortcodes are screwing things up, so you can’t use a shortcode (something with “[…]” inside another shortcode. See the limitations section on the wordpress API page: http://codex.wordpress.org/Shortcode_API

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top