• Hello, im trying to customize the theme that i downloaded on the internet..

    The categories of the post are posted like this:

    <?php if(!is_paged()) { ?>
    
    	<div id="middle" class="clearfloat">
    	<img src="<?php bloginfo('template_url'); ?>/images/category.png" class="clearfloat" alt="" />
    	<?php $display_categories = array(1,46,48,49,50); $i = 1;
    	foreach ($display_categories as $category) { ?>
    
    	<div id="cat-<?php echo $i; ?>" class="category" onclick="window.location.href='<?php echo get_category_link($category);?>'" >
    		<?php query_posts("showposts=1&cat=$category")?>
    		<?php if (is_category($category)) { ?>
    		<span class="cat_title"><?php single_cat_title(); ?></span>
    
    		<?php echo category_description($category);  } ?>
    	</div>
    
    	<?php $i++; ?>
        	<?php } ?>
    
    	</div>

    and this not show up on the single post and pages.. now im trying to put it on single and pages.. but when i tried to paste it the home page is working but when i click on the title of the topics, the single post said that “Sorry, no posts matched your criteria.”

    but when i removed it again. the post showed up..

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter cloudstr210

    (@cloudstr210)

    Another thing..

    The post showed up when i try to remove the

    <?php query_posts("showposts=1&cat=$category")?>

    Thanks!

    Thread Starter cloudstr210

    (@cloudstr210)

    What item can i replace with this item to make it work?

    <?php query_posts("showposts=1&cat=$category")?>

    Thank you.

    but when i tried to paste it the home page is working but when i click on the title of the topics, the single post said that “Sorry, no posts matched your criteria.”

    is tath the only output you get on the single post?
    or is the single post still there, but no output from the above?

    can you paste the full code of the template into a https://pastebin.com/ and post the link to it here?

    link to your site?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘This code doesnt show my post.’ is closed to new replies.