Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #1898364
Related Articles
Closed

Comments

  •  4
    ISOLE-GRECHE started the conversation

    How is possible to disable Related Articles only for certain posts?

    In post settings, down by article editor I can see only 
    "Disable Auto Load Previous Post" and other settings about siderbar...

  •  501
    Penci replied

    Hi,

    Unfortunately, curently this theme doesn't support disable Related Articles only for certain posts.

    Best Regards,

    PenciDesign

  •  4
    ISOLE-GRECHE replied

    Is it possibile to work on php code?

  •  501
    Penci replied

    Hi,

    Related Articles code on pennews/template-parts/related_posts.php file as screenshot  http://prntscr.com/mmgsmq

    then add custom code as screenshot http://prntscr.com/mmgt4e

    // Post id you want hide  related post
     $post_id = '0';
    if( $post_id == get_the_ID() ) {
    return;
    }

    Please check  this guide to know find the post ID

    Best Regards,

    PenciDesign

  •  4
    ISOLE-GRECHE replied

    1. If I want to unable Related Articles for more than one post_id may I repeat code for each one or have I to use "or" clause?

    2. Excuse me, but I'd like to understand better one thing. If I update the template, I think I'll lose changes. Infact, I'm using theme child to avoid it. Now, in theme child folder there are: functions.php, style.css and screenshot.png. Have I to copy there related_posts.php and add custom code there?

  •  501
    Penci replied

    Hi,

    1/ You can use replace custom code :

    // Post ids you want hide  related post
     $post_ids = array( '0','1','2' );
    if( in_array( get_the_ID(), $post_ids ) ) {
     return;
    }

    to 

    // Post id you want hide  related post
     $post_id = '0';
    if( $post_id == get_the_ID() ) { return;
    }

    2/ Don't worry about this issue.

    If you custom code on child theme of PenNews , It not lose when you update theme.

    If you custom code on  theme, please copy custom code to  child theme.

    Best Regards,

    PenciDesign

  •  4
    ISOLE-GRECHE replied

    Maybe, I didn't understand use of theme child.

    In theme child folder I have only this files:  functions.php, style.css and screenshot.png

    Which are steps I have to do?

  •  501