• Hi, Im trying to figure out how to modify this statement to say if custom field is a specific value then display the blog post.

    <?php } endif;
     if ( ! function_exists( 'boutique_display_blogpost' ) ) :
    function boutique_display_blogpost(){
    	global $post;
    	$thumb = '';
    	$width = 173;
    	$height = 156;
    	$classtext = 'blog-thumb';
    	$titletext = get_the_title();
    	$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false,'Blog');
    	$thumb = $thumbnail["thumb"];
    	if ( is_category() ){ ?>

    But dont know if it goes up in the function of where if is category?

    Full code pastebin

    What im trying to achieve is different contents in each blog displayed in the category based upon the value of the custom field.
    But i want to check for a specific value in the custom field, to display the correct results in the category.

    [no bumping please]

Viewing 1 replies (of 1 total)
  • Thread Starter broadleon

    (@broadleon)

    Found where I call the posts,

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<?php
    		$i++;
    		if ( $et_is_blog_category ) boutique_display_blogpost();
    		else boutique_display_product($i,'entry');
    	?>

    Then I tried to change it to

    <?php query_posts('meta_key=custom_post_template&meta_value=single-template.php');  ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    	<?php
    		$i++;
    		if ( $et_is_blog_category ) boutique_display_blogpost();
    		else boutique_display_product($i,'entry');
    	?>

    Think something is wrong as nothing displays in category

Viewing 1 replies (of 1 total)
  • The topic ‘help with category display of blog post’ is closed to new replies.