Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Florent

    (@frappi)

    Looks likes there is a need to add HTML block in single-event.php. I use Kleo theme.

    <section class="container-wrap main-color">
    <div id="main-container" class="container">
    <div class="row">
    etc
    Plugin Author shanebp

    (@shanebp)

    On activation, the plugin will create an Events page if it does not already exist. Or you can create it yourself.

    single-event.php is provided as a template so that it can be adjusted to your theme. And it sounds like you were able to do that.

    Thread Starter Florent

    (@frappi)

    I added theses line to the code to fit with my template, is it an elegant way ? this is my first improvisation with WP coding. For the moment it’s works 🙂

    <?php
    
     /**
     * Template for displaying a single Event
     * You can copy this file to your-theme
     * and then edit the layout.
     */
    
    wp_register_script( 'google-maps-api', 'http://maps.google.com/maps/api/js?sensor=false' );
    
    get_header();
    //get_sidebar( 'left-sidebar' );
    dynamic_sidebar( 'left-sidebar' );
    
    function pp_single_map_css() {
    	echo '<style type="text/css"> .single_map_canvas img { max-width: none; } </style>';
    }
    add_action( 'wp_head', 'pp_single_map_css' );
    
    wp_print_scripts( 'google-maps-api' );
    
    ?>
    
    <section class="container-wrap main-color">
    <div id="main-container" class="container">
    <div class="row">
    <div class="template-page col-sm-9 col-sm-push-3 tpl-left content-area with-meta">
    	<div class="wrap-content">
    			<div class="container">
    
    [...]
    
    <div class="sidebar sidebar-main sidebar-left col-sm-3 col-sm-pull-9">
    	<div class="inner-content widgets-container">
    		<?php if ( ! dynamic_sidebar() ) : ?>
    			<li>{static sidebar item 1}</li>
    			<li>{static sidebar item 2}</li>
    		<?php endif; ?>
    	</div>
    </div>
    Plugin Author shanebp

    (@shanebp)

    is it an elegant way

    Sure. Congrats on getting it working.

    Congrats my friend

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Template problem on single event page’ is closed to new replies.