How to add a class to the element?

Here is a way of adding the class. Replace blog withe the slug of the page. Example – This class will be added only on example.com/blog. Put this code in your header.php <?php if($post->post_name === ‘blog’){ ?> <html class=”html-homepage”> <?php } else { ?> <html> <?php ?>

How put links in wordpress dynamic sidebar?

If you useWidget Logic it adds a new filter widget_content which you can hook your function to and add link to it somthing like: add_filter(‘widget_content’,’add_link_to_widgets’); function add_link_to_widgets($content){ return $content . ‘<br /><a href=”http://www.domain.com”>my link</a>’ } Update You are missing the point, the plugin is great if you want to use his ability to limit the … Read more

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