WordPress: Fade Out Excerpt Behind Read More Link

How about an awesome Fade Out effect to “Read more…” link for your post feed? Search no more! Just one CSS hack and done! Themes just neglect this “Continue reading” link and leave it as is. Stuck on the left, no margin, no effects, barely noticeable, plain boring. This easy fade-out effect

Continue reading WordPress: Fade Out Excerpt Behind Read More Link

DDwrt: Free Ad-Blocking DNS Home Router

Unleash your router with DDwrt and transform it into a Free Ad-Blocking DNS Home Router!

You may already know about Ad-Blocking plugins such as ABP or uBlock Origin for Chrome and Firefox, and these work fine… for your computer browser. But these plugins cannot be installed on a media TV, nor on TV Set Top box, nor on a multimedia phone.

Unless I missed something, iPhone browsers are all the same as they rely on Apple’s web framework. I’ve tested different ones some time ago on my 5gs and their web rendering results are all the same (Safari, Dolphin, Firefox). Therefore, they cannot accept plugins, not even mentioning Ad-Blocking plugins. Boooo. Even so jailbreaking allows you to install a local dns blocker, this will break ads detection in many apps, rendering them useless.

Solution? Install the Ad-Blocking software on your router:

adblock-canvas+router

Continue reading DDwrt: Free Ad-Blocking DNS Home Router

Twitter Bootstrap Callout CSS Styles 3.x-4.x

 

Bootstrap Callout

The Bootstrap Callout styles in their documentation is really a nice way to draw attention to important information. For some reason these Callouts are not included in the actual Bootstrap distribution.

Here is my interpretation of the missing CSS code for generic Bootstrap Callouts. The color codes for the info, warning, and danger Callouts are a direct pull from their live CSS for the docs, so I added styles for default, success, and primary.

They include a nice background, color derived from Bootstrap color rules. They also include a transparent and a disabled class.

Continue reading Twitter Bootstrap Callout CSS Styles 3.x-4.x

Meme Generator for Windows – Do It Yourself!

 

Meme Generator online are legion, and they do not offer the same options. Most will limit the size or shape of your meme, and most will apply their signature stamp on it. Plus it takes time to upload the image, refresh the page etc.

There is a solution for you though, and pretty easy believe me! It’s based on ImageMagick, with a simple drag&drop batch script for Windows. This solution will let you create classy memes even your mother would be proud of!

Continue reading Meme Generator for Windows – Do It Yourself!

No, You Cannot Add Class to Post Thumbnail

Let me say it again and again until everyone reminds it: NO, You Cannot Add Classes to WordPress Post Thumbnail / Featured Image.

A common idea circulating the web states that you can, and everyone goes with their own snippet of PHP code to add in your Theme index.php. They are all the same, and they are all wrong:

if ( has_post_thumbnail() ) {      // check if the post has a Post Thumbnail assigned to it.
  the_post_thumbnail( 'full', array( 'class'  => 'class2Add' ) );  // Add a class to the featured image/main post thumbnail
}

Why is this wrong? Because the array of class(es) that you pass to the function the_post_thumbnail() replaces the size classes WordPress has generated for this thumbnail.

Continue reading No, You Cannot Add Class to Post Thumbnail

Copy Text Button in WordPress – Click… It’s Copied!

Copy Text Copy Text Copy Text

Adding the ability to Copy Text Code Blocks Without Flash, with a click from a Copy Text Button inside a Syntax highlighted Code Block, that’s real magic. Bonus: the copied code includes Rich Text Format (RTF syntax). This solution relies on Clibboard.JS, and is the easiest one to add to your site. I could make it work under two hours, so I hope this tutorial will help you make it in less!

This text will be copied onto the clipboard 
when you click the button below. 
Try it!

Continue reading Copy Text Button in WordPress – Click… It’s Copied!

Syntax Highlight Code with EnlighterJS for WordPress

Highlight Code with EnlighterJS for WordPress is pretty easy and the results are awesome. There are plenty of highlighter frameworks around for WordPress, such as Crayon.js and Highlighter.js, but I prefer this one.

It’s faster and lighter than Crayon while offering most of its options. Also I like the WordPress plugin integration better.

EnlighterJS For WordPress

This is even easier! Just install EnlighterJS plugin.

hen make sure to activate it and select the CDN for the MooTools framework (if you use CDNjs):

Redources & CDN settings

 

Code added with the add code button will look like this in your posts:

<pre class="EnlighterJSRAW" data-enlighter-language="html">&lt;!--load EnlighterJS:--&gt;

...some js code..

</pre>

EnlighterJS in 2024 now includes a Copy code button. The ‘Copy to Clipboard‘ button I added back in 2017 was a hack done with Clipboard.js, you can check how to add the copy code button for WordPress here.

EnlighterJS For Standalone Sites

First you need to download the package. EnlighterJS css and JS are note currently available on cdnjs for some reason.

Then all you have to do is add this code in the footer:

<!--load EnlighterJS:-->
<link rel='stylesheet' href='css/EnlighterJS.min.css' type='text/css' />
<script type='text/javascript' src='//cdnjs.cloudflare.com/ajax/libs/mootools/1.6.0/mootools-core.min.js'></script>
<script type='text/javascript' src='js/EnlighterJS.min.js?ver=3.5'></script>

<pre data-enlighter-language="js">
Element.implement({
...some js code..
});
</pre>

Pretty straightforward isn’t it?

EDIT 2024: EnlighterJS is still the best Syntax Highlighter plugin for WordPress in 2024!

Success is just one script away

Exit mobile version