renerook
Member
Posted 1 year ago #
Hi,
I have spent a lot of hours solving this issue, but I'm really stucked now. Parsing of the placeholders seem to have it's own order.
This is my code:
//Agenda
echo EM_Events::output(array('limit'=>10, 'category'=>36, 'format'=>'
<div class="groups" style="padding: 5px;">
<div class="groups-thumbnail" style="width:160px;">#_EVENTIMAGE{150,150}</div>
<div class="groups-content" style="width: 550px;">
<strong>#_EVENTDATES</strong><p>#_EVENTLINK</p><p>#_EVENTEXCERPT</p><p><a href="#_EVENTURL">» Details</a></p></div></div>
') );
And this is the html output:
<div class="groups" style="padding: 5px;">
<div class="groups-thumbnail" style="width: 160px;"></div>
<div class="groups-content" style="width: 550px;">
<strong>17-3-2012</strong>
<p><a href="http://www.fruittuinverbeek.nl/kom-het-beleven/agenda-2/evenement/snoeibijeenkomst-2/" title="Snoeibijeenkomst">Snoeibijeenkomst</a></p>
<p><img class="alignright size-thumbnail wp-image-997" title="banner_20" src="http://www.fruittuinverbeek.nl/wp-content/uploads/2012/02/banner_201-150x150.jpg" alt="" width="150" height="150" />The content</p>
<p><a href="http://www.fruittuinverbeek.nl/kom-het-beleven/agenda-2/evenement/snoeibijeenkomst-2/">» Details</a></p>
</div></div>
Problem in this case is the #_EVENTIMAGE which is not parsed in groups-thumbnail, it sticks to the content.
Anybody any idea how to solve this?
Example:
http://www.fruittuinverbeek.nl/kom-het-beleven/agenda-2/
Regards,
René
http://wordpress.org/extend/plugins/events-manager/
agelonwl
Member
Posted 1 year ago #
using your code, it seems to be working fine on me. can I know where did you put the code snippet or what is the file name instead?
renerook
Member
Posted 1 year ago #
Hi Agelonwl, localy everything works fine by me also, but not online.
The code is placed in a WP template file. This is the complete code of the template:
<?php
/*
Template Name: Groepen
*/
?>
<?php get_header(); ?>
<div id="content-bar">
<div id="content-left">
<div id="content-left-inner">
<img src="<?php bloginfo('wpurl'); ?>/images/shadow-content-left.png" align="right" alt="" />
</div>
</div>
<div id="content-main">
<table id="content-index-table">
<tr>
<td class="sidebar-left">
<?php include ('sidebar1.php'); ?>
</td>
<td class="main-content" style="padding-bottom:40px; width:640px;">
<?php if ( function_exists( 'rdfa_breadcrumb' ) ) { rdfa_breadcrumb(array( 'sep' => '>>>>' )); } ?>
<h1><?php the_title();?></h1>
<?php
if ( !is_page(401) ) {
if (have_posts()) : while (have_posts()) : the_post();
the_content();
endwhile; endif;
}
?>
<?php
if ( is_page(116) ) {
//Groups
query_posts( 'tag=groepsactviteiten&order=ASC' );
//query_posts('post_type=page&post_parent='.$parent.'&order=ASC');
if (have_posts()) : while (have_posts()) : the_post();
?>
<div class="groups" style="padding:15px;">
<div class="groups-thumbnail">
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail('large', array('class' => 'alignleft', 'alt' => 'alttext'));
}
?>
</div>
<div class="groups-content">
<?php
$title = get_the_title();
echo "<span style='font-weight:bold; font-size:16px;'>".$title."</span>";
the_content();
// Find corresponding page by title
$result = mysql_query("SELECT * FROM fv_posts WHERE post_title='$title' AND post_type='page' ORDER BY ID");
while($row = mysql_fetch_array($result)) {
echo "<a href='/?page_id=".$row['ID']."' title='".$title."'>";
echo "» Lees meer...</a>";
}
?>
</div>
</div>
<?php
endwhile;
endif;
}
if ( is_page(401) ) {
//Agenda
echo EM_Events::output(array('limit'=>10, 'category'=>36, 'format'=>'
<div class="groups" style="padding: 5px;">
<div class="groups-thumbnail" style="width: 160px;">#_EVENTIMAGE{150,150}</div>
<div class="groups-content" style="width: 550px; ">
<strong>#_EVENTDATES</strong>
<p>#_EVENTLINK</p>
<p>#_EVENTEXCERPT</p>
<p><a href="#_EVENTURL">» Details</a></p>
</div>
</div>') );
}
?>
</td>
</tr>
</table>
</div>
<div id="content-right-outer">
<div id="content-right">
<img src="<?php bloginfo('wpurl'); ?>/images/shadow-content-right.png" align="left" alt="" />
</div>
</div>
</div>
<?php get_footer(); ?>
renerook
Member
Posted 1 year ago #
Agelonwl, problem is solved. Actually I am to embarrassed to tell you what I have done wrong. A very stupid mistake.
But anyway, thanks a lot for taking the time to help me. That´s really appreciated.