Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #67348
    Rad
    Moderator

    Hi David,

    For space between posts, could you try adding this?

    article.hentry {
    margin-top: 5px !important;
    }

    That changes should work, could you check if you have same copy with this? And please check if you correctly edited _content.php from child theme, and not the original one.

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_CONTENT.PHP
    // -----------------------------------------------------------------------------
    // Display of the_excerpt() or the_content() for various entries.
    // =============================================================================
    
    $is_full_post_content_blog = is_home() && x_get_option( 'x_blog_enable_full_post_content' ) == 1;
    
    ?>
    
    <?php
    
    if ( is_singular() || $is_full_post_content_blog || is_archive() || is_category() || is_tag() || is_search() || is_author() ) :
      x_get_view( 'global', '_content', 'the-content' );
      if ( x_get_stack() == 'renew' ) :
        x_get_view( 'renew', '_content', 'post-footer' );
      endif;
    else :
      x_get_view( 'global', '_content', 'the-excerpt' );
    endif;
    
    ?>

    Let us know how it goes.

    #67359
    David B
    Participant

    Aha!

    I had put it in framework/Views/Integrity but your code had Views/Global so when I placed it in the global folder it all clicked! Awesommmeee!

    The code for closing the gap worked perfectly too. The design is exactly what I had in mind.

    Okay okay I know I’ve said last comment too many times (ideas keep snowballing) but my last thought that would flesh everything out perfectly would be; is it possible to add a Leave a Comment link, in the bottom right corner of each post. Identical to what shows up for the mobile site.

    Thanks so much guys, honestly I couldn’t have done it without you. This is my second purchased x theme, and I couldn’t be happier with the quality or support.

    Cheers,
    Dave

    #67389
    David B
    Participant

    Sigh, I always speak too soon. Now that I have a child theme I went in to remove the dates from the google meta template and wasn’t sure how to expand the code to include, posts, categories, and tags. This is what I have so far:

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    
    function x_google_authorship_meta() {
    
      $author = sprintf( '%s', get_the_author() );
    
      $title = sprintf( '%s', get_the_title() );
    
      $date = sprintf( '<time class="entry-date updated" datetime="%1$s">%2$s</time>',
        esc_attr( get_the_date( 'c' ) ),
        esc_html( get_the_date( 'm.d.Y' ) )
      );
    
      if ( get_post_type() == 'page' ) {
        printf( '<span class="visually-hidden">%1$s%2$s</span>',
          '<span class="author vcard"><span class="fn">' . $author . '</span></span>',
          '<span class="entry-title">' . $title . '</span>'
        );
      } else {
        printf( '<span class="visually-hidden">%1$s%2$s%3$s</span>',
          '<span class="author vcard"><span class="fn">' . $author . '</span></span>',
          '<span class="entry-title">' . $title . '</span>',
          $date
        );
      }
    
    }

    To include the rest do i just add; ,’Tags’, ‘categories’, ‘posts’ next to ‘pages’?

    #67415
    David B
    Participant

    Haha maybe I didn’t speak too soon, I figured out a solution to the comment question, so no worries there. Only need help with removing dates now…so still sorta one last question =p

    Cheers!

    #67778
    Kosher K
    Member

    Hi David,

    can you try adding this in Custimizer -> Custom -> CSS

    .entry-date {
     display: none;
    }

    Hope that helps.

    Cheers

    #67779
    David B
    Participant

    Hmm,

    I don’t think that’s what I’m looking for, won’t the CSS just affect the site display? I’m trying to remove the date from the meta description from tags and categories in Google search.

    Thanks,

    Dave

    #68138
    Rad
    Moderator

    Hi David,

    If you just intend to remove date just from pages, then use this.

    Add this code at at your child theme’s functions.php replacing the previous one.

    if ( ! function_exists( 'x_google_authorship_meta' ) ) :
      function x_google_authorship_meta() {
    
        $author = sprintf( '%s', get_the_author() );
    
        $title = sprintf( '%s', get_the_title() );
    
        $date = ( !is_page() ) ? sprintf( '<time class="entry-date updated" datetime="%1$s">%2$s</time>',
          esc_attr( get_the_date( 'c' ) ),
          esc_html( get_the_date( 'm.d.Y' ) )
        ) : '';
    
        printf( '<span class="visually-hidden">%1$s%2$s%3$s</span>',
          '<span class="author vcard"><span class="fn">' . $author . '</span></span>',
          '<span class="entry-title">' . $title . '</span>',
          $date
        );
    
      }
    endif;

    Let me know.

    #68700
    David B
    Participant

    Sorry for the confusion, I was trying to remove it from archive pages as well, I think it’d be best to remove the date all together. Is this possible? Remove it from posts, pages, archives.

    #69100
    Christian
    Moderator

    To remove the date. Replace

    $date = ( !is_page() ) ? sprintf( '<time class="entry-date updated" datetime="%1$s">%2$s</time>',
          esc_attr( get_the_date( 'c' ) ),
          esc_html( get_the_date( 'm.d.Y' ) )
        ) : '';

    $date = "";

    Hope that helps. 🙂

    #69175
    David B
    Participant

    Ah, that should work.

    Let me confirm, this is all that I have in my child theme:

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    
    function x_google_authorship_meta() {
    
      $author = sprintf( '%s', get_the_author() );
    
      $title = sprintf( '%s', get_the_title() );
    
      $date = "";
    
    }

    Do I need to put the ifs, and all the other code from the X theme functions PHP file here? Or is this good?

    Also, I have the php file in the main folder of the child theme, is this correct?

    Thanks!

    #69607
    Alexander
    Keymaster

    Hi David,

    The code you have there will disable all output from that function. In fact, you could just make the function contents blank entirely. The printf function is what will generate the output for it.

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