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)
-   -   [SOLVED] Widgetising a ""Page" Page" - I just simply cannot work it out (http://forum.bytesforall.com/showthread.php?t=2486)

Olivier Jul 17, 2009 05:23 AM

[SOLVED] Widgetising a ""Page" Page" - I just simply cannot work it out
 
Hi everyone,

Wondering if anyone can help me solve this, as after spending literaly hours trying to understand and implement all the advice I am reading, I still cannot figure out what I should be doing... So, here we go:

I would like to add widgets to a ""Page" Page". I do read a lot of blogs, which I would like to share with my visitors; but because of the quantity, I would like to avoid using the sidebars as the display mechanism. Instead, I would like to display the list of blogs, with their respective headlines, which I can get through their respective RSS feeds.

I read the thread: http://forum.bytesforall.com/showthread.php?t=330 which I started to follow.

Went to my functions.php and added:

register_sidebar(array(
'name'=>'RSS Feed Page -> Widgets',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div></div>',
'before_title' => '<div class="widget-title"><h3>',
'after_title' => '</h3></div><div class="widget-content">',
));


before the following line:

}
// Load functions


Then went into my WP widget admin section, and great the new widget area was there.

Next the thread says, I need to add "wherever you want to have that widget area in the template":

<?php if ( is_front_page() ) { ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(5) ) : endif; ?>
<?php } ?>


to enable the following ""page" page": http://www.dombey.com/blog/blogs-i-read/. The conditional being that I only want those widgets displayed on that page... and this is where I am stuck, not even knowing if I am following the right steps...

1 - I cannot find any place in the theme admin area to work on the ""Page" Pages". All I found was dealing with "Post" pages, under the "Post & Pages" area; except the "Edit POST/PAGE INFO ITEMS" area, which refers to ""Page" Pages" but do not seems to allow PHP code inserts.
2 - I cannot find any PHP files in the directory related to ""Page" Page"
3 - So, I have no idea where to add the conditional code, since I cannot find those page type admin area and files
4 - Since I don't know where to go and what to do next, I am not even able to give the right name to the page in the conditional statement if ( is_WHAT_PAGE NAME() )

Anyway, if you have a minute, look at the page I gave above and I am sure that you'll understand what I am trying to do. Currently, it's just HTML inserted for illustration purposes. But that's not what I want for sure... This is a work-in-progress site, so far from being finalised, and definitely not ready for release.

Hope the above made sense... if not and you can help, just ask me questions ;) If you indeed can guide me, please don't be too technical... hehehe!

Many thanks,

Cheers,

Olivier

Flynn Jul 21, 2009 11:29 AM

In the new theme version you can add widget areas with a new function, see "Add new widget areas"

There is no page.php template in Atahualpa but you can create one by copying index.php as page.php

To limit something to a specific static page use

<?php if ( is_page('Page Title') ) { ?>
...
<?php } ?>

Instead of 'Page Title" you can also use the page ID or the page slug, the part of the URL that refers to that particular page: yoursite.com/page-slug/

See http://codex.wordpress.org/Conditional_Tags for more conditional tags

Olivier Jul 23, 2009 06:58 PM

Hi Flynn,

You're a star and/or a genius...! :p Perfect, worked like a dream...

Cheers,

O


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

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