Templates not working

This topic contains 9 replies, has 2 voices, and was last updated by  Justine 11 years, 1 month ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3660

    I have a problem insofar as when I enable templates in the general settings of the event organiser it means that none of the content fits with my theme – the text is too big and pushes the sidebar to the bottom of the screen and the fonts and colours are all wrong, however if I disable templates, whilst it all looks perfect and fits in nicely with the theme it no longer displays any dates for any of the events, it simply shows the date it was created. Furthermore it no longer shows the venue or the category.
    I understand that I may have to edit the default template to make this work, but I have no understanding of coding so would not know where to start. I have looked at your guidance on http://wp-event-organiser.com/documentation/editing-the-templates/ but have to be honest that it makes no sense to me. Can you possible help please?

    Justine
    #3672

    Hi Justine,

    Hopefully the single event page looks ok? (1.7 improved theme compatibility in that respect).

    As for http://wp-event-organiser.com/documentation/editing-the-templates/ – your theme has different files (usually called templates) for displaying different content. For instance it should have a single.php for displaying single posts. It may have a category.php for displaying posts in some category, and page.php for displaying pages.

    Typically it will not have:

    • single-event.php – The template for displaying an event
      • archive-event.php The template for displaying listings of evens.
      • taxonomy-event-venue.php The template for displaying listings of events at a particular venue
      • taxonomy-event-category.php The template for displaying listings of events at a particular event category

    But you can think of single-event.php being as single.php for events, archive-event.php as a archive.php for events, and the rest as a bit like category.php. So as a starting point you can use the templates that already exist in your theme as a template for the events (just copy them and give them the appropriate name).

    But obviously they won’t display any event details – to do that you’ll need to add in appropriate functions to display event details. For that you can look at how the plug-in provided templates do it, and just mimic it. Hopefully then it will look fully integrated into your theme.

    I hope that helps. (I’m not sure what else I can say unless you have a specific question).

    Stephen Harris
    #3689

    The Single Event page looks fine – it is the page that displays the full list of events that I have a problem with. Which template do I need to change to make that look ok?

    Justine
    #3690

    Cancel last – I have found it. I am almost there, only now I seem to have a listing in the correct format followed by another listing in the wrong format and by sidebar is still pushed to bottom. Please look at http://www.justyourtype.org/DriffCycTest/?post_type=event to see what I mean. Any ideas what I have done wrong here???

    Justine
    #3691

    This is what my archive-event file now says; are you able to edit it for me so that it does what I need it to?:

    <

    div id=”content” class=”narrowcolumn”>

    Archive for the ‘’ Category

    Posts Tagged ‘’

    Archive for

    Archive for

    Archive for

    Author Archive

    Blog Archives

    <div >
    <h3 id="post-“><a href="” rel=”bookmark” title=”Permanent Link to “>

    <?php the_tags('Tags: ', ', ', '’); ?> Posted in |

    <?php else :
    if ( is_category() ) { // If this is a category archive
    printf("Sorry, but there aren’t any posts in the %s category yet.”, single_cat_title(”,false));
    } else if ( is_date() ) { // If this is a date archive
    echo(“Sorry, but there aren’t any posts with this date.”);
    } else if ( is_author() ) { // If this is a category archive
    $userdata = get_userdatabylogin(get_query_var(‘author_name’));
    printf(“Sorry, but there aren’t any posts by %s yet.”, $userdata->display_name);
    } else {
    echo(“No posts found.”);
    }
    get_search_form();
    endif;
    ?>

        <!-- Page header-->
    
    
    
    
    
    
    
    
            <!-- Navigate between pages-->
            <!-- In TwentyEleven theme this is done by twentyeleven_content_nav-->
            max_num_pages &gt; 1 ) : ?&gt;
    
                    &lt;?php next_posts_link( __( &#039;Later events &rarr;' , 'eventorganiser' ) ); ?&gt;
                    &lt;?php previous_posts_link( __( &#039; &larr; Newer events', 'eventorganiser' ) ); ?&gt;
                <!-- #nav-above -->
    
    
    
    
    
    
            &lt;article id=&quot;post-" &gt;
    
    
    
                &lt;a href=&quot;"&gt;
                    'float:left;margin-right:20px;'));
    
                        //Display the title
                        the_title()
                    ;?&gt;
                </a>
    
    
    
    
                    <!-- Output the date of the occurrence-->
    
                        &lt;time itemprop=&quot;startDate&quot; datetime=&quot;"&gt;
    
                    <!-- Display event meta list -->
    
    
                    <!-- Event excerpt -->
    
    
                <!-- .event-entry-meta -->            
    
    
                <!-- .entry-header -->
    
            &lt;!-- #post- --&gt;
    
    
            <!--The Loop ends-->
    
        <!-- Navigate between pages-->
        max_num_pages &gt; 1 ) : ?&gt;
    
                    &lt;?php next_posts_link( __( &#039;Later events &larr;' , 'eventorganiser' ) ); ?&gt;
                    &lt;?php previous_posts_link( __( &#039; &rarr; Newer events', 'eventorganiser' ) ); ?&gt;
                <!-- #nav-below -->
    
    
    
            <!-- If there are no events -->
    
    
    
                <!-- .entry-header -->
    
    
    
                <!-- .entry-content -->
            <!-- #post-0 -->
    
    
    
            <!-- #content -->
    

    Justine
    #3692

    Actually that copied wrong – trying again:

    <?php

    get_header();
    ?>

    <

    div id=”content” class=”narrowcolumn”>

    Archive for the ‘’ Category

    Posts Tagged ‘’

    Archive for

    Archive for

    Archive for

    Author Archive

    Blog Archives

    <div >
    <h3 id="post-“><a href="” rel=”bookmark” title=”Permanent Link to “>

    <?php the_tags('Tags: ', ', ', '’); ?> Posted in |

    <?php else :
    if ( is_category() ) { // If this is a category archive
    printf("Sorry, but there aren’t any posts in the %s category yet.”, single_cat_title(”,false));
    } else if ( is_date() ) { // If this is a date archive
    echo(“Sorry, but there aren’t any posts with this date.”);
    } else if ( is_author() ) { // If this is a category archive
    $userdata = get_userdatabylogin(get_query_var(‘author_name’));
    printf(“Sorry, but there aren’t any posts by %s yet.”, $userdata->display_name);
    } else {
    echo(“No posts found.”);
    }
    get_search_form();
    endif;
    ?>

        <!-- Page header-->
    
    
    
    
    
    
    
    
            <!-- Navigate between pages-->
            <!-- In TwentyEleven theme this is done by twentyeleven_content_nav-->
            max_num_pages &gt; 1 ) : ?&gt;
    
                    &lt;?php next_posts_link( __( &#039;Later events &rarr;' , 'eventorganiser' ) ); ?&gt;
                    &lt;?php previous_posts_link( __( &#039; &larr; Newer events', 'eventorganiser' ) ); ?&gt;
                <!-- #nav-above -->
    
    
    
    
    
    
            &lt;article id=&quot;post-" &gt;
    
    
    
                &lt;a href=&quot;"&gt;
                    'float:left;margin-right:20px;'));
    
                        //Display the title
                        the_title()
                    ;?&gt;
                </a>
    
    
    
    
                    <!-- Output the date of the occurrence-->
    
                        &lt;time itemprop=&quot;startDate&quot; datetime=&quot;"&gt;
    
                    <!-- Display event meta list -->
    
    
                    <!-- Event excerpt -->
    
    
                <!-- .event-entry-meta -->            
    
    
                <!-- .entry-header -->
    
            &lt;!-- #post- --&gt;
    
    
            <!--The Loop ends-->
    
        <!-- Navigate between pages-->
        max_num_pages &gt; 1 ) : ?&gt;
    
                    &lt;?php next_posts_link( __( &#039;Later events &larr;' , 'eventorganiser' ) ); ?&gt;
                    &lt;?php previous_posts_link( __( &#039; &rarr; Newer events', 'eventorganiser' ) ); ?&gt;
                <!-- #nav-below -->
    
    
    
            <!-- If there are no events -->
    
    
    
                <!-- .entry-header -->
    
    
    
                <!-- .entry-content -->
            <!-- #post-0 -->
    
    
    
            <!-- #content -->
    

    Justine
    #3713

    Hi Justine

    Maybe PasteBin / Gist would be better? By the looks of things you are displaying the events twice – once how your theme displays it and once with the plug-in default template.

    Stephen Harris
    #3717

    Sorry, what do you mean by PasteBin / Gist?

    <?php

    /**
    * The template for displaying lists of events
    *
    * Queries to do with events will default to this template if a more appropriate template cannot be found
    *
    ***************** NOTICE: *****************
    * Do not make changes to this file. Any changes made to this file
    * will be overwritten if the plug-in is updated.
    *
    * To overwrite this template with your own, make a copy of it (with the same name)
    * in your theme directory.
    *
    * WordPress will automatically prioritise the template in your theme directory.
    ***************** NOTICE: *****************
    *
    * @package Event Organiser (plug-in)
    * @since 1.0.0
    */

    //Call the template header
    get_header(); ?>

        <!-- Page header-->
    
    
    
    
    
    
    
    
            <!-- Navigate between pages-->
            <!-- In TwentyEleven theme this is done by twentyeleven_content_nav-->
            max_num_pages &gt; 1 ) : ?&gt;
    
                    &lt;?php next_posts_link( __( &#039;Later events &rarr;' , 'eventorganiser' ) ); ?&gt;
                    &lt;?php previous_posts_link( __( &#039; &larr; Newer events', 'eventorganiser' ) ); ?&gt;
                <!-- #nav-above -->
    
    
    
    
    
    
            &lt;article id=&quot;post-" &gt;
    
    
    
                &lt;a href=&quot;"&gt;
                    'float:left;margin-right:20px;'));
    
                        //Display the title
                        the_title()
                    ;?&gt;
                </a>
    
    
    
    
                    <!-- Output the date of the occurrence-->
    
                        &lt;time itemprop=&quot;startDate&quot; datetime=&quot;"&gt;
    
                    <!-- Display event meta list -->
    
    
                    <!-- Event excerpt -->
    
    
                <!-- .event-entry-meta -->            
    
    
                <!-- .entry-header -->
    
            &lt;!-- #post- --&gt;
    
    
            <!--The Loop ends-->
    
        <!-- Navigate between pages-->
        max_num_pages &gt; 1 ) : ?&gt;
    
                    &lt;?php next_posts_link( __( &#039;Later events &larr;' , 'eventorganiser' ) ); ?&gt;
                    &lt;?php previous_posts_link( __( &#039; &rarr; Newer events', 'eventorganiser' ) ); ?&gt;
                <!-- #nav-below -->
    
    
    
            <!-- If there are no events -->
    
    
    
                <!-- .entry-header -->
    
    
    
                <!-- .entry-content -->
            <!-- #post-0 -->
    
    
    
            <!-- #content -->
    

    Justine
    #3718

    It is definitely appearing twice, only the first time it looks right but with the dates and venues missing, the second time it has the right info but the wrong format. Unfortunately I do not have the coding knowledge to amend t so it works right and would really appreciate some help here.

    Justine
    #3859

    I still am no further on with this. Are you able to help me at all?

    Justine
Viewing 10 posts - 1 through 10 (of 10 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.