Related posts

Home Forums Gillion Theme Related posts

Home Forums Gillion Theme Related posts

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • awssoft
    Participant

    I found only on/off option, but nothing more.

    How can I choose which posts are in the “Related posts” section?

    Hi @awssoft,

     

    I hope you are well today and thank you for your question.

     

    It displays the posts randomly related to the current post category and you can’t control which posts to display there.

     

    If you want to control related posts section then you can disable theme related posts functionality and use the following related posts functionality provided by Jetpack plugin.

     

    https://jetpack.com/support/related-posts/

    https://jetpack.com/support/related-posts/customize-related-posts/

     

    Best regards,
    Shufflehound team

    awssoft
    Participant

    This plugin uses third party service. It’s not acceptable solution.

     

    We need something simple, but it’s very important to keep theme look.

     

    Is there are any way to keep look of the theme and to get simple functionality e.g.: two additional field on the “Edit blog post” page.

    1. Related posts title
    2. Coma separated ID of related posts

    This will be the perfect improvement for this theme

     

     

    awssoft
    Participant

    I found this is very inflexible and actually its not possible to get theme to look as in demo.

     

    I found one plugin with excellent manual linking.

    https://wordpress.org/plugins/custom-related-posts/

     

    Also I changed part of single.php. Is there possibility to change single.php troughs child theme in order to stay compatible with further updates and how?

     

    This part was changed:

     
    <div>
    <div>$relations = CustomRelatedPosts::get()->relations_to( get_the_ID() );</div>
    <div>$args = array(</div>
    <div>    ‘post__in’ => array_keys($relations),</div>
    <div>    ‘posts_per_page’ => 6,</div>
    <div>    ‘tax_query’ => array(</div>
    <div>        array(</div>
    <div>                ‘taxonomy’ => ‘post_format’,</div>
    <div>                ‘field’ => ‘slug’,</div>
    <div>                ‘terms’ => array( ‘post-format-quote’, ‘post-format-link’ ),</div>
    <div>                ‘operator’ => ‘NOT IN'</div>
    <div>            )</div>
    <div>    ),</div>
    <div>    ‘orderby’ => ‘rand'</div>
    <div>);</div>
    <div>$query = new WP_Query( $args );</div>
    <div>/*if( $query->post_count < 1 ) :</div>
    <div>    $args = array(</div>
    <div>        ‘post__not_in’ => array( get_the_ID() ),</div>
    <div>        ‘posts_per_page’ => 6,</div>
    <div>        ‘ignore_sticky_posts’ => 1,</div>
    <div>        ‘orderby’ => ‘rand'</div>
    <div>    );</div>
    <div>    $query = new WP_Query( $args );</div>
    <div>endif;*/</div>
    </div>

    Awesome great to see you got that found.

    Also I changed part of single.php. Is there possibility to change single.php troughs child theme in order to stay compatible with further updates and how?

    Yes just add that changed single.php file in the root directory of your child theme.

Viewing 5 posts - 1 through 5 (of 5 total)

Popular choice

Professional Developers At Your Fingertips!

If you need services beyond standard support, we've got your back!

Services we offer:

Demo setup
Advanced customization
Layout adjustment
Graphic work / visualizations
Custom coding
Full WordPress development and design

Services

What we can offer

  • Demo setup +

    If you'd prefer not to handle the installation yourself or need help getting started, we'll set everything up for you.

  • Layout adjustment +

    We'll help you rearrange sections, adjust spacing, and modify the page structure to fit your needs.

  • Advanced customization +

    More complex styling changes, theme option modifications, and third-party integrations.

  • Custom coding +

    If you need something that's not included in the theme, we can code it for you.

  • Graphic work / visualizations +

    Web design services to create custom sections, pages, and blocks for your theme, plus graphics and visualizations.

  • Full WordPress development and design +

    Full website builds, custom theme development, or plugin creation from scratch.

  • About pricing +

    We'll provide a clear quote based on what you need. No hidden fees.

Professional Developers At Your Fingertips!

Custom Work Form