Viewing 2 replies - 1 through 2 (of 2 total)
  • You need a functions.php in your child-theme,
    (a functions.php is just a file named that way in your child-theme folder which just starts with <?php)

    add_filter('tc_post_content', 'related_posts');
    function related_posts( $_content ){
      echo $_content;
    // your code here
    }

    Hope this helps.

    Anyway there are a lot of powerful plugins for related posts, if you’re not a developer you might want to use them.

    Thread Starter Anonymous User

    (@anonymized-10133093)

    thanks for your input, but i can’t make it work. if you felt like making me a functions.php file with code from the wpbeginner example that worked and pasting it here i would be overjoyed, but of course that is a bit much to ask as I am not paying you!

    All the related posts plugins i find are a bloat nightmare, all i want it to do is exactly what this bit of code does, display all the posts with the same tag and a thumbnail next to it. i used to use Microkid’s Related Posts, but it is massively out of date and will cause problems sooner rather than later i am sure.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘help in inserting related post code from guide’ is closed to new replies.