Hi,
how can i remove the "entries rss" and "comments rss" links from the meta widget ?
Hi,
how can i remove the "entries rss" and "comments rss" links from the meta widget ?
Paste this in your functions.php
// Widget: Meta; to match the Sandbox style and replace Widget plugin default
function widget_sandbox_meta($args) {
extract($args);
$options = get_option('widget_meta');
$title = empty($options['title']) ? __( 'Meta', 'sandbox' ) : $options['title'];
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?>
<ul>
<?php wp_register() ?>
<li><?php wp_loginout() ?></li>
<?php wp_meta() ?>
</ul>
<?php echo $after_widget; ?>
<?php
}i tried adding that code to the beggining, middle and end of that file, it doesn't work.
my website's urls is www.futept.com
help ?
I forgot a part...also add this code:
// Widgets plugin: intializes the plugin after the widgets above have passed snuff
function sandbox_widgets_init() {
// Sandbox Meta widget
$widget_ops = array(
'classname' => 'widget_meta',
'description' => __( "Log in/out and administration links (Sandbox)", "sandbox" )
);
wp_register_sidebar_widget( 'meta', __( 'Meta', 'sandbox' ), 'widget_sandbox_meta', $widget_ops );
unregister_widget_control('meta');
wp_register_widget_control( 'meta', __('Meta'), 'wp_widget_meta_control' );
}
// Runs our code at the end to check that everything needed has loaded
add_action( 'init', 'sandbox_widgets_init' );Parse error: syntax error, unexpected '}' in /home/futeptco/public_html/wp-content/themes/freshnews/functions.php on line 572
:(
It should look something like this:
// Widget: Meta; to match the Sandbox style and replace Widget plugin default
function widget_sandbox_meta($args) {
extract($args);
$options = get_option('widget_meta');
$title = empty($options['title']) ? __( 'Meta', 'sandbox' ) : $options['title'];
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?>
<ul>
<?php wp_register() ?>
<li><?php wp_loginout() ?></li>
<?php wp_meta() ?>
</ul>
<?php echo $after_widget; ?>
<?php
}
// Widgets plugin: intializes the plugin after the widgets above have passed snuff
function sandbox_widgets_init() {
// Sandbox Meta widget
$widget_ops = array(
'classname' => 'widget_meta',
'description' => __( "Log in/out and administration links (Sandbox)", "sandbox" )
);
wp_register_sidebar_widget( 'meta', __( 'Meta', 'sandbox' ), 'widget_sandbox_meta', $widget_ops );
unregister_widget_control('meta');
wp_register_widget_control( 'meta', __('Meta'), 'wp_widget_meta_control' );
}
// Runs our code at the end to check that everything needed has loaded
add_action( 'init', 'sandbox_widgets_init' );
Try to remove anything else from that file first (but keep it somewhere), and try it out.
Parse error: syntax error, unexpected '}' in /home/futeptco/public_html/wp-content/themes/freshnews/functions.php on line 18
:(
Damn...I forgot to add the opening and closing tags.
<?php
// Widget: Meta; to match the Sandbox style and replace Widget plugin default
function widget_sandbox_meta($args) {
extract($args);
$options = get_option('widget_meta');
$title = empty($options['title']) ? __( 'Meta', 'sandbox' ) : $options['title'];
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?>
<ul>
<?php wp_register() ?>
<li><?php wp_loginout() ?></li>
<?php wp_meta() ?>
</ul>
<?php echo $after_widget; ?>
<?php
}
// Widgets plugin: intializes the plugin after the widgets above have passed snuff
function sandbox_widgets_init() {
// Sandbox Meta widget
$widget_ops = array(
'classname' => 'widget_meta',
'description' => __( "Log in/out and administration links (Sandbox)", "sandbox" )
);
wp_register_sidebar_widget( 'meta', __( 'Meta', 'sandbox' ), 'widget_sandbox_meta', $widget_ops );
unregister_widget_control('meta');
wp_register_widget_control( 'meta', __('Meta'), 'wp_widget_meta_control' );
}
// Runs our code at the end to check that everything needed has loaded
add_action( 'init', 'sandbox_widgets_init' );
?>This topic has been closed to new replies.