Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #140435
    Nabeel A
    Moderator

    Hi there,

    To make the functionality work please replace the code with this one:

    add_action ('the_content', 'add_button_navigation' );
    
    function add_button_navigation ( $content ) {
    	$prev_post = get_previous_post();
    	$next_post = get_next_post();
    
        $facebook_share = "<a class='x-fb' href=\"#share\" data-toggle=\"tooltip\" data-placement=\"bottom\" data-trigger=\"hover\" class=\"x-share\" title=\"" . __( 'Share on Facebook', '__x__' ) . "\" onclick=\"window.open('http://www.facebook.com/sharer.php?u=".urlencode( get_permalink() )."&t=Share This Story on Facebook ', 'popupFacebook', 'width=650, height=270, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;\">Share This Story on Facebook</a>";
        $my_custom_text = '<a class="x-previous" href="'.get_permalink( $prev_post->ID ).'">Previous Story</a> | <a class="x-next" href="'.get_permalink( $next_post->ID ).'">Next Story</a> | '.$facebook_share;
        if( is_singular('post') ) {
            $content .= $my_custom_text;
        }
        return $content;
    }

    This should work now. Cheers!

    #140533
    dscuba
    Participant
    This reply has been marked as private.
    #140756
    Christopher
    Moderator

    Hi there,

    #1 Change our last suggested code to

    add_action ('the_content', 'add_button_navigation' );
    
    function add_button_navigation ( $content ) {
    	$prev_post = get_previous_post();
    	$next_post = get_next_post();
    
        $facebook_share = "<a class='x-fb' href=\"#share\" data-toggle=\"tooltip\" data-placement=\"bottom\" data-trigger=\"hover\" class=\"x-share\" title=\"" . __( 'Share on Facebook', '__x__' ) . "\" onclick=\"window.open('http://www.facebook.com/sharer.php?u=".urlencode( get_permalink() )."&t=Share This Story on Facebook ', 'popupFacebook', 'width=650, height=270, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;\">Share This Story on Facebook</a>";
        $my_custom_text = '<a class="x-previous" href="'.get_permalink( $prev_post->ID ).'">Previous Story</a>  <a class="x-next" href="'.get_permalink( $next_post->ID ).'">Next Story</a>  '.$facebook_share;
        if( is_singular('post') ) {
            $content .= $my_custom_text;
        }
        return $content;
    }

    #2 Please add the following CSS code under Customize -> Custom -> CSS:

    a.x-previous, a.x-next,a.x-fb {
    text-align: center;
    font-weight:bold;
    }

    #3 the sharing buttons or next and prev buttons?

    Hope it helps.

    #140952
    dscuba
    Participant

    Hi Team X,

    1. It worked but need some padding or spacing between the top two buttons and the bottom button.

    See http://www.espressoulcafe.com/daddy-daughter-date-night-chick-fil/

    3. Per your question, I’d like all three buttons to display ABOVE the comments section.

    Thank you.

    #141116
    Christopher
    Moderator

    Hi there,

    #1 Change your last CSS to :

    a.x-previous, a.x-next, a.x-fb {
    text-align: center;
    font-weight: bold;
    margin: 0 5px 10px 0;
    }

    #2 I need to know how you added comment section , please provide us with login credential.

    Thank you.

    #141251
    dscuba
    Participant
    This reply has been marked as private.
    #141418
    Christian
    Moderator
    This reply has been marked as private.
    #142086
    dscuba
    Participant
    This reply has been marked as private.
    #142349
    Zeshan
    Member

    Hi there,

    Thank you for writing in!

    It seems you might be having an issue with a third party plugin (FB Comments Master). Regretfully, we cannot provide support for third party plugins as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

    Thank you for your understanding.

    #142614
    dscuba
    Participant
    This reply has been marked as private.
    #142945
    dscuba
    Participant
    This reply has been marked as private.
    #143058
    Paul R
    Moderator

    Hi,

    I was able to make the buttons appear above the comments box.

    Please check http://www.espressoulcafe.com/daddy-daughter-date-night-chick-fil/

    Thanks

    #143714
    dscuba
    Participant
    This reply has been marked as private.
    #144053
    Paul R
    Moderator

    You’re welcome. 🙂

    Thanks for letting us know, no need to reverse the code.

    #144352
    dscuba
    Participant
    This reply has been marked as private.
  • <script> jQuery(function($){ $("#no-reply-136115 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>