WordPress.org

Ready to get started?Download WordPress

Forums

Show calendar in another blog's sidebar? (6 posts)

  1. diagonalizable
    Member
    Posted 8 years ago #

    Is there anyway to show the calendar from Blog A in the sidebar for Blog B?
    Clicking on anything would take you to the correct post in Blog A.
    And actually I mean specifically EventCalendar3, just to make it more interesting.

    I was able to make this work with the search, is it even possible with the calendar?

  2. diagonalizable
    Member
    Posted 8 years ago #

    **bump- with more info**

    I dunno if nobody read this, or if they read it and didn't respond cause it's not possible. Please let me know if it's a lost cause.

    My blogs are http://www.uncoolkids.com [EVENTS] and http://www.uncoolkids.com/reviews [REVIEWS]

    I want to show the event_calendar3 for [EVENTS] in the sidebar for [REVIEWS], to keep up continuity. I know because of the loop it's usually not possible, but I thought since one of them was a subdirectory of the other it might be. . .??????

  3. moshu
    Member
    Posted 8 years ago #

    My guess is - it is not possible. Since every content (including the calendar, the ec3 etc.) is stored in the database, your blog can connect only to one database, not two.

    You can show the calendar on a non-WP page (I know, I do it), but not on another blog.

  4. diagonalizable
    Member
    Posted 8 years ago #

    That's what I was afraid of. Thanks for the answer.

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    your blog can connect only to one database, not two.

    Says who? Since WPDB is a class, connecting to another database just means knowing the relevant information.

    At the bottom of the wp-db file, you can see how it connects in the first place:
    $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);

    So do something like that, only with different information:
    $other_blog_db = new wpdb(user,pass,name,host);

    Then you can access that database's information through your newly created object. It won't be *easy*, mind you, but it is entirely possible.

  6. diagonalizable
    Member
    Posted 8 years ago #

    Otto42-
    Thanks for the info, I never thought about that. You've given me hope and I will play!

Topic Closed

This topic has been closed to new replies.

About this Topic