Author Archives: Michael (aka alchymyth)

55 | Editing Widget Parameters per Filter Function WordPress

g+

If you want to change the parameters of the default widgets, for instance the font sizes of the tag cloud widget, you will notice that you can’t access the codes directly. Editing the core files in the /wp-includes folder is … Check the whole post »

Posted in Easy Coding for Wordpress, Tips & Tricks, WordPress | Tagged , , , , , | 3 Responses

54 | Adding a Custom Widget Area to a WordPress Template

g+

The Codex has a chapter on how to add new widget areas (commonly referred to as ‘sidebars’) to a theme’s template: ‘Widgetizing Themes‘ This example here is to give you the direct code to add to functions.php and to the … Check the whole post »

Posted in Easy Coding for Wordpress, Tips & Tricks, WordPress | Tagged , , , , | 11 Responses

53 | Adsense Ad at Random Position in a Posts Page

g+

This code is made to output an adsense ad (or any other block of output) at a random position within the loop, with the restriction to a preset number of possible positions. Thanks to the tutorials of http://www.php.net/ …

Posted in Tips & Tricks, WordPress | Tagged , | Leave a comment

52 | Numbering Posts

g+

To give posts a continuous number in index pages or archives, try this little piece of code: Place it within the loop; condition: needs to be adjusted for any custom query.

Posted in Easy Coding for Wordpress | Tagged , | 3 Responses

50 | Twenty Eleven – New Page Template with Sidebar Correction

g+

If you are creating a new page template for a child theme of Twenty Eleven, with a sidebar, you need to correct the body_class output to remove the css class .singular. Add this to functions.php of your child theme: If … Check the whole post »

Posted in Tips & Tricks, Twenty Eleven | Tagged , , | 17 Responses

49 | WordPress Post Thumbnails with Caption

g+

GREAT NEWS: since wp4.6, WordPress has just the right function for featured image captions: https://developer.wordpress.org/reference/functions/the_post_thumbnail_caption/ This is a tidying up of a WordPress support forum topic – nothing really that I came up with myself. The question is how to … capture it all … »

Posted in Easy Coding for Wordpress, WordPress | Tagged , , , , , | 5 Responses

48 | Mini SEO – a Meta Description Field for Posts and Pages

meat description input field
g+

Modern search engines do not rely on meta descriptions and meta keywords anymore for your ranking. However, they do preferably show a proper added meta description instead of the first few words of the post or page. If you can … Check the whole post »

Posted in Tips & Tricks, WordPress | Tagged , , , , | 12 Responses

47 | Page Template Sidebar Overwrite Theme Options in Twenty Eleven

Page Template Sidebar Overwrite Theme Options in Twenty Eleven
g+

Twenty Eleven already comes with a page template to add a sidebar to static pages. However, this sidebar will always be on the same side as the sidebar on the front  page, ruled by the ‘theme options’. On some pages, … Check the whole post »

Posted in Tips & Tricks, Twenty Eleven, WordPress | Tagged , , , , | 9 Responses

46 | Styling the First Post Different

g+

How to style the first / last / latest / newest post in a WordPress site different? The default advice usually is to use a counter variable and a conditional statement to check for the first post in the loop; … Check the whole post »

Posted in Easy Coding for Wordpress, WordPress | Tagged , , , | 6 Responses