Link to home
Start Free TrialLog in
Avatar of digital1stein
digital1steinFlag for Belgium

asked on

how to change widget items in Wordpress

In a Wordpress site I'm trying to change the list of portfolio items shown in the sidebar.

More specifically I'm trying to:
- add a hyperlink to the portfolio thumbnails
- remove the date
- filter the portfolio items so that I can make a distinction between portfolio and blog items

Surely this most be configurable somewhere, but I don't know where to look.
Any suggestions?
sidebar-widget.php.jpg
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of digital1stein

ASKER

Thanks for the quick reply.

I don't think it's a plain text widget (see screenshot).
 User generated image
I can edit the code of the sidebar-portfolio.php file that is responsible for showing the widget (attached).
But I don't see the code that is effectively responsible for showing the individual items.
<?php

/* ------------------------------------------------------------------------------------------------------------

	Sidebar template - Portfolio
	
------------------------------------------------------------------------------------------------------------ */

?>

	<?php global $domain; /* The unique string used for translation */ ?>

	<?php 
		
		/* Reset to the default query */
		wp_reset_query();
		
		/* Get the custom fields values */
		$post_custom = get_post_custom($post->ID);

	
		/* Get special sidebar if it exists */
		if(isset($post_custom['jw_sidebar'][0])){ $sidebar_name = $post_custom['jw_sidebar'][0]; }else{ $sidebar_name = 'Portfolio Widgets'; }

		
	?>
	
	<div id="column" <?php if(isset($post_custom['jw_layout'][0]) && $post_custom['jw_layout'][0] == 'layout_sc'){ ?>class="left-column"<?php } /* If sidebar + content layout get the left sidebar */ ?>>
		
		<?php 
if (function_exists('dynamic_sidebar') && dynamic_sidebar($sidebar_name)):else:

?>
			
			<!-- No widgets START -->
			
			<h4><?php _e('No Widgets Added Yet', $domain); ?></h4>
			<p><em><?php _e('Please add them in the WordPress admin page under Appearance &rarr; Widgets. The widget section is', $domain); echo ' "'.$sidebar_name.'".'; ?></em></p>
			
			<!-- No widgets END -->
			
		<?php endif; ?>

	</div><!-- #column -->

Open in new window


So my guess is I should be looking elsewhere.
Right, that code appears to set the JW widgets list for Appearance | Widgets.  Is this a plugin or a theme?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

Sorry for responding so late; I was out for more than a week.

Jason1178, I have a separate theme. Don't think it's a plugin (attached you'll find a screenshot of my plugins page).

Gwkg, I watched the widget.recent-posts.php file (attached), but I couldn't find where to add a link to the thumbs.

Any other suggestions?
plugins.jpg
widget.recent-posts.php
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I found the solution myself meanwhile, but appreciated the help of the other EE members.