WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
Open single events in Overlay ( Easy Fancybox ) (4 posts)

  1. schalkjoubert
    Member
    Posted 2 years ago #

    Hi
    I would like to list my events using the events listing widget.
    Once visitors click on a specific event, i like an overlay to open instead of an page.
    I though this can be achieve by using the Easy FancyBox plugin, and adding a class="fancybox" to the events link.
    I am still trying but no luck yet. Is this possible.

    link to Easy FancyBox:
    http://wordpress.org/extend/plugins/easy-fancybox/

    Many thanks in advance.

    Schalk

    http://wordpress.org/extend/plugins/events-manager/

  2. RavanH
    Member
    Posted 2 years ago #

    Hi, I'm not really familiar with the Event Manager plugin ( except that it is running on one of the multi-site networks I'm managing where it takes a lot of memory usage per page request ;) ) but as far as I understand it, each event has its own post (actaully a custom post type).

    Simply making links to these single events open in FancyBox is possible by editing the events list format. Do something like replacing the #_EVENTLINK tag with <a href="#_EDITEVENTURL" class="fancybox-iframe" title="#_EVENTNAME" target="_blank">#_EVENTNAME</a>. This should make them open inside a FancyBox frame but... it would mean they will show as a complete new page with the usual header, menu and sidebars.

    I suppose you would like to link to ONLY the event content... Correct?

    As far as I understand it, the display of these posts can be taken control of by adding a template called single-event.php to your theme (am I correct?) which would allow you to remove the dispay of head/menu/sidebars etc. to prepare them for showing in a fancybox frame or even a regular popup.

    Do you have experience in editing theme template files and have some knowledge about how WordPress templates work? If so, you should be able to make it work. If not, it might take a some studying on your part... You'll need to understand some basic PHP and know how templates are formed in WordPress.

  3. schalkjoubert
    Member
    Posted 2 years ago #

    @RavanH - thanx so much for your help here. The fancybox now opens nicely, though I am stuck on the single-events.php template.

    I need to strip away my header, sidebar and footer.
    I opened single.php from my theme folder and saved it as single-event.php
    I then deleted the sidebar and footer.
    Uploaded it to my theme folder, no luck,
    I then deletd the header, which broke the css for the page...

    Link: http://www.outoforder.co.za/site-18-gk/wines/
    Click in sidebar on: Orality in James Joyce Conference

    My single-event.php looks as follow:

    Many thanx

    <?php
    /**
     * Single Event Template
     *
     * This template is the default page template. It is used to display content when someone is viewing a
     * singular view of a post ('post' post_type).
     * @link http://codex.wordpress.org/Post_Types#Post
     *
     * @package WooFramework
     * @subpackage Template
     */
    get_header();
    ?>
    
        <!-- #content Starts -->
    	<?php woo_content_before(); ?>
        <div id="content" class="col-full">
    
        	<div id="main-sidebar-container">    
    
                <!-- #main Starts -->
                <?php woo_main_before(); ?>
                <div id="main">
    <?php
    	woo_loop_before();
    
    	if (have_posts()) { $count = 0;
    		while (have_posts()) { the_post(); $count++;
    
    			woo_get_template_part( 'content', get_post_type() ); // Get the post content template file, contextually.
    		}
    	}
    
    	woo_loop_after();
    ?>
                </div><!-- /#main -->
                <?php woo_main_after(); ?>
    
    		</div><!-- /#main-sidebar-container -->         
    
        </div><!-- /#content -->
  4. RavanH
    Member
    Posted 2 years ago #

    I'm afraid ripping out large chunks of the theme like get_sidebar and get_footer is not going to be very get you very reliable results... but get_header is certainly something you need to replace by some basic code as it is so essential.

    Open up your header.php and copy over the important parts that you need like the doctype declaration and the complete <head> section, leaving out the header and menu part in the <body> section.

    After that, you'll have to apply a large degree of logic and patience (editing and checking) to get the resulting source code back in to shape.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic