Exemple #1
0
                                    if (in_category("exclusive")) {
                                        //echo '<!--Any tags it may have--><div class="' . tc_featured_tag . ' ' . tc_featured_exclusive  . '">Exclusive</div>';
                                        $tagName = "Exclusive";
                                    } else {
                                        if (in_category("exclusive") && in_category("featured")) {
                                            //echo '<!--Any tags it may have--><div class="' . tc_featured_tag . ' ' . tc_featured_exclusive . '">Exclusive</div>';
                                            $tagName = "Exclusive";
                                        }
                                    }
                                }
                                $image = grabImage(get_the_content(), $post->ID, "featured");
                                $dataArray[$counter]["post" . $counter2]["side"] = $side;
                                $dataArray[$counter]["post" . $counter2]["key"] = encrypt_key($post->post_modified);
                                $dataArray[$counter]["post" . $counter2]["id"] = $post->ID;
                                $dataArray[$counter]["post" . $counter2]["tagName"] = $tagName;
                                $dataArray[$counter]["post" . $counter2]["image"] = $image;
                                $dataArray[$counter]["post" . $counter2]["name"] = $post->post_name;
                                $dataArray[$counter]["post" . $counter2]["title"] = neat_trim(get_the_title(), 40, "...");
                                //add to the counter
                                $counter2++;
                                $tagName = "";
                            }
                            $dataArray[$counter]["catName"] = get_cat_name($featured_cat);
                        }
                        echo json_encode($dataArray);
                    }
                }
            }
        }
    }
}
Exemple #2
0
	function short_opis($len = -1){
		$opis = get_field("opis");
		if (empty($opis))
			$opis = get_the_content();
			
		$opis = strip_tags($opis);
		//$opis = htmlentities( $opis, ENT_QUOTES ,"UTF-8" );
		//$opis = html2text($opis);
		if ($len >0)
			$opis = neat_trim($opis, $len, '...');
		
		return $opis;
	}
">
			<?php 
echo get_the_title($post->ID);
?>
		</a>
		<a href="<?php 
echo admin_url('post.php?post=' . $post->ID . '&action=edit');
?>
"><span class="dashicons dashicons-edit"></span></a>
	</h4>
	<?php 
$description = $post->post_content;
?>
	<div id="item-description">
		<?php 
echo neat_trim($description, 100);
?>
	</div>
	<div class='item-meta' id='meta-date'>
		<label>Date</label>
		<?php 
echo get_post_meta($post->ID, 'date_performed', true);
?>
	</div>
	<div class='item-meta' id='meta-cost'>
		<label>Cost</label>
		$<?php 
echo get_post_meta($post->ID, 'cost', true);
?>
	</div>
	<div class='item-meta' id='meta-company'>