Tagged: x
-
AuthorPosts
-
June 2, 2016 at 5:16 pm #1023058
mpanesarParticipantHi 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,
June 2, 2016 at 9:35 pm #1023485
Prasant RaiModeratorHello 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.
Let us know how it goes.
Thanks.
June 3, 2016 at 4:44 am #1023897
mpanesarParticipantThis reply has been marked as private.June 3, 2016 at 4:32 pm #1024788
FriechModeratorHi 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.
June 4, 2016 at 3:49 pm #1025918
mpanesarParticipantThis reply has been marked as private.June 5, 2016 at 6:44 am #1026517
RadModeratorHi 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.
June 7, 2016 at 5:03 pm #1030761
mpanesarParticipantHi,
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?
June 8, 2016 at 4:23 am #1031525
LelyModeratorHi 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.phpSo 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.
June 8, 2016 at 5:17 pm #1032758
mpanesarParticipantHi,
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?
June 8, 2016 at 11:14 pm #1033312
RadModeratorHi 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!
June 9, 2016 at 4:47 am #1033728
mpanesarParticipantThis reply has been marked as private.June 9, 2016 at 8:43 am #1033991
mpanesarParticipantHi,
Issue has been resolved – many thanks for your help
June 9, 2016 at 12:01 pm #1034327
JadeModeratorYou’re most welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1023058 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
