Viewing 7 replies - 1 through 7 (of 7 total)
  • I don´t really understand the problem… I just see images on your blog. And one time there are the words “the new…” under the images. Can you explain it a bit better maybe?

    Please post the code from the theme index.php….

    Please put code in between backticks.

    REPLY to poster above:
    The post content is not being shown, ‘The new’ is the image caption in this case, click the post title and you’ll see the content that is currently missing.

    Thread Starter certifiedbmx

    (@certifiedbmx)

    <?php get_header(); ?>
    
    	<?php if (have_posts()) : ?>
    
    		<?php $featured_id = -1; $featured = get_featured(1); ?>
        <?php if (!empty($featured)) : $post = $featured[0]; $featured_id = $post->ID; ?>
        <?php $category = get_the_category(); $category = $category[0]; ?>
            <span class="featured-tag">Featured Project</span>
            <a href="<?php echo $post->guid; ?>" title="<?php echo $post->post_title; ?>"><img src="<?php echo $post->featured_image; ?>" border="0" alt="<?php echo $post->post_title; ?>" class="featured" /></a>
            <div class="clear"></div>
            <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
            <p><?php echo truncate($post->post_content, '<!--more-->', '...'); ?></p>
    
            <div class="info">
              <span><?php the_time('n.j.y') ?></span>
              <a href="<?php echo get_category_link($category->cat_ID);?>" title="<?php echo $category->cat_name; ?>"><?php echo $category->cat_name; ?></a>
              <?php comments_popup_link('No Comments', '1 Comment', '% Comments', 'last'); ?>
              <div class="right quote"><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title_attribute(); ?>">Read More</a></div>
            </div>
    
            <div class="hr"><hr /></div>
        <?php endif; ?>
    
        <?php while (have_posts()) : the_post(); ?>
        <?php if ($post->ID == $featured_id) continue; ?>
        <?php $category = get_the_category(); $category = $category[0]; ?>
            <div class="post">
              <?php the_post_image(); ?>
              <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
              <p><?php echo truncate($post->post_content, 204, '...'); ?></p>
              <div class="info">
                <span><?php the_time('n.j.y') ?></span>
             		<a href="<?php echo get_category_link($category->cat_ID);?>" title="<?php echo $category->cat_name; ?>"><?php echo $category->cat_name; ?></a>
              	<?php comments_popup_link('No Comments', '1 Comment', '% Comments', 'last'); ?>
                <div class="right quote"><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title_attribute(); ?>">Read More</a></div>
                <div class="clear"></div>
              </div>
            </div>
    
            <div class="hr"><hr /></div>
        <?php endwhile; ?>
    
        <?php paged_menu(); ?>
    	<?php else : ?>
    		<h1>Not Found</h1>
    		<p>Sorry, but you are looking for something that isn't here.</p>
    	<?php endif; ?>
    <?php get_footer(); ?>

    Here is my index.php

    Thanks for the above reply

    Quite a busy little index file there, or at least in comparison to the one i use….

    Looks like the theme uses it’s own method to truncate the content of the posts…

    This area is where your problem posts are grabbed….

    <?php while (have_posts()) : the_post(); ?>
        <?php if ($post->ID == $featured_id) continue; ?>
        <?php $category = get_the_category(); $category = $category[0]; ?>
            <div class="post">
              <?php the_post_image(); ?>
              <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
              <p><?php echo truncate($post->post_content, 204, '...'); ?></p>
              <div class="info">
                <span><?php the_time('n.j.y') ?></span>
             		<a href="<?php echo get_category_link($category->cat_ID);?>" title="<?php echo $category->cat_name; ?>"><?php echo $category->cat_name; ?></a>
              	<?php comments_popup_link('No Comments', '1 Comment', '% Comments', 'last'); ?>
                <div class="right quote"><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title_attribute(); ?>">Read More</a></div>
                <div class="clear"></div>
              </div>
            </div>
    
            <div class="hr"><hr /></div>

    And it’s this line that truncates the post…

    <p><?php echo truncate($post->post_content, 204, '...'); ?></p>

    Now i have no idea how the theme is dealing with the content, there could also be a series of custom functions i’m not aware of…

    You could try changing that line to….

    <p><?php echo $post->post_content; ?></p>

    Or if that doesn’t work give this a try…

    <p><?php the_content(); ?></p>

    However seeing as the template/theme has some of it’s own custom code, code that i’m not very familiar with myself, the above suggestions may not work at all.

    Try them, if they don’t work, wait for someone else more in the know to reply here, or contact the author as he’ll have a better understanding of the existing functions at work in the theme.

    Thread Starter certifiedbmx

    (@certifiedbmx)

    Thanks for your help, I will give it a go

    Thread Starter certifiedbmx

    (@certifiedbmx)

    That did it! Thank you so much for your help, I was starting to loose the plot.

    I did try the author first as it was a paid theme but he seemed quite puzzled by it.

    Damian

    The author was puzzled at making modifications to his own code?

    Wow, perhaps he’s chopping code from other places are re-using… (perhaps not to – speculation)

    It’s pretty straight-forward though i was a little concerned it may not play with any other custom queries or functions that might exist in the theme.

    If it works, great!! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Text below image on post’ is closed to new replies.