• Resolved omd10

    (@omd10)


    Hi, I use Social Sharing buttons – horizontally – at the end of posts.
    I’d like to put some simple code (like this Categoria: <?php the_category(' - '); ?>) after the post content to show category name (after the post but) before Social Sharing buttons.

    The problem I can’t solve is that Social Sharing buttons appear before category, just below the post content.
    How can I solve it?
    Thank You in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Heateor Support

    (@heateor)

    Hi,

    You need to use the_content filter to place the code you want with the less priority number than that our plugin uses to place share icons (99).
    Example-

    function place_categories( $content ) {
        // append categories or whatever you want to render before share icons, to 
        // the content
        return $content;    // return content
    }
    add_filter( 'the_content', 'place_categories', 98 );

    You can place above code in the functions.php file of your active theme.

    Thread Starter omd10

    (@omd10)

    Thank You!!!

    Plugin Author Heateor Support

    (@heateor)

    You’re welcome

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to place some code before social sharing’ is closed to new replies.