I’ve noticed that I get A LOT of spam from my comment forms. After a month of constantly deleting viagra ads and celebrity porn videos I have decided to take a stand. NO MORE SPAM!!
I’ve noticed that I get A LOT of spam from my comment forms. After a month of constantly deleting viagra ads and celebrity porn videos I have decided to take a stand. NO MORE SPAM!!
Last week our server at work suddenly became unresponsive and none of our websites would load. This looked similar to a problem that we encountered with the Gantry Framework for Joomla so I took the usual steps to solve the problem and it worked. Then, the next day, the problem occurred again. Then the next day and the one following that.
Sometimes it becomes necessary to post articles from one particular category but the default WordPress CMS does not allow for that. Fortunately, there is List Category Posts.
Since posting the article Helix Framework for Joomla I have been looking for template development frameworks for my favourite CMS, WordPress. The first one that I came across was Gantry.
Here’s another tip for all you WordPress users out there. The information below was taken from www.tips4developer.com and the owner retains all copyright to his/her post.
As a WordPress developer you might want to execute PHP code in WordPress Text Widget. At times all of us have this requirement. Unfortunately, WordPress do not allow this. But with the help of below steps you can enable PHP code execution in WordPress Text Widget.
Steps to follow:
1. Add the following code in “functions.php”
add_filter(‘widget_text’, ‘enable_php_code’, 99);
function enable_php_code ($text) {
if (strpos($text, ‘< ' . '?') !== false) {
ob_start();
eval(‘?’ . ‘>’ . $text);
$text = ob_get_contents();
ob_end_clean();
}
return $text;
}
2. Go to Appearance > Widgets section and drag a Text Widget to your sidebar.
3. Add your PHP code in Text Widget.
That’s all you are done.
For all you WordPress users out there who like creating your own templates, here is a tip to help you on your way. The information below was taken from www.tips4developer.com and the owner retains all copyright to his/her post.
If you are looking forward to create your own widget area in wordpress, then you are at right place. Creating custom widget area is something like creating your own sidebar widget area, but with the flexibility to place it anywhere in between your template code, so that might be in header.php, footer.php, page.php or index.php. And with the help of which you can display widgets of your own choice.
1. Locate functions.php in your active theme folder and add the bellow code in it.
if ( function_exists(‘register_sidebar’) )
register_sidebar( array(
‘name’ => __( ‘My Custom Widget Area – 1’),
‘id’ => ‘myCustomWidgetArea1’,
‘description’ => __( ‘An optional widget area for your site footer’, ‘twentyeleven’ ),
‘before_widget’ => ‘“,
‘before_title’ => ‘‘,
‘after_title’ => ‘‘,
) );
2. Next step is calling widgets area from theme template files. For that you just have to place this code in the div or any other container you wish. You can place the bellow code in – header.php, footer.php, page.php, index.php, single.php or any other template related files.
< ?php
// Custom widget Area Start
if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘My Custom Widget Area – 1’) ) : ?>
< ?php endif;
// Custom widget Area End
?>
Here you are done, your widget area is ready to drag your widgets in it. What are you waiting for go ahead and drag widgets to display on your website.