Add Social Sharing Buttons

Community Forums Forums Design Tips and Tricks Add Social Sharing Buttons

This topic is: not resolved


This topic contains 1 reply, has 2 voices, and was last updated by  cdils 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #100361



    I am using Streamline Pro Theme and trying to get around Genesis on a XAMPP installation locally. Though i am new to PHP i am willing to learn and apply things.

    I want to add my own social sharing buttons and hence I have the used the below code in my functions.php,

    add_filter( 'genesis_post_info', 'post_info_filter' );
    function post_info_filter( $post_info ) {
    	if ( !is_page() ) {
    			$post_info="<a href='$postURL&text=$post_content' target='_blank'>Link</a>";
        	return $post_info;

    I have few issues and would be really glad if someone could help me,

    1) $post_content=the_excerpt(); – This line automatically outputs the excerpt in a <p> tag outside the entry-meta class, but i haven’t printed it out, what am i missing here?

    2) The output URL is as below:


    I am able to get the URL but not the excerpt in the above URL, what am i doing wrong here?



    the_excerpt() automatically prints the value to the page. If you want to store the value in a variable and print when you’re ready, try get_the_excerpt() instead.

    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.