Add Piwik Tracking code to page

Add the tracking code to one of your theme files, most likely footer.php. The easiest way to do this is to go to your admin panel and go to Appearance > Editor, and on the right side, find the entry for Footer (footer.php), and then insert the code right before the closing </body> tag. Update … Read more

Prevent WordPress from messing my HTML

I assume you are using the text editor… The example with the blank line in your question would normally be converted by WP to this: <ol> <li>Paragraph 1 : text <p> Some more text</p></li> <li>…</li> </ol> Wpautop wraps the 2nd line with the p element because of the blank line you created. Your example of … Read more

Embed tag length issues

I was able to figure it out. embed tags do not work with pdf’s because it does not render through the browser. Using the object tag worked: <object data=”http://example.com/wp-content/uploads/…somefile.pdf” type=”application/pdf” width=”1000px” height=”1200px”> <p>It appears you don’t have a PDF plugin for this browser. You can download the pdf <a href=”http://example.com/wp-content/uploads/…/somefile.pdf”>here</a> </p> </object>

HTML generated by WP

As for a function like wp_nav_menu, it is very well documented in the codex as you can see from the link. Some functions are very well documented, others not that well. You can do the following Start at the codex. You’ll find (almost) every native function that WordPress uses in the codex. Like I said, … Read more

Is absolute control possible with WordPress

WordPress is just a CMS written in PHP language (well, some Javascript, HTML, and CSS too). It means if you’re building a self-hosted WordPress website (or, as you call it, WordPress.org) – you have absolute and total control and can do whatever you need. However, the possibilities are limited – by your own knowledge and … Read more

Switching From HTML to Visual Editor and Back Completely Strips Page Contents

I’ve had this code in a custom local plugin for a while. Or you could just stick it in your theme’s functions.php: // Allow iframe in TinyMCE function tinymce_add_iframe( $arr = array() ) { $extra=”iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]”; if ( isset( $arr[‘extended_valid_elements’] ) ) { // append to existing value $arr[‘extended_valid_elements’] .= ‘,’ . $extra; } else { … Read more

How to prevent pages from automatically adding line breaks?

Try using get_the_content(); in your page template loop instead of the_content(); EDIT 05/24/2012 – Try this: <div id=”main-content”> <?php while( have_posts() ) : the_post() ?> <h1 id=”pagetitle”><?php the_title(); ?></h1> <div class=”pagecontent”> <?php echo get_the_content(); ?> </div> <?php endwhile ?> </div> P.S. You will also need to consider the rest of your more “normal” wordpress pages … Read more