Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1023058
    mpanesar
    Participant

    Hi XTheme,

    How do you disable blog post description on quote post format please?

    As you can see from the screenshot both the quote and description is both shown.

    I would like to keep the description for SEO purposes but would like them not be shown in the post.

    many thanks,

    #1023485
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in!

    You can use a SEO plugin like Yoast and move description in meta description field. In that way it won’t be shown in post page and will take care of SEO also.

    http://prntscr.com/bbpc63

    Let us know how it goes.

    Thanks.

    #1023897
    mpanesar
    Participant
    This reply has been marked as private.
    #1024788
    Friech
    Moderator

    Hi There,

    To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thanks.

    #1025918
    mpanesar
    Participant
    This reply has been marked as private.
    #1026517
    Rad
    Moderator

    Hi there,

    The problem is that SEO only picks data within the content (editor), not on any custom field.

    If you wish to follow SEO requirement, then you’ll have to use the editor for content (Method 2). Then do template editing to correct the content display.

    1. Copy this file content-quote.php from \wp-content\themes\x\framework\views\renew\ to your child theme of same folder structure (eg. \wp-content\themes\x-child\framework\views\renew\)

    2. Edit your child theme’s content-quote.php and remove this line

    <?php x_get_view( 'global', '_content', 'the-content' ); ?>

    3. Save and upload it.

    Make sure that post editor and quote input has the same content. That is to maintain the look without reworking the whole template.

    Hope this helps.

    #1030761
    mpanesar
    Participant

    Hi,

    The example provided did work but it had other effects such as removing related articles by JetPack, social share buttons etc

    Where can I find where it is referencing ‘the-content’ in x_get_view( ‘global’, ‘_content’, ‘the-content’ ); please as I feel the solution may lie here if I disable the code to display content within editor?

    #1031525
    Lely
    Moderator

    Hi There,

    This line:
    <?php x_get_view( 'global', '_content', 'the-content' ); ?>, is calling this file \wp-content\themes\x\framework\views\global\_content-the-content.php

    So when you remove that line, this line of code was not called at all:
    <?php x_link_pages(); ?>

    You may add that instead.

    Hope this helps.

    #1032758
    mpanesar
    Participant

    Hi,

    It appears that the <?php the_content(); ?> is the one that holds the JetPack, social share buttons etc as when executed the script, it showed everything however after commenting it out and leaving <?php x_link_pages(); ?>, it removed all the JetPack, social share buttons etc.

    Any further advise would be greatly appreciated? Where would the contents of the_content() method be shown please?

    #1033312
    Rad
    Moderator

    Hi there,

    But if we will re-add the_content() where the quote is, then you’ll see double content again. If we will then replace Quote with the_content(), then it will display within the title and link where the quote is.

    Try this code for \wp-content\themes\x\framework\views\renew\content-quote.php

    <?php
    
    // =============================================================================
    // VIEWS/RENEW/CONTENT-QUOTE.PHP
    // -----------------------------------------------------------------------------
    // Quote post output for Renew.
    // =============================================================================
    
    $cite  = get_post_meta( get_the_ID(), '_x_quote_cite',  true );
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-wrap">
        <header class="entry-header">
          <?php if ( is_single() ) : ?>
          <div class="x-hgroup">
            <h1 class="entry-title"><?php x_get_view( 'global', '_content', 'the-content' ); ?></h1>
            <cite class="entry-title-sub"><?php echo $cite; ?></cite>
          </div>
          <?php else : ?>
          <div class="x-hgroup">
            <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_get_view( 'global', '_content', 'the-content' ); ?></a></h2>
            <cite class="entry-title-sub"><?php echo $cite; ?></cite>
          </div>
          <?php endif; ?>
          <?php x_renew_entry_meta(); ?>
        </header>
        <?php if ( is_single() ) : ?>
          <?php if ( has_post_thumbnail() ) : ?>
            <div class="entry-featured">
              <?php x_featured_image(); ?>
            </div>
          <?php endif; ?>
          <?php x_get_view( 'renew', '_content', 'post-footer' ); ?>
        <?php endif; ?>
      </div>
    </article>

    You’ll notice that the_content() template is added to the title and link.

    Thanks!

    #1033728
    mpanesar
    Participant
    This reply has been marked as private.
    #1033991
    mpanesar
    Participant

    Hi,

    Issue has been resolved – many thanks for your help

    #1034327
    Jade
    Moderator

    You’re most welcome.

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