Skip to content

Instantly share code, notes, and snippets.

@dannewns
dannewns / gist:8041051
Created December 19, 2013 15:33
ok this is probably totally wrong i know i should assign a tag in the if statment to the label and then outside of the if get the label by tag and then assign the value
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"EventCell" forIndexPath:indexPath];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"EventCell"];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(34.0f, 34.0f, tableView.frame.size.width, 130.f)];
label.textAlignment = NSTextAlignmentLeft;
$attachments = new Attachments( 'attachments', $post->ID );
if( $attachments->exist() ) :
$attachment->get_single(0);
cats = get_the_terms($post->ID, 'portfolio_categories');?>
<li>
<a href="">
//cant do the below because it just wont work
<?php echo $attachment->image( 'portfolio-small' ); ?>
<div class="project-content">
<h3><?php the_title() ?></h3>
$events_query = new WP_Query('category_name=event&orderby=meta_value_num&order=ASC&meta_key=post_singleton_date&meta_compare=>=&meta_value=' . strtotime(date('d-m-Y')));