Wordpress has the ability to password protect entire articles. However, I do not know of any hack or trick that can be used to encrypt only part of the text of an article. This hack is thus far better and more powerful than what comes with Wordpress. It could however be implemented on Wordpress as well.
The first technique is not encryption per se but rather code obfuscation. It makes it more difficult for somebody to steal your code. It is a technique sometimes employed by template designers to make their credits in the footer more difficult to modify. It involves escaping the characters to be hidden using a the escape / unescape function. Let’s take for instance the following link:
<a href="http://www.blogidol.ro" target="_blank">BlogIdol.ro</a>
Using a tool such as Q-esc (link and backup below), you can transform the following code into
The online tool I used for the above example is WebCode’s escape-unescape tools. Unfortunately, such tools have the bad habit of disappearing quite often. It’s instructive to see how this is accomplished.
Looking in the source code of that webpage, we find that the main function is external, called through the following <head statement:
The Escape Tool contains the following table:
Thus, you should be able to not only obfuscate your code, but if the tool ever goes down, you should be able to make your own!