WordPress.org

Ready to get started?Download WordPress

Forums

the_content in single.php :dosen't work (7 posts)

  1. hamzamusa
    Member
    Posted 5 years ago #

    Hi

    I made a new theme , and adding the Post's content , as always , it works really fine on the localhost wordpress install , but on the server's wordpress install , the_content in single.php dosen't work at all .

    i tried to deactivate all the plugin and to check if there's plugin conflict , but it never works .

    the site is at http://www.goomedic.com

  2. jbbrwcky
    Member
    Posted 5 years ago #

    Can you post the code you're using?

  3. hamzamusa
    Member
    Posted 5 years ago #

    normal code , i use this within the loop at : single.php ( same as category.php , page.php , index.php )

    <h2><a href="<?php the_permalink();?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    				<?php the_content();?>

    it ignores : single.php , category.php , and page.php somehow

    and uses only the index.php code which i use ;

    <?php the_content_rss('', TRUE, '', 80); ?>

    in it

  4. jbbrwcky
    Member
    Posted 5 years ago #

    Do you have the loop there, before that?

  5. hamzamusa
    Member
    Posted 5 years ago #

    ofcourse ,

    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    
    			<div class="post">
    
    				<h2><a href="<?php the_permalink();?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    				<?php the_content();?>
    
    			</div>
    
    			<?php endforeach; else: ?>
    
    			<?php _e('Sorry, no posts matched your criteria.'); ?>
    
    			<?php endif; ?>

    wordpress ignores the other theme files except index.php

  6. jbbrwcky
    Member
    Posted 5 years ago #

    And that is the same style of loop that you have in index.php I assume?

    Have you tried completely deleting all the theme files aside from default, then re-uploading and re-activating the theme? Also, what version WP are you using?

  7. hamzamusa
    Member
    Posted 5 years ago #

    Deactivating and reactivating the theme after upgrading the wordpress to the latest edition fix the issue

    thanks you .

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags