• Resolved kml5747

    (@kml5747)


    Hi! Thanks for the plugin, really helpful! I just have some questions about customization. I add this on my functions.php file

    
    add_filter( 'the_content', 'add_related_posts_after_post_content' );
    function add_related_posts_after_post_content( $content ) {
     
        //check if it's a single post page.
        if ( is_single() ) {
     
            // check if we're inside the main loop
            if ( in_the_loop() && is_main_query() ) {
     
                // add your own attributes here (between the brackets [ ... ])
                $shortcode = '[related_posts_by_tax posts_per_page="4"]';
     
                // add the shortcode after the content
                $content = $content . $shortcode;
            }
        }
     
        return $content;
    }

    1. How do I show the title below the thumbnail and not on hover.
    2. How do I change the text “Related Post” to my own text.

    Thanks

    • This topic was modified 9 years, 7 months ago by keesiemeijer.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Show title below thumbnail’ is closed to new replies.