WordPress.org

Ready to get started?Download WordPress

Forums

Simple Share Buttons Adder
right justifying buttons (3 posts)

  1. sailpilot
    Member
    Posted 9 months ago #

    How do you right justify the buttons on a post/page?

    I see options for left and center but not right.

    Thanks

    http://wordpress.org/plugins/simple-share-buttons-adder/

  2. sailpilot
    Member
    Posted 9 months ago #

    I figured out a quick and dirty solution to right justifying the buttons.

    You have to change two lines in simple-share-buttons-adder.php

    change

    // center if set so
    $htmlShareButtons.= ($arrSettings['ssba_align'] == '<center>' ? 'center' : NULL);

    to

    // center if set so
    $htmlShareButtons.= ($arrSettings['ssba_align'] == 'center' ? '<div align="right">' : NULL);

    and change

    // close center if set
    $htmlShareButtons.= ($arrSettings['ssba_align'] == 'center' ? '</div>' : NULL);
    $htmlShareButtons.= '</center>';

    to

    // close center if set
    $htmlShareButtons.= ($arrSettings['ssba_align'] == 'center' ? '</div>' : NULL);
    $htmlShareButtons.= '</div>';

    hopefully the next version will have a right justification option so this change will not be necessary.

  3. sailpilot
    Member
    Posted 9 months ago #

    sorry that second change should have been from

    // close center if set
    $htmlShareButtons.= ($arrSettings['ssba_align'] == 'center' ? '</center>' : NULL);
    $htmlShareButtons.= '</center>';

    to

    // close center if set
    $htmlShareButtons.= ($arrSettings['ssba_align'] == 'center' ? '</div>' : NULL);
    $htmlShareButtons.= '</div>';

Reply

You must log in to post.

About this Plugin

About this Topic