Calling a list of Events outside of WordPress directory

Home Forums Calendar Products Events Calendar PRO Calling a list of Events outside of WordPress directory

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #12944
    David
    Participant

    I have the blog that uses ECP installed outside of the root directory, but I want to show event links on a static page in the root directory, like the home page. I was hoping you would be able to send over a simple snippet of code for me to use to do this.

    Here is the code I am currently using to show the latest posts on my home page:

    Latest Post:
    Read More…

    What I am Looking to do:

    Similar to above code, but show the upcoming 3 events on my home page, only showing the “Title” of the event and “Date” next to it, linked up to it’s respective URL.

    Any help would be appreciated. GREAT software BTW.

    #12965
    Rob
    Member

    Hi David. Thanks for the note and for your words on the plugin. If I understand what you want to do correctly, the use of template tags should be able to help you out. Have you checked our template tag documentation on this (https://theeventscalendar.com/support/documentation/) to see if it points you in the right direction?

    #13027
    David
    Participant

    How come the php code didnt show up in my post? Do I need to wrap it with something for it to show up?

    I am not familiar with the template tags or how to use them. I was hoping you could provide me with a quick snippet of code to use so I can guarantee my client I can do what she wants before she purchases a license of ECP.

    #13028
    David
    Participant

    when i say oho code in my post, I am referring to the forum post (the first one above)

    #13029
    David
    Participant

    *oho = php

    #13072
    Rob
    Member

    Hey David. You should be able to add your PHP with the < code > tag. Like this:

    Here is my code.

    Hope that helps. As for the core issue you asked about — a snippet of code — I’ll see what our developer Jonah can offer up. You can expect to hear from him shortly.

    #13094
    David
    Participant

    Ok Thanks Rob, Here is the code I am looking to reproduce, though “events” instead of “posts”:

    Latest Post:
    Read More...

    #13095
    David
    Participant

    [?php
    require(‘blog/wp-blog-header.php’);
    ?]
    [?php query_posts(‘showposts=1’); ?]
    [?php while (have_posts()): the_post(); ?]
    [div]
    [h2]Latest Post: [?php the_title(); ?][/h2]
    [p][?php the_excerpt(); ?] [a href=”/blog/”][strong]Read More…[/strong][/a][/p]
    [/div]

    [?php endwhile; ?]

    #13096
    David
    Participant

    i replaces all the with [] so you could see my code…semms silly, but it worked ; )

    #13104
    Jonah
    Participant

    Hi David, if you take a look at the tribe_get_events function in our documentation I’ve put an example there giving you an idea how you can use this function to query your events wherever you want: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events

    Let me know whether or not that helped.

    – Jonah

    #13509
    David
    Participant

    I think I figured out what I want to do (thanks to your example! in that support page).

    * Just a side note – The forum is clean yes, but I can’t find my posts easily, unless I am missing something?

    #13535
    Rob
    Member

    Hey David. Thanks for the note; glad to hear you got that figured out.

    Appreciate the feedback on the forum, too. This is certainly phase 1 of the forum’s life cycle so it’ll be changing down the road. But to find your own posts, the easiest method I’ve found is just clicking on your name from within a thread. It should show your headshot/bio followed by a list of everything you’ve posted. IE: https://theeventscalendar.com/support/forums/users/supakat111/.

    Hope that helps! Let us know what else we can do.

    #975308
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Calling a list of Events outside of WordPress directory’ is closed to new replies.