WordPress.org

Forums

widget title not showing up in sidebar (5 posts)

  1. texalien
    Member
    Posted 6 years ago #

    I've had this question posted in the Themes and Templates forum for a couple of weeks and haven't gotten any replies, so I thought I'd try it here.

    I'm using WP 2.6.0 and the blog.txt theme. My problem is that the title to the blogroll doesn't show up in my sidebar. The list of links itself is there, but not the title.

    The source code for all the other items on the sidebar, the ones that work correctly, looks like this:

    <li id="archives" class="widget widget_archive"><h3 class='widgettitle'>Archives</h3>
    
          		<ul>
          			<li><a href='http://milindasquestions.com/2008/08/' title='August 2008'>August 2008</a></li>
    
          		</ul>

    whereas the case that doesn't work looks like this:

    <li id="linkcat-14" class="widget widget_links"><h3 class='widgettitle'></h3>
    
          	<ul class='xoxo blogroll'>
          <li><a href="http://www.arbitrarymarks.com/wordpress/">Arbitrary Marks</a></li>

    Can anybody help? Thanks.

  2. xdesi
    Member
    Posted 6 years ago #

    Change
    <li id="linkcat-14" class="widget widget_links"><h3 class='widgettitle'></h3>

    To

    <li id="linkcat-14" class="widget widget_links"><h3 class='widgettitle'>Blogroll</h3>

    You have no text inserted between the heading tags!!

  3. texalien
    Member
    Posted 6 years ago #

    I know there's no text there. When using a template, the sidebar is dynamically generated, which means you can't simply insert text into the page source. You have to locate the script (the widget) that's generating that portion of the sidebar, and figure out why IT'S not inserting the text there. That's what I was asking about: which script generates the blogroll, and how do I alter it?

  4. Darran
    Member
    Posted 6 years ago #

    Based on what's being said, it could be a problem with the theme. It is not widgetized properly. With all I can work with, I can only deduce. Try taking a look at functions.php in the theme, and drill down to the widget code. It would be useful if you posted it here, so we could have a look.

  5. texalien
    Member
    Posted 6 years ago #

    Thanks, Darren. If I understand what's going on in functions.php, then this is the relevant function:

    // Loads, checks that Widgets are loaded and working
    function blogtxt_widgets_init() {
    	if ( !function_exists('register_sidebars') )
    		return;
    
    	$p = array(
    		'before_title' => "<h3 class='widgettitle'>",
    		'after_title' => "</h3>\n",
    	);
    
    	register_sidebars(2, $p);
    
    	// Finished intializing Widgets plugin, now let's load the blog.txt default widgets; first, blog.txt search widget
    	$widget_ops = array(
    		'classname'    =>  'widget_search',
    		'description'  =>  __( "A search form for your blog (blog.txt)", "blogtxt" )
    	);
    	wp_register_sidebar_widget( 'search', __( 'Search', 'blogtxt' ), 'widget_blogtxt_search', $widget_ops );
    	unregister_widget_control('search');
    	wp_register_widget_control( 'search', __( 'Search', 'blogtxt' ), 'widget_blogtxt_search_control' );
    
    	// blog.txt Meta widget
    	$widget_ops = array(
    		'classname'    =>  'widget_meta',
    		'description'  =>  __( "Log in/out and administration links (blog.txt)", "blogtxt" )
    	);
    	wp_register_sidebar_widget( 'meta', __( 'Meta', 'blogtxt' ), 'widget_blogtxt_meta', $widget_ops );
    	unregister_widget_control('meta');
    	wp_register_widget_control( 'meta', __('Meta'), 'wp_widget_meta_control' );
    
    	//blog.txt Home Link widget
    	$widget_ops = array(
    		'classname'    =>  'widget_home_link',
    		'description'  =>  __( "Link to the front page when elsewhere (blog.txt)", "blogtxt" )
    	);
    	wp_register_sidebar_widget( 'home_link', __( 'Home Link', 'blogtxt' ), 'widget_blogtxt_homelink', $widget_ops );
    	wp_register_widget_control( 'home_link', __( 'Home Link', 'blogtxt' ), 'widget_blogtxt_homelink_control' );
    
    	//blog.txt Recent Comments widget
    	$widget_ops = array(
    		'classname'    =>  'widget_blogtxt_recent_comments',
    		'description'  =>  __( "Semantic recent comments (blog.txt)", "blogtxt" )
    	);
    	wp_register_sidebar_widget( 'blogtxt-recent-comments', __( 'Recent Comments', 'blogtxt' ), 'widget_blogtxt_recent_comments', $widget_ops );
    	wp_register_widget_control( 'blogtxt-recent-comments', __( 'Recent Comments', 'blogtxt' ), 'widget_blogtxt_recent_comments_control' );
    
    	//blog.txt RSS Links widget
    	$widget_ops = array(
    		'classname'    =>  'widget_rss_links',
    		'description'  =>  __( "RSS links for both posts and comments (blog.txt)", "blogtxt" )
    	);
    	wp_register_sidebar_widget( 'rss_links', __( 'RSS Links', 'blogtxt' ), 'widget_blogtxt_rsslinks', $widget_ops );
    	wp_register_widget_control( 'rss_links', __( 'RSS Links', 'blogtxt' ), 'widget_blogtxt_rsslinks_control' );
    }

    Just for the record, here are the headers for all of the functions that have anything to do with widgets, but none of them look like they pertain to the blogroll:

    // Loads a blog.txt-style Search widget
    function widget_blogtxt_search($args) {
    
    // Widget: Search; element controls for customizing text within Widget plugin
    function widget_blogtxt_search_control() {
    
    // Loads a blog.txt-style Meta widget
    function widget_blogtxt_meta($args) {
    
    function widget_blogtxt_homelink($args) {
    
    // Loads the control functions for the Home Link, allowing control of its text
    function widget_blogtxt_homelink_control() {
    
    // Loads blog.txt-style RSS Links (separate from Meta) widget
    function widget_blogtxt_rsslinks($args) {
    
    // Loads the control functions for the RSS Links, allowing control of its text
    function widget_blogtxt_rsslinks_control() {
    
    // Loads a recent comments widget just like the default blog.txt one
    function widget_blogtxt_recent_comments($args) {
    
    // Allows control over the text for the blog.txt recent comments widget
    function widget_blogtxt_recent_comments_control() {

Topic Closed

This topic has been closed to new replies.

About this Topic