Site logo

Archived topic

How can i move share buttons to the right?

5 replies · Started by Daniel on June 21, 2020

Viewing posts 1–6 of 6

Hello

I'm trying to move share buttons from left to right and move the comments & category to the place where social buttons are. Here is a screenshot of what I mean : https://prnt.sc/t3wkru I have tried doing it with css but no luck.

My website : http://memescout.com/
Thanks!

Hi there,

Right now it would be pretty difficult to do cleanly due to the HTML set up. Is it possible to manually place the share icons instead of having them automatically added to the end of the content?

I think it is possible, here is the code that the plugin uses [addtoany] but how can I achieve this?

Hi there,

add this PHP snippet to your site:

add_action( 'after_setup_theme', 'db_custom_footer_meta');
function db_custom_footer_meta() {
    if ( !is_single() ) {
        add_action( 'generate_after_entry_content', function() {
            echo '<div class="meta-wrap">';
        }, 5 );
        add_action( 'generate_after_entry_content', function() {
            echo do_shortcode( '[addtoany]' );
            echo '</div>';
        }, 20 );
    }
}

Adding PHP: https://docs.generatepress.com/article/adding-php/

Then add this CSS:

.meta-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

Thanks, it worked the way I wanted!

You're welcome

This archived topic is closed to new replies.