WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pb with the display of the blogroll (12 posts)

  1. Mat_
    Member
    Posted 7 years ago #

    Hi all !!

    I would like to change the display of the blogroll but i don't find the file.
    In my source code, i find this:
    <li id="linkcat-2" class="linkcat"><h3>Blogoliste</h3>

    I was first thinking that it was the bookmark-template.php but in the code source:

    echo ' <li id="linkcat-' . $cat->cat_ID . '" class="linkcat"><h2>' . $cat->cat_name . "</h2>\n\t

      \n";

      so a h2 and not a h3 ...

      Where can i change it please ??

      Thx a lot

  2. drmike
    Member
    Posted 7 years ago #

    Open up your theme's sidebar.php file and look for the function that outputs your blogroll.

    When you find it, take a look at Template_Tags for the function as I believe they're all editable.

    Hope this helps,
    -drmike

  3. Mat_
    Member
    Posted 7 years ago #

    I already tried to search for the called funtion but i didn't find it.Maybe it's because i'm using a K2 theme which is using widgets ?
    For this, i'm using Sidebard Widget were files can be found here:
    http://svn.wp-plugins.org/widgets/trunk/

    I found this:

    function widget_links($args) {
    global $wp_db_version;
    extract($args);

    if ( $wp_db_version < 3582 ) {
    // This ONLY works with li/h2 sidebars.
    get_links_list();
    } else {
    wp_list_bookmarks(array('title_before'=>$before_title, 'title_after'=>$after_title));
    }
    }

    in the widgets.php, i have to modify it ?

    Thx a lot drmike!

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    What is the content of your theme's functions.php file?

  5. Mat_
    Member
    Posted 7 years ago #

    Thx for your response

    <?php
    /*
    Filename: 		functions.php
    Date: 			06-06-25
    Copyright: 		2006, Glued Ideas
    Author: 		Christopher Frazier (cfrazier@gluedideas.com)
    Description: 	Multi-Author Template for WordPress (Subtle)
    Requires:
    */
    
    load_theme_textdomain('gluedideas_subtle');
    
    class themeGluedIdeas_Subtle {
    
    	function addOptions () {
    
    		if (isset($_POST['gi_subtle_reset'])) { themeGluedIdeas_Subtle::initOptions(true); }
    
    		if (isset($_POST['gi_subtle_save'])) {
    
    			$aOptions = themeGluedIdeas_Subtle::initOptions(false);
    
    			$aOptions['errors'] = array();
    
    			$aOptions['style'] = $_POST['gi_subtle_style'];
    			$aOptions['description'] = stripslashes($_POST['gi_subtle_description']);
    			$aOptions['lead_count'] = $_POST['gi_subtle_lead_count'];
    			$aOptions['lead_cats'] = $_POST['gi_subtle_lead_cats'];
    			$aOptions['feedburner'] = $_POST['gi_subtle_feedburner'];
    			$aOptions['feedburner_id'] = $_POST['gi_subtle_feedburner_id'];
    
    			if ($_POST['gi_subtle_show_archives'] == 'true') {
    				$aOptions['show_archives'] = true;
    			} else {
    				$aOptions['show_archives'] = false;
    			}
    
    			if ($_POST['gi_subtle_show_metalinks'] == 'true') {
    				$aOptions['show_metalinks'] = true;
    			} else {
    				$aOptions['show_metalinks'] = false;
    			}
    
    			$aOptions['archives_cat'] = $_POST['gi_subtle_archives_cat'];
    
    			if ($_POST['gi_subtle_show_subpages'] == 'true') {
    				$aOptions['show_subpages'] = true;
    			} else {
    				$aOptions['show_subpages'] = false;
    			}
    
    			if ($_POST['gi_subtle_show_feedflare'] == 'true') {
    				$aOptions['show_feedflare'] = true;
    			} else {
    				$aOptions['show_feedflare'] = false;
    			}
    
    			if ($_POST['gi_subtle_show_gravatar'] == 'true') {
    				$aOptions['show_gravatar'] = true;
    			} else {
    				$aOptions['show_gravatar'] = false;
    			}
    
    			$aOptions['gravatar_rating'] = $_POST['gi_subtle_gravatar_rating'];
    			$aOptions['gravatar_default'] = $_POST['gi_subtle_gravatar_default'];
    
    			// Handle header creation if a valid JPG was sent
    			$sStyleFolder = get_theme_root() . '/' . get_template() . '/styles/' . $aOptions['style'] . '/';
    
    			if (is_uploaded_file($_FILES['gi_subtle_header']['tmp_name']) || $_POST['gi_subtle_reset_header'] == 'true') {
    				if (file_exists($sStyleFolder . 'generator.php')) {
    					include_once($sStyleFolder . 'generator.php');
    					$aOptions['errors'] = generateHeader($sStyleFolder, $_POST['gi_subtle_reset_header']);
    				} else {
    					$aOptions['errors'][] = __('This theme style does not support uploadable headers', 'gluedideas_subtle');
    				}
    			}
    
    			update_option('gi_subtle_theme', $aOptions);
    
    		}
    
    		add_theme_page("Glued Ideas 'Subtle' Theme Options", "Current Theme Options", 'edit_themes', basename(__FILE__), array('themeGluedIdeas_Subtle', 'displayOptions'));
    	}
    
    	function initOptions ($bReset) {
    		$aOptions = get_option('gi_subtle_theme');
    		if (!is_array($aOptions) || $bReset) {
    			$aOptions['style'] = 'default';
    			$aOptions['description'] = '<h2>Welcome to ' . get_bloginfo('name') . '</h2><p>Thank you for taking the time to visit my blog!  Take a second to peek around and check out some of my previous posts.  Of course, I would love to find out what you think as well, so make sure to comment.  See you around!</p><ul class="links"><li class="icon information"><a href="/?page_id=2"><span>Find out more...</span></a></li></ul>';
    			$aOptions['lead_count'] = 1;
    			$aOptions['lead_cats'] = '';
    			$aOptions['feedburner'] = '';
    			$aOptions['feedburner_id'] = '';
    			$aOptions['show_archives'] = false;
    			$aOptions['archives_cat'] = 'Uncategorized';
    			$aOptions['show_subpages'] = false;
    			$aOptions['show_feedflare'] = false;
    			update_option('gi_subtle_theme', $aOptions);
    		}
    		return $aOptions;
    	}
    
    	function displayOptions () {
    		$aOptions = themeGluedIdeas_Subtle::initOptions(false);
    
    		// Get the styles folder listing
    		$sStyleFolder = TEMPLATEPATH . '/styles/';
    		$aStyleFolder = array();
    		$objStyleFolder = dir($sStyleFolder);
    		while (false !== ($sFile = $objStyleFolder->read())) {
    			 if (is_dir($sStyleFolder . $sFile) && $sFile != '.' &&  $sFile != '..') {
    			 	$aStyleFolder[] = $sFile;
    			 }
    		}
    		$objStyleFolder->close();
    
    ?>
    <div class="wrap">
    	<h2>Glued Ideas Themes - Subtle</h2>
    	<p><?php _e('Based on a joke my brother-in-law made, Subtle is the first public theme released by Glued Ideas.  Designed for sites that have multiple authors, Subtle also makes use of WordPress Widgets, making customization a snap.  For more information about this and other themes from Glued Ideas, <a href="http://blog.gluedideas.com">visit us at our blog</a>.', 'gluedideas_subtle'); ?></p>
    <?php
    	if (count($aOptions['errors']) > 0) {
    		echo ('<div class="error"><p>' . __('The following errors occured when saving your options:', 'gluedideas_subtle') . '</p><ul>');
    		foreach($aOptions['errors'] as $sError) {
    			echo ('<li>' . $sError . '</li>');
    		}
    		echo ('</ul></div>');
    		$aOptions['errors'] = array();
    		update_option('gi_subtle_theme', $aOptions);
    	}
    ?>
    	<form action="#" method="post" enctype="multipart/form-data" name="gi_subtle_form" id="gi_subtle_form">
    		<fieldset name="general_options" class="options">
    			<legend><?php _e('Theme Specific Options', 'gluedideas_subtle'); ?></legend>
    			<table width="100%" cellspacing="2" cellpadding="5" class="editform">
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Theme Style', 'gluedideas_subtle'); ?></th>
    					<td><select name="gi_subtle_style" size="1">
    <?php
    		if (is_array($aStyleFolder)) {
    			foreach ($aStyleFolder as $sStyle) {
    				if ($sStyle == $aOptions['style']) {
    					$sSelected = ' selected ';
    				} else {
    					$sSelected = '';
    				}
    				echo '<option value="' . $sStyle . '"' . $sSelected . '>' . $sStyle . '</option>' . "\n";
    			}
    		} else {
    			echo '<option value="0">' . __('Please install a valid style in the /styles/ folder.', 'gluedideas_subtle') . '</option>';
    		}
    ?>
    					</select>
    					<br /><?php _e('Select a style for this theme.  Find more styles at our <a href="http://blog.gluedideas.com/">development blog</a>.', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Upload Header', 'gluedideas_subtle'); ?></th>
    					<td><input name="gi_subtle_header" id="gi_subtle_header" type="file" size="50" />
    					<br /><?php _e('Select an image from your computer to use as your header image.<br />Note: File dimensions should be 820 x 145 pixels.', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Reset Header', 'gluedideas_subtle'); ?></th>
    					<td><input name="gi_subtle_reset_header" type="checkbox" value="true" /><?php _e('Reset the Default style\'s header.', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Show Metalinks', 'gluedideas_subtle'); ?></th>
    					<td><?php if ($aOptions['show_metalinks'] == true) { echo ('<input name="gi_subtle_show_metalinks" type="checkbox" value="true" checked>'); } else { echo ('<input name="gi_subtle_show_metalinks" type="checkbox" value="true">'); } ?> <?php _e('Show Comment Number and Technorati / Digg / Delicious links with posts.', 'gluedideas_subtle'); ?></td>
    				</tr>
    
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Show Sub-Pages', 'gluedideas_subtle'); ?></th>
    					<td><?php if ($aOptions['show_subpages'] == true) { echo ('<input name="gi_subtle_show_subpages" type="checkbox" value="true" checked>'); } else { echo ('<input name="gi_subtle_show_subpages" type="checkbox" value="true">'); } ?> <?php _e('Show sub-pages when viewing a page.', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Site Description', 'gluedideas_subtle'); ?></th>
    					<td><textarea name="gi_subtle_description" cols="50" rows="10" id="gi_subtle_description"><?php echo($aOptions['description']); ?></textarea><br /><?php _e('If a description for the site is given here, it will be displayed as a prominent information box on the home page.', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Number of Leads', 'gluedideas_subtle'); ?></th>
    					<td><input name="gi_subtle_lead_count" type="text" id="gi_subtle_lead_count" value="<?php echo($aOptions['lead_count']); ?>" size="2" />
    					<br /><?php _e('The number of posts on the home page to be shown as "lead stories" - these will display with their full-text (up to the "more" tag).', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Categories to Display', 'gluedideas_subtle'); ?></th>
    					<td><input name="gi_subtle_lead_cats" type="text" id="gi_subtle_lead_cats" value="<?php echo($aOptions['lead_cats']); ?>" size="50" />
    					<br /><?php _e('Display only the categories you want to display in your front-page loop.  Just provide a comma-separated list of category slugs you\'d like to use.', 'gluedideas_subtle'); ?></td>
    				</tr>
    			</table>
    		</fieldset>
    
    		<?php if (function_exists('gravatar')) : ?>
    
    		<fieldset name="gravatar_options" class="options">
    			<legend><?php _e('Gravatar Options', 'gluedideas_subtle'); ?></legend>
    			<p><?php _e('Allow your readers to show off their personalities in comments through <a href="http://gravatar.com">Gravatars</a>.', 'gluedideas_subtle'); ?></p>
    			<table width="100%" cellspacing="2" cellpadding="5" class="editform">
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Show Gravatars', 'gluedideas_subtle'); ?></th>
    					<td><?php if ($aOptions['show_gravatar'] == true) { echo ('<input name="gi_subtle_show_gravatar" type="checkbox" value="true" checked>'); } else { echo ('<input name="gi_subtle_show_gravatar" type="checkbox" value="true">'); } ?> <?php _e('Show gravatars on comments (replaces comment number).', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Default Gravatar URL', 'gluedideas_subtle'); ?></th>
    					<td><input name="gi_subtle_gravatar_default" type="text" id="gi_subtle_gravatar_default" value="<?php echo($aOptions['gravatar_default']); ?>" size="50" /><br /><?php _e('Provide a URL to the default image used when a user doesn\'t have a gravatar.', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Gravatar Rating', 'gluedideas_subtle'); ?></th>
    					<td><input name="gi_subtle_gravatar_rating" type="text" id="gi_subtle_gravatar_rating" value="<?php echo($aOptions['gravatar_rating']); ?>" size="50" /><br /><?php _e('Is your site PG rated?  Check out the Gravatar site for more information.', 'gluedideas_subtle'); ?></td>
    				</tr>
    			</table>
    		</fieldset>
    
    		<?php endif; ?>
    
    		<fieldset name="feedburner_options" class="options">
    			<legend><?php _e('Feedburner Options', 'gluedideas_subtle'); ?></legend>
    			<p><?php _e('Make reading your RSS feeds easier for your audience by signing up with <a href="http://www.feedburner.com">FeedBurner</a>.', 'gluedideas_subtle'); ?></p>
    			<table width="100%" cellspacing="2" cellpadding="5" class="editform">
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('E-mail Subscription (Feed ID)', 'gluedideas_subtle'); ?></th>
    					<td><input name="gi_subtle_feedburner_id" type="text" id="gi_subtle_feedburner_id" value="<?php echo($aOptions['feedburner_id']); ?>" size="50" /><br /><?php _e('If you have enabled e-mail subscriptions, type the numeric ID for your feed.  You can find this by going to "My Feeds" and then clicking on the feed for this blog.  The URL will end with "?id=XXXXXXX" - that number is the Feed ID.', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Feedburner Link', 'gluedideas_subtle'); ?></th>
    					<td><input name="gi_subtle_feedburner" type="text" id="gi_subtle_feedburner" value="<?php echo($aOptions['feedburner']); ?>" size="50" /><br /><?php _e('The URL that people go to for this feed.', 'gluedideas_subtle'); ?></td>
    				</tr>
    				<tr valign="top">
    					<th width="33%" scope="row"><?php _e('Show Feedflare', 'gluedideas_subtle'); ?></th>
    					<td><?php if ($aOptions['show_feedflare'] == true) { echo ('<input name="gi_subtle_show_feedflare" type="checkbox" value="true" checked>'); } else { echo ('<input name="gi_subtle_show_feedflare" type="checkbox" value="true">'); } ?> <?php _e('Show FeedFlare on my posts.', 'gluedideas_subtle'); ?></td>
    				</tr>
    			</table>
    		</fieldset>
    
    		<p class="submit"><input type="submit" name="gi_subtle_reset" value="Reset" /></p>
    		<p class="submit"><input type="submit" name="gi_subtle_save" value="Save" /></p>
    	</form>
    </div>
    <?php
    	}
    }
    
    // Register functions
    add_action('admin_menu', array('themeGluedIdeas_Subtle', 'addOptions'));
    
    // Add widget support
    if ( function_exists('register_sidebar') ) {
    
    	register_sidebars(2, array('name' => 'Sidebar_%d', 'before_widget' => '<div id="%1$s" class="widget home %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>') );
    	register_sidebars(3, array('name' => 'Posts_/_Pages_%d', 'before_widget' => '<div id="%1$s" class="widget post %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>') );
    	register_sidebars(2, array('name' => 'Archives_%d', 'before_widget' => '<div id="%1$s" class="archive_group %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>') );
    	register_sidebars(3, array('name' => 'Advert_%d', 'before_widget' => '<div id="%1$s" class="advert %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>') );
    }
    
    ?>
  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Didn't need to see the whole thing, actually. Probably should have said that.

    Anyway, the <h3>'s that bother you are coming from here, as the bottom of your functions.php file:
    register_sidebars(...'before_title' => '<h3>', 'after_title' => '</h3>') );

  7. Mat_
    Member
    Posted 7 years ago #

    But how can i display this blogroll as the other list in the sidebar ?

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Huh? What are you talking about?

    If you want to change those H3's to H2's, then change them there in functions.php.

    If you want to make some other kind of change, then you have to tell us what change it is that you want to make before we can tell you how to do it.

  9. Mat_
    Member
    Posted 7 years ago #

    No no, i was looking for the file to edit, so i focused on the h3 .. sorry, i'm french so it's hard to explain correctly what i want.
    Actually it's displayed like that:

    <li id="linkcat-2" class="linkcat"><h3>Blogoliste</h3>
    	<ul>
    <li><a href="http://" title="site1">Site1</a></li>
    
    	</ul>
    
    </li>
     and i would like to change it to:
    
    <h3>Categories</h3>
    <ul class="icon_jump">
    
    <li><a href="http://" title="Site1">Site 1</a></li>
  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    So you want to get rid of the surrounding LI tags? Okay.

    Go back to the widgets.php file. Change that wp_list_bookmarks() call to look like this:

    wp_list_bookmarks(array(
    'title_before'=>$before_title,
    'title_after'=>$after_title,
    'category_before'=>$before_widget,
    'category_after'=>$after_widget));

    I think that would be correct.

  11. Mat_
    Member
    Posted 7 years ago #

    Oh man, you're my hero !!!
    Seriously ...

    Now just a little thing, how can i change the list display in this blogroll ?
    ( the ul attribute has no class :s )

    Thanks a lot !! really

  12. Mattias Tengblad
    Member
    Posted 7 years ago #

    Maybe i can jump on this topic too ;)

    Got kind of a similar problem. I doesn't get why the blogroll layout is this "out of reach" for the templates. Getting kind of confusing to get it as you like it.

    Well to my problem, I want to get rid of one set of <li> around the blogroll and do not want to display the title "blogroll" as I use images for the headers. How would I do so?

    I'm working with the default theme.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags