Add a Small Piece of Content after Post Content

·

In a genesis powered site if you want to add a small piece of content just after the main post content you need to add the following code in functions.php file:

add_action( 'genesis_after_entry_content', 'wbxpress_after_entry_content' );
function wbxpress_after_entry_content() {
	echo 'A piece of extra content just after the main content visible to everywhere';
}

The above piece of extra content will be visible everywhere i.e. in the home page, archive page etc. But if you want to display it only in single post then add a conditional statement as follows:-

add_action( 'genesis_after_entry_content', 'wbxpress_after_entry_content' );
function wbxpress_after_entry_content() {
	if (is_single())
	echo 'A piece of extra content just after the main single post content';
}

If you also want to display in single post as well as page then the code will be:

add_action( 'genesis_after_entry_content', 'wbxpress_after_entry_content' );
function wbxpress_after_entry_content() {
	if (is_singlular())
	echo 'A piece of extra content just after the main post/page content';
}

Please refer conditional statements for any other situation.

4 responses to “Add a Small Piece of Content after Post Content”

  1. Manoj Avatar

    how to add a color box on sidebar tittle like this: https://s23.postimg.org/48s82ad57/Capture.png

    1. Manoj Avatar

      can you please tell me how to add this design?

      1. wbxpress Avatar
        wbxpress

        you need to change widget title properties in style.css file as follows:

        .widget-title {
        color: #fff;
        background-color: #1e8cbe;
        padding: 5px 10px;
        border-radius: 5px 5px 40px 5px;
        font-size: 18px;
        font-size: 1.8rem;
        margin-bottom: 20px;
        }

  2. Nazrul Islam Avatar

    Hello Dear Sir, this blog post is very useful information for the new bloggers, your blog post went to get a lot of new education after I read it,
    Please continue to post such an informative blog. Therefore, people like us will be motivated in real life.
    I’m new in this area and I’m building my website, I’m working hard on this
    Your blogs are very useful here and especially to this blog, which provide this point information, I have received lots of help to read this blog post, please continue to share this kind of information.
    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *