• Resolved WPTrashPanda

    (@jprescher)


    As a developer I have had a lot of client requests for better social network integration. Unfortunately, I see a trend emerging where clients are asking to have their entire site simply be a giant feed from all of their social networks. Which is not only useless to search engines partially due to duplicate content but the origin of the content. of but bad for business.

    One recent case was for my agency to generate a feed for my clients Facebook events. I looked at many event plugins and was disappointed with monthly and yearly costs. I could have included them into an annual plan for my client but that comes with the cost of explaining that cost year after year and run the risk of my clients looking at competitors.

    We decided we would develop a plugin that we could use over and over at no additional cost but the initial development. The plugin imports event data into your WordPress theme. We want to share our solution for Importing Facebook Events with the WP community and like WordPress… for free. We have plenty of code examples to help you integrate this solution.

    <?php 
    
    		$args = array (
    		    'post_type' => 'facebook_events',
    			'posts_per_page' => -1,
    			'order' => 'ASC',
    		);
    
    		$fbe_query = new WP_Query( $args );
    		if( $fbe_query->have_posts() ):
    		while ( $fbe_query->have_posts() ) : $fbe_query->the_post();
    
    		  $event_title = get_the_title();
    		  $event_desc =  get_the_content();
    		  $event_image = get_fbe_image('cover');
    
    	?>
    	  <img src="<?php echo get_fbe_image('cover'); ?>" alt="" />
    	  <h1><?php echo $event_title; ?></h1>
    	  <p><?php echo $event_desc; ?></p>
    	<?php
    
    	     endwhile;
    		 endif;
    
    	wp_reset_query();  
    
    	?>

    We built an additional template and widget system for ourselves which we also offer. We hope this solution works for you, and look forward to your feedback.

The topic ‘Importing Facebook Events’ is closed to new replies.