irmo
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Twenty Thirteen Gallery OptionsIs there a way to have those coloumn responsive?
if i see my website in mobile it swaps from a 3 coloumn layout displayed in this way
# # #
# # #
# # #in this:
# #
#
# #
#i tryed to disable thimbthumb.. but it wont let me select wat wordpress resolution (large, full, thumbnail, medium etc.) i want, and each image has 3 different “crop” (rectangular, vertical, square) premade for those
if i could use #_EVENTIMAGE(medium) instead of #_EVENTIMAGE(150×150) i wouldnt need this workaround,
but the “medium” size is a preset crop of the image in the area that i needed,
the 150×150 instead just resizes (or crops in the center) the original imagemhh.. nothing
but i found a workaround:
solved editing directly the category-single.php
in this:
<?php /* * This page displays a single event, called during the em_content() if this is an event page. * You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need. * You can display events however you wish, there are a few variables made available to you: * * $args - the args passed onto EM_Events::output() */ global $EM_Category; /* @var $EM_Category EM_Category */ // echo $EM_Category->output_single(); ?> <?php echo $EM_Category->description; $currentslug = $EM_Category->slug; $today = date("o-m-d"); $eventi = array( 'post_type' => 'event', 'meta_key' => '_event_start_date', 'orderby' => 'meta_value', 'order' => ASC, 'event-categories' => $currentslug, 'meta_query' => array( array( 'key' => '_event_start_date', 'value' => $today, 'compare' => '>=', 'type' => 'DATE', ) ), ); $loop = new WP_Query( $eventi ); ?> <div> <ul> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $EM_Event = em_get_event($post->ID, 'post_id');?> <?php $alternate = $alterncount % 2;?> <li class="span3 center"> <a class="thumbnail" href="<?php the_permalink();?>"><?php the_post_thumbnail('medium');?></a> <a href="<?php the_permalink();?>"><h4 class="media-heading"><?php the_title();?></h4></a> </li> <?php $alterncount++; endwhile; ?> </ul> </div>i have only to enable pagination in it and it should work
Ty
yes, this sounds right, i’ll test someting like this Asap
(i never understood what kind of “loop” the EM list (category, event etc.) generates, if there’s not loop in them probably my whole approach is wrong
PS: also if “echo (‘#_EVENTPOSTID’)” gives me right ID
have you tried something like
<?php
global $post;
$EM_Event = em_get_event($post->ID, ‘post_id’);
?>
<?php echo $EM_Event->output(‘#_EVENTPOSTID’); ?>this gives me the id of the Category list page, not of the post into the “category loop”
hardcoding an id works..
if i code
echo get_the_post_thumbnail(53,'thumbnail'); //works showing event 53 thumbnaili get the image, same for all events but i get it
if i code
$theid = ('#_EVENTPOSTID'); echo ' id of the post = ' . $theid //id of the post 53i get the right id (53, the same that shows the right image up here
but if i code
$theid = ('#_EVENTPOSTID'); echo get_the_post_thumbnail($theid,'thumbnail'); //nothing shownor
echo get_the_post_thumbnail($post->ID,'thumbnail'); //nothing showni get nothing…
that’s so strange..
another alternative, try using e.g.
echo EM_Events::output(array('format'=>'<li class="span3">#_EVENTIMAGE{100,100}<a href="#_EVENTURL"> #_EVENTNAME </a>'));mhh, this wont solve my problem, what i need is to get the “thumbnail” or “medium” auto cropping from wordpress thumbnail
(setting:
#_EVENTIMAGE{150,150} is different than setting
thumbnail(‘medium’,args)
)instead of $theid, why not just use $post->ID again?
did it..
now the code looks like:<?php $EM_Event = em_get_event($post->ID, 'post_id');?> <li class="span3"> <?php echo get_the_post_thumbnail($post->ID,'thumbnail'); ?> <a href="#_EVENTURL"> #_EVENTNAME </a>the result is the same, no image loaded:
http://www.diventa.it/informale/eventi/categorie/aperattivi/