Archive for category Plugins

Putting HTML and other code into your Wordpress post

The problem

Again I am not really sure why these basic things are overlooked and WordPress is impressively powerful in other areas…. The simple task was to add some html tags into my blog but I did not want them rendered… So I wanted to show HTML like (</p>
<p>
or <br />) or whatever else trips your trigger without my browser reading them like a webpage(hands off broswer).

This is no easy task apparently…. This post on the WordPress Website about Writing Code in Your Posts makes it sound so easy but it did not help me much…..other than learning these few:

< = &lt;
> = &gt;
/ = &#47;
] = &#93;
[ = &#91;
" = &#34;
' = &#39;

Using these has worked for me in post titles but I can’t get them to stay in my actual posts(post body) so I looked for something to help.


The Solution / Answer / Help

I found another Plugin to take care of my needs.  It seems there is a Plugin for everything… I am still testing this with my version(2.8.6) of WordPress but it worked… kind of… Until I find I better solution I will pass it on… The plugin is called…


Code Markup

I used version 1.3…. It was a little quirky but did work after some negotiations between the 2 of us… It could be that this is quirky because I have other Plugins installed. Whatever the case I got it to work… Read on to learn more…)


Note: I found that if I saved while in HTML mode of my post editor it worked fine.  However, if I saved in the visual mode of the the WordPress editor it would erase my html and throw in a bunch of crazy code(random HTML)… The editor just can not leave some things alone. The internal editor for WordPress makes changes to what you post when you save it… It means well but this can leave anyone frustrated. First it was <br /> tags… like I talk about in this post about Adding Line Breaks <br /> With WordPress. All of this is a bit annoying.  It did eventually (knock on wood) giving me a working post with the HTML showing up… I tested it in I am open to other options but for now this will do…  Apparently you can also add other types of code with this Plugin but I have not tried yet.


Tags: , , , , ,

Adding Line Breaks <br /> With WordPress

Overview of the Problem

What a difficult chore…. I use WordPress 2.8.6 but apparently this has been an issue with earlier versions of WordPress as well.  I noticed that there was no button to add line breaks.  Further when I tried to add them either in the visual viewer by pressing return or in the HTML viewer by adding <br />…… I could but it was later erased by the editor.  This was very frustrating because line breaks, returns, carriage, returns, or whatever you want to call them are essential to typing.  How was this overlooked?  I am not sure but I needed a solution.

The Answer

I began to search for answers….. I found some solutions but the one that worked for me was using a Plugin called “TinyMCE Advanced“.  This plugin gives you more options for your wordpress editor.  I am speaking of the interface you use to add posts.  The plugin gives you more buttons and options on that interface.  Once you have it installed (Plugins >> Add New) on your version of Wordpress follow these instructions.

1. Go to Settings and choose TinyMCE Advanced

2. At the bottom there is an advanced box.  One of the Check boxes says:

Stop removing the <p> and <br /> tags when saving and show them in the HTML editor

Check this box….

 

Problem solved… You can also add a number of other buttons.  I am currently using TinyMCE Advanced Version 3.2.4….

Here is  a link which gives some other suggestions(tricks with <p> tags) that do not involve plugins…. It is also where I got my idea to use the TinyMCE Plugin…. The other solutions I could not get to work properly but maybe one of them would be better for you.  Most of the suggestions can be found in the comments at the bottom of this post:

How to Add Extra Line Breaks in WordPress


Tags: , , , , ,