• Hi guys, I’m becoming really confused by this. I know it’s been asked plenty of times before, but the issue I have is that this is from a theme, and it is full of custom php, and I do not know php well. Every time I make a change it seems to cause an error.
    You can find the website at http://eshine.simplecheapwebsites.com.au/gallery. When you click on the categories on the side I want it to display the featured images of the posts in that category. However mine is simply showing all the posts still.

    This code is in my category.php file

    <?php the_post(); ?>
    <?php
    $et_ptemplate_settings = array();
    $et_ptemplate_settings = maybe_unserialize( get_post_meta($post->ID,’et_ptemplate_settings’,true) );

    $fullwidth = isset( $et_ptemplate_settings[‘et_fullwidthpage’] ) ? (bool) $et_ptemplate_settings[‘et_fullwidthpage’] : (bool) $et_ptemplate_settings[‘et_fullwidthpage’];

    $gallery_cats = isset( $et_ptemplate_settings[‘et_ptemplate_gallerycats’] ) ? $et_ptemplate_settings[‘et_ptemplate_gallerycats’] : array();
    $et_ptemplate_gallery_perpage = isset( $et_ptemplate_settings[‘et_ptemplate_gallery_perpage’] ) ? $et_ptemplate_settings[‘et_ptemplate_gallery_perpage’] : 18;
    ?>

    <?php get_header(); ?>

    <div id=”container” <?php if($fullwidth) echo (‘ class=”no_sidebar”‘);?>>
    <div id=”left-div”>
    <div>
    <!–Start Post–>
    <!– <div class=”post-wrapper”>–>
    <div style=”clear: both;”></div>

    <h2><?php single_cat_title(); ?></h2>

    <?php if($thumb <> ” && get_option(‘egallery_page_thumbnails’) == ‘on’) { ?>
    <?php print_thumbnail($thumb, $thumbnail[“use_timthumb”], $titletext , $width, $height, $classtext); ?>
    <?php }; ?>

    <div id=”et_pt_gallery” class=”clearfix”>
    <?php $gallery_query = ”;
    if ( !empty($gallery_cats) ) $gallery_query = ‘&cat=’ . implode(“,”, $gallery_cats);
    else echo ‘<!– gallery category is not selected –>’; ?>
    <?php query_posts(“showposts=$et_ptemplate_gallery_perpage&paged=$paged” . $gallery_query); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php $width = 100;
    $height = 100;
    $titletext = get_the_title();

    $thumbnail = get_thumbnail($width,$height,’portfolio’,$titletext,$titletext,true,’Portfolio’);
    $thumb = $thumbnail[“thumb”]; ?>

    <div class=”et_pt_gallery_entry”>
    <div class=”et_pt_item_image”>
    <?php print_thumbnail($thumb, $thumbnail[“use_timthumb”], $titletext, $width, $height, ‘portfolio’); ?>
    <span class=”overlay”></span>

    ” rel=”gallery” href=”<?php echo($thumbnail[‘fullpath’]); ?>”><?php _e(‘Zoom in’,’eGallery’); ?>
    “><?php _e(‘Read more’,’eGallery’); ?>
    </div> <!– end .et_pt_item_image –>
    </div> <!– end .et_pt_gallery_entry –>

    <?php endwhile; ?>

    Any help would be hugely appreciated!

    Thanks 🙂

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Posts not showing up in category’ is closed to new replies.