Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

for a small project i need to assign the The Events Calendar Plugin to an subpage but i've found no solution in the documentation.

Does anyone know if this is possible or has an idea to get it done?

Regards

share|improve this question
1  
What do you mean by "assign to an subpage"? –  Tim Bezhashvyly Aug 3 '11 at 13:32
    
are you using the free version from the WordPress Plugin directory? or you have the new paid version? Because the shortcode suggested by Zach and @FriendlyWP is not available in free version. –  Hameedullah Khan Aug 4 '11 at 6:56
    
I'm using the free version... –  gearsdigital Aug 11 '11 at 12:10
    
How come you re-accepted the other guys answer? To do that you need the paid version, which you said you don't have =s –  Tom J Nowell Oct 26 '11 at 10:29

3 Answers 3

up vote 1 down vote accepted

Here's a basic page template for displaying an events calendar in grid form based on the grid template bundled with the plugin. Edit as necessary to match the styling and layout of your theme:

<?php

/**
 * Template Name: Event Gridview
 **/
global $spEvents;
$spEvents->loadDomainStylesScripts();
get_header();

query_posts('post_type=post&category_name=Events&posts_per_page=-1');
?>
    <div id="tec-content" class="grid">
        <div id='tec-events-calendar-header' class="clearfix">
            <h2 class="tec-cal-title"><?php _e('Calendar of Events', $spEvents->pluginDomain) ?></h2>
            <span class='tec-month-nav'>
                <span class='tec-prev-month'>
                    <a href='<?php echo events_get_previous_month_link(); ?>'>
                    &#x2190; <?php echo events_get_previous_month_text(); ?>
                    </a>
                </span>

                <?php get_jump_to_date_calendar( "tec-" ); ?>

                <span class='tec-next-month'>
                    <a href='<?php echo events_get_next_month_link(); ?>'>              
                    <?php echo events_get_next_month_text(); ?> &#x2192; 
                    </a>
                </span>
            </span>

            <span class='tec-calendar-buttons'> 
                <a class='tec-button-off' href='<?php echo events_get_listview_link(); ?>'><?php _e('Event List', $spEvents->pluginDomain)?></a>
                <a class='tec-button-on' href='<?php echo events_get_gridview_link(); ?>'><?php _e('Calendar', $spEvents->pluginDomain)?></a>
            </span>
        </div><!-- tec-events-calendar-header -->
        <?php
        global $wp_query;
        $tecCatObject = get_category( $wp_query->query_vars['cat'])
        ?>
        <a class="ical" href="<?php bloginfo('home'); ?>/?ical=<?php echo $tecCatObject->slug; ?>"><?php _e('iCal Import', $spEvents->pluginDomain) ?></a>
        <?php event_grid_view(); // See the plugins/the-events-calendar/views/table.php template for customization ?>   
    </div>
<?php /* For custom template builders...
       * The following init method should be called before any other loop happens.
       */

wp_reset_query();
$wp_query->init(); ?>
<?php get_footer(); ?>

The key component being the query_posts call after the header is called. You can use this to modify the other template files in the views subfolder of the plugin to adapt the other calendar views into additional page templates.

I have tested this using the free version of the plugin linked in Wordpress v3.2.1, no shortcodes necessary.

share|improve this answer
    
Thanks for accepting =) –  Tom J Nowell Aug 11 '11 at 14:54
1  
Best Answer ihmo! –  gearsdigital Oct 26 '11 at 14:46

Do you mean you want to display the calendar on a sub page? If so you can use this shortcode on the page where you want it to display:

[events-calendar-large] 

Let us know if this isn't what you meant. Best of luck!

share|improve this answer

If you're trying to place it on a php template page you can use

<?php echo do_shortcode('[events-calendar-large]'); ?>

Also, they have quite a bit of information in "Other Notes" on their WordPress plugin page. http://wordpress.org/extend/plugins/the-events-calendar/other_notes/

share|improve this answer
    
are you sure about the shortcode? its not available in the free version of the plugin. –  Hameedullah Khan Aug 4 '11 at 6:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.