Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1277413
    sandra.i
    Participant

    Hi

    I have changed the positioning of the meta data on my blog page with the code below in the content.php file in renew. How I can do the same for the archive and search results pages?

    Blog page: http://www.rochesterclinic.co.uk/news/

    <?php
    
    // =============================================================================
    // VIEWS/RENEW/CONTENT.PHP
    // -----------------------------------------------------------------------------
    // Standard post output for Renew.
    // =============================================================================
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-wrap">
        <?php if ( has_post_thumbnail() ) : ?>
          <div class="entry-featured">
            <?php x_featured_image(); ?>
          </div>
        <?php endif; ?>
        <?php x_get_view( 'renew', '_content', 'post-header' ); ?>
    
          <div class="blog_post_author">
          <?php 
            $post_author = get_post_meta($post->ID, 'post_author', true);
            if ($post_author) { 
            echo $post_author;  
            }  
    ?></div>
    
        <?php x_get_view( 'global', '_content' ); ?>
      </div>
    
    </article>
    #1277596
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! We cannot provide custom development, however I can point you to the right direction.

    Locate the file _content-post-header.php which is under (x/framework/views/renew/).

    Then locate the following function which renders meta information.

    x_renew_entry_meta();

    Also you can find this original function under (“/x/framework/functions/renew.php”).

    Hope that helps.

    #1277637
    sandra.i
    Participant

    Hi

    I’ve had a look at that file, and it looks like that’t the output for the header of a single post…?

    I’m looking for the output of the category and archive pages, so I can rearrange the meta data there, as I have done on my blog page here:

    http://www.rochesterclinic.co.uk/news/

    Thanks

    #1277801
    Darshana
    Moderator

    Hi there,

    That is not output only in the single posts. If you check that file, you will see that is_single() is only part of that file and the above mentioned code is below that expression.

    For example try this as a test.

    
    if ( is_archive() ) {
        echo "your custom entry meta";
    } else {
        x_renew_entry_meta(); 
    }
    

    Thanks!

    #1278602
    sandra.i
    Participant

    Hi

    I’ve got that to put the metadata on the top of the post in the category and search pages.

    How can I put the metadata at the bottom of the post as well? I’m not sure where to insert the footer metadata code for the archive and search pages.

    Thanks

    #1278724
    Paul R
    Moderator

    Hi,

    You can copy x/framework/views/renew/_content-post-header.php to your child theme and add your meta data code.

    Hope that helps.

    #1278766
    sandra.i
    Participant

    Hi

    I think i need to have

    – the content post header: this has metadata on top now, and the title
    – the post content – where is that..?
    – content post footer

    So where can I find the post content for the archive and search pages?

    #1278801
    sandra.i
    Participant

    Hi

    Thanks for you help, I’ve figured it out.

    #1278889
    Rahul
    Moderator

    Glad to hear it!

    Feel free to ask us again if you need any further information while using and experimenting the X-theme.

    Than you.

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