WordPress.org

Forums

Simple Share Buttons Adder
right justifying buttons (3 posts)

  1. sailpilot
    Member
    Posted 1 year 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 1 year 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 1 year 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>';

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Share Buttons Adder
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic