Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Home Link in Pages Widget (http://forum.bytesforall.com/showthread.php?t=2431)

alecf Jul 14, 2009 08:40 AM

Home Link in Pages Widget
 
Hi,

I'm sure it's something simple, I have added the pages widget to my left sidebar. I would like a link to appear there for the home page of the blog. Wordpress is installed in the root of my webserver so this should just be a link to my main url or index.php.

How do I do this?:confused:

Flynn Jul 14, 2009 07:45 PM

The default Pages widget doesn't link to the homepage. You'd either have to use another improved Pages widget from http://wordpress.org/extend/plugin or install the PHP code widget and place it in the sidebar, give it a title and inside the widget put

PHP Code:

<ul>
<li class="page_item<?php if ( is_front_page() ) { echo ' current_page_item'; } ?>">
<a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></li>
<?php wp_list_pages('title_li='); ?>
</ul>




All times are GMT -6. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.