Scripts and CSS

Below are scripts and CSS styles I made myself to help with various niche sites. Feel free to use and share these scripts!

How to use scripts: copy the scripts and place them into your header. You can install a plugin like Insert Headers and Footers which will allow you to paste in the scripts below.

How to use CSS: copy and paste the CSS into the Custom CSS part of your theme options.

Comment Links

This script replaces keywords in comments with links of your choice. Replace “google” with your kw choice and with the URL of your choice. You can also add multiple lines, like “Yahoo”.

<!-- replace kws in comments with links -->
jQuery(".comment-content").html(function () {
    return jQuery(this).html()
.replace(new RegExp("google", "ig"), "<a href=''>Google</a>")
.replace(new RegExp("yahoo", "ig"), "<a href=''>Yahoo</a>") 
; });
<!-- END replace kws in comments with links -->

Enhanced Posts Thumbs

This adds a little “pop” to your thumbnails in your blogroll or post archives for GeneratePress (you can use it for different themes once you know the right CSS class)

 .post-image img {
    border-radius: .2rem;
    box-shadow: 0 0.2rem 0.3rem 0 rgba(0,0,0,.3);