Help Needed for Plugin Development
-
I needed the category name to be displayed on the top of the sidebar so i tried creating a widget:
<?php /* Plugin Name: DisplayCategoryName Description: Category Name Author: Nadim Lahoud Version: 0.001 Author URI: none */ function get_cat_name($args) { extract($args); ?> <?php echo $before_widget; ?> <?php /* If this is a category archive */ } elseif (is_category()) { ?> <h3><p><?php single_cat_title(''); ?></p></h3> <?php echo $after_widget; ?> <?php } register_sidebar_widget('GetCateName', 'widget_getcatname');
It says error on line 13.
I know this is very specific but this is my first widget/plugin and help would be greatly appreciated.
What’s wrong with line 13?
Are there any other mistakes I made?
Is there an easier way to achieve the desired result?Thanks!
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Help Needed for Plugin Development’ is closed to new replies.