Some Very Fast php help please

Discussion in 'General Programming Chat' started by jdownloads, Oct 26, 2012.

  1. jdownloads

    jdownloads Junior Member

    Joined:
    Mar 25, 2008
    Messages:
    182
    Likes Received:
    168
    Location:
    Canada
    Home Page:
    So I have this wordpress theme that comes with social buttons. It doesn't have Pinterest, so I'm adding it in. My problem is that I want all the buttons in a row and not on seperate lines. I put the pinterest shortcode in and it puts the button on a seperate line. Any help? Here is the original code;

    Code:
    <?php
        /* social sharing  */
        if( meta::logic( $post , 'settings' , 'sharing' ) ){
    ?>      <div class="share">
                <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink( $post -> ID ); ?>" data-text="<?php echo $post -> post_title; ?>" data-count="horizontal">Tweet</a>
                <g:plusone size="medium" href="<?php echo get_permalink( $post -> ID ); ?>"></g:plusone>
    			<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode( get_permalink( $post->ID ) ); ?>&layout=button_count&show_faces=false&&action=like&colorscheme=light" scrolling="no" frameborder="0" height="20" width="140"></iframe>
    
    		</div>
    <?php
        }
    ?>
    And here is my attempt, NOTE the shortcode added...

    Code:
    <?php
        /* social sharing  */
        if( meta::logic( $post , 'settings' , 'sharing' ) ){
    ?>      <div class="share">
                <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink( $post -> ID ); ?>" data-text="<?php echo $post -> post_title; ?>" data-count="horizontal">Tweet</a>
                <g:plusone size="medium" href="<?php echo get_permalink( $post -> ID ); ?>"></g:plusone>
    			<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode( get_permalink( $post->ID ) ); ?>&layout=button_count&show_faces=false&&action=like&colorscheme=light" scrolling="no" frameborder="0" height="20" width="140"></iframe>
    <?php echo do_shortcode('[pinit]'); ?>
    
    		</div>
    <?php
        }
    ?>
    And the undesired result you can see at funnyasspictures (dot) net

    Any help is appreciated. Thanks
     
  2. sockpuppet

    sockpuppet Junior Member

    Joined:
    Nov 7, 2011
    Messages:
    155
    Likes Received:
    145
    Put this in a style in your head or modify this file: wp-content/plugins/pinterest-pin-it-button/css/pinterest-pin-it-button.css
    Code:
    .pin-it-btn-wrapper-shortcode {
        display: inline-block;
        height: 20px;
    }
    
     
    • Thanks Thanks x 1
  3. jdownloads

    jdownloads Junior Member

    Joined:
    Mar 25, 2008
    Messages:
    182
    Likes Received:
    168
    Location:
    Canada
    Home Page:
    Awesome! That did the trick, truly appreciated. Thanks and Thanks Given.