Benefits to using semantic HTML in post content? [closed]

It’s a little hard to answer this question definitively, but typically, adding semantic markup can benefit SEO (because robots understand what they’re parsing better) and can benefit end users (because their various technologies, which could include screen readers among many others, also understand what they’re parsing better). Search engines and screen readers also often present … Read more

Excerpt vs content formatting woes

the_content() and the_excerpt(), unlike their ‘get_’ brothers will process the content through some functions, one of them is wpautop() that will add p tags for you. To get the same formatting for both excerpt and content: if ( has_excerpt() ) { the_excerpt(); } else { the_content(__(‘Read more’)); }

tabbed content box with different tabbed background images

Prepare You will have to use some jQuery and jQuery UI on your tabs. Load it with wp_enqueue_script – Codex, How-To. The search In any case: Google for “jQuery Tabs”. Mark up The mark-up will look close to this one. <!– These are the tabs –> <ul class=”wpse-tabs”> <li> <a href=”#your-target-div-A” title=”Your target description A”> … Read more

the_content() returning null in one category only, even though there is content

Is there any way to output the raw, unfiltered post HTML to find out whether this is a rogue filter deleting all the content in that specific category for some weird reason? Yes there is, you can use $post->post_content. Try adding something like: echo ‘<pre>’.$post->post_content.'</pre>’; just before the_content() call in your template file. What else … Read more

Add Content to Content()

// Hook into the_content filter here function append_to_the_content($content){ ob_start(); // Start doing stuff here … // End doing stuff here … $new_content = ob_get_clean(); return $content.$new_content; // Append new content return $new_content.$content; // Prepend new content } // function append_to_the_content($content) // 11 priority avoid wpautop() that messes custom HTML add_filter(‘the_content’, ‘append_to_the_content’, 11); Regards.