Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1128298
    demonboy
    Participant

    I’m running a child theme under Renew and have played around with wp-content.php. For some reason the ‘read more…’ that appears on the blog page is also appearing at the end of my blog post on the single post too. The post part of my wp-content.php is this:

          <?php while ( have_posts() ) : the_post(); ?>
            <?php x_get_view( 'renew', 'content', get_post_format() ); ?><br /><br />
     <div style="margin-bottom:50px float:left"><?php previous_post_link('%link', '&laquo;&laquo; Previous Post'); ?> </div>
      <div style="margin-bottom:50px float:right"><?php next_post_link('%link', 'Next Post &raquo;&raquo;'); ?> </div><br /><br />
      <div align="center" style="margin-top:50px float:left"><?php echo do_shortcode("[gard]"); ?></div>
    
            <?php x_get_view( 'global', '_comments-template' ); ?>
          <?php endwhile; ?>
    
        </div>
    
        <?php if ( $fullwidth != 'on' ) : ?>
          <?php get_sidebar(); ?>
        <?php endif; ?>
    
      </div>

    Any clues?

    #1128426
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    There is nothing wrong on your code, it could be from other template that is related to <?php x_get_view( 'renew', 'content', get_post_format() ); ?>. We could only find out by checking it directly.

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks!

    #1128428
    Rupok
    Member

    Hi there,

    There is nothing on your given code that might add the read more to single post. So it’s anywhere else. Unfortunately we can’t assist much on your custom code but if you can provide your whole code (if you edited other files as well including functions.php) then we can have a look to find that.

    Cheers!

    #1128457
    demonboy
    Participant
    This reply has been marked as private.
    #1128866
    Darshana
    Moderator

    Hi there,

    I have add the following code fragment on your content.php file which is located under “x-child/framework/views/renew/” to resolve the issue.

    
    <?php
    if (!is_single()){
    ?>
      <a href="<?php the_permalink(); ?>">Read more...</a>
      <?php
    }
    ?>
    

    Hope that helps.

    #1129568
    demonboy
    Participant

    Excellent stuff, thank you!

    #1129598
    Prasant Rai
    Moderator

    You are most welcome. 🙂

  • <script> jQuery(function($){ $("#no-reply-1128298 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>