Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1207071
    streitcouncil
    Participant

    Hello,

    My organization recently rebooted its blog (blog.streitcouncil.org) with the X theme, but we’re seeking advice on how to make the following modifications:

    1. How can we add a tagline under “Streit Talk”? We’d also like to indent it as far in as the “t”.

    2. It it possible to have images that appear near the top of our blog posts appear in the blog index, next to the excerpt?

    3. How do we remove the “by editor” meta tag? We’d like it just to show “In Issue Briefs” or whatever category that post is in.

    4. On the blog index, the byline is occasionally visible. Not sure why it’s not consistent, but we’d prefer if it didn’t appear at all.

    Any help would be appreciated!

    #1207645
    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    1. Please add this CSS to Admin > Appearance > Customizer > Custom > CSS

    .x-brand.text:after {
        content: attr(title);
        font-size: 12px;
        letter-spacing: normal;
        display: block;
    }

    Then you can change your tagline at Admin > Settings > General

    2. You mean like a banner? Would you mind providing a mockup screenshot?

    3. Please add this code to your child theme’s functions.php

     function x_ethos_entry_meta() {
    
        //
        // Author.
        //
    
        $author = sprintf( ' %1$s %2$s</span>',
          __( 'by', '__x__' ),
          get_the_author()
        );
    
        //
        // Date.
        //
    
        $date = sprintf( '<span><time class="entry-date" datetime="%1$s">%2$s</time></span>',
          esc_attr( get_the_date( 'c' ) ),
          esc_html( get_the_date() )
        );
    
        //
        // Categories.
        //
    
        if ( get_post_type() == 'x-portfolio' ) {
          if ( has_term( '', 'portfolio-category', NULL ) ) {
            $categories        = get_the_terms( get_the_ID(), 'portfolio-category' );
            $separator         = ', ';
            $categories_output = '';
            foreach ( $categories as $category ) {
              $categories_output .= '<a href="'
                                  . get_term_link( $category->slug, 'portfolio-category' )
                                  . '" title="'
                                  . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                                  . '"> '
                                  . $category->name
                                  . '</a>'
                                  . $separator;
            }
    
            $categories_list = sprintf( '<span>%1$s %2$s',
              __( 'In', '__x__' ),
              trim( $categories_output, $separator )
            );
          } else {
            $categories_list = '';
          }
        } else {
          $categories        = get_the_category();
          $separator         = ', ';
          $categories_output = '';
          foreach ( $categories as $category ) {
            $categories_output .= '<a href="'
                                . get_category_link( $category->term_id )
                                . '" title="'
                                . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                                . '"> '
                                . $category->name
                                . '</a>'
                                . $separator;
          }
    
          $categories_list = sprintf( '<span>%1$s %2$s',
            __( 'In', '__x__' ),
            trim( $categories_output, $separator )
          );
        }
    
        //
        // Comments link.
        //
    
        if ( comments_open() ) {
    
          $title  = apply_filters( 'x_entry_meta_comments_title', get_the_title() );
          $link   = apply_filters( 'x_entry_meta_comments_link', get_comments_link() );
          $number = apply_filters( 'x_entry_meta_comments_number', get_comments_number() );
          
          $text = ( 0 === $number ) ? 'Leave a Comment' : sprintf( _n( '%s Comment', '%s Comments', $number, '__x__' ), $number );
    
          $comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments">%3$s</a></span>',
            esc_url( $link ),
            esc_attr( sprintf( __( 'Leave a comment on: &ldquo;%s&rdquo;', '__x__' ), $title ) ),
            $text
          );
    
        } else {
    
          $comments = '';
    
        }
    
        //
        // Output.
        //
    
        if ( x_does_not_need_entry_meta() ) {
          return;
        } else {
          printf( '<p class="p-meta">%1$s%2$s%3$s%4$s</p>',
            $categories_list,
            '',
            $date,
            $comments
          );
        }
    
      }

    4. You mean the article separator? You can remove it by adding this CSS

    .blog .x-main .hentry, .search .x-main .hentry, .archive .x-main .hentry {
        margin-top: 0px;
        border-top: 0px;
        padding-top: 35px;
    }

    Hope this helps.

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