Adding Things

Add Me

Here is our beginning. In this scenario, I'm happy with things but I'd like to add some pieces. As long as those things are relatively static, we can do this with just CSS and pseudo classes.

We'll deal with two of them here but there are many pseudo classes that help you do additional neat things.

              
            

Add Me After

You can use CSS to add textual content using #add-here:after selector in conjunction with content. Note that the space the words occupied remains when we do it this way.

Clicking the button below sets the content but uses emojis to demonstrate a bit more of the possibilities.

              
            

Add Me Before

You can use CSS to add textual content using #add-here:after selector in conjunction with content. Note that the space the words occupied remains when we do it this way.

Clicking the button below sets the content but uses emojis to demonstrate a bit more of the possibilities.

add_filter('the_content', 'filter_function_name')
                

PHP - filtering the_content

When you can't add what you want via CSS because it's dynamic or involves HTML then you're headed to the land of PHP or javascript. Lots of plugins will do this for you or you can write your own. WordPress has many built in filters that you can use to change content as it displays.