jackiefg
Member
Posted 5 years ago #
Could you tell us how we'd use the code? For example, would we create a new .php page with that code in it and then do an include page_navigation.php somewhere in our index... and if so, would it be included at the top of the page, in the loop, etc.
I know everybody's not as stupid as I am about php, but I'm sure there are some who would like to know (me included).
You can paste it into one of the existing php files, or put it in it's own php file (wrapped with the < ? p h p ... ? > stylings, without spaces... ;) ). Then inside the loop add a callout to page_navigation, like any of the other php calls/'tags' in the template.
If you need a full example, let me know. ;)
d
You can create a my-hacks.php file, don't forget the <?php, and the ending ?> tags. Go to admin, and set your general options to allow hacks. and then call his function.
page_navigation($before='', $after='', $prelabel='« ', $nxtlabel=' »')
Anonymous
Unregistered
Posted 5 years ago #
sorry, i didn include a tutorial on how to install because I dun really know how my hacks work. I just put it in my template-functions.
wp-vbnavi.php ( Demo | Download)
Renamed the file on my server.
GamerZ.. i installed your hack without success in the 1.1b (02-24's version), and i have no reasult... not sure if it's my installation or the version, can you head up a light on it ?! instructions ?!... i read the code but not able to find the problem.
It needs to be outside "the loop" I think....at least that is where I have mine. I'm using the latest and greatest CVS code and just implemented this hack. Works great!
nexia: you need to make sure your "what_to_show" under options > Other Options are set to post_paged.
AHHHH .. .this is not written in the "docs" .. ;)
now it's working great...
hey nexia, sorry about that, I didn't really write an instructions for it, maybe i shall do it soon. =D
PeterBlue
Member
Posted 5 years ago #
Working great! GamerZ, thank you!!!!! :)
Anonymous
Unregistered
Posted 5 years ago #
After tries & errors I finally got it to work.
Thanks.
Anonymous
Unregistered
Posted 5 years ago #
If anyone needs help please let me know or have a look http://www.forceforge.com .
xtool, what error you have?
Anonymous
Unregistered
Posted 5 years ago #
The variable for siteurl has changed in the 3/8/04 nightly.
it was: $siteurl
now: get_settings('siteurl')
this hack doent work now.
Does anyone have a fix?
thanks
Yes is there a fix?
It's not working right. I am using WP 1.2 alpha. If I click "Last" or any pages, it will redirect me to my site's root directory. Any idea?
Please have a look at it: http://www.forceforge.com
Thanks in advance.
Thanks GamerZ! You're da Man!
...but can you tell us what was the problem and the fixes so that way we... I can learn.
Thanks again.
i just fix using get_settings() instead of $variable to form the URL =D
Anonymous
Unregistered
Posted 5 years ago #
Anonymous
Unregistered
Posted 5 years ago #
This doesn't seem to work with the latest nightly build. :(
I don't get this to work.
I have <?php wp_get_archives('type=postbypost&format=link','limit=5'); ?> in the head of my indexpage, and it litte further down the page <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<? page_navigation()?>
But it doesn't work. What am I doing wrong here? It's supposted to be for my category pages.
:) :) You can't find it because i'm still testing etc. (coming from MT).
But you can see the testversion here: http://www.spoenk.nl/weblog/index.php
I got it working now (I totally forgot about the post_paged option), and had to change all the get_settings('siteurl') in get_settings('home') because I keep my wordpressfiles and weblog in parallel folders.
But thanks for your willingness to help :)
Yes, I actualy did find it earlier - before you lost your css :-("Now where did I put that dang thing?")
I didn't loose my css :). Because I keep my weblog and wordpressfiles in seperate/parallel folders, each time before I log out I have to reset my blogURL to the wordpressfolder, otherwise I won't be able to login again. Then, after loging in, each time I have to reset the URL back again to the /weblog folder so that the index.page fetches the wright css.
It's a bug in Wordpress. Blog in root and wp in /wordpress works ok, but not in parallel folders. I reported this already in the beta-discussion section. So each time I'm on line the website looks good, otherwise it looks bad :( I hope this will be fixed soon...
Suggestion/question: Would it be possible (and how...) if the number of posts per page is set to 10, to have a list of the titles of the posts in that particular page (1,2,3 etc.) in a column next to the page with anchored links to each post in the page?
I think this would be a very nice feature. I keep my menu in a short and through css fixed div (except for IE of course), so you can always jump to a previous postition in the page without the need of scrolling and searching for what you just read.
Needless to say I see it all before me with php-eyes wide shut
This hack works for all the posts, so also my monthly pages are set to a maximum of 10 posts now, and I don't want that. So I set the post-paged to 100 for the months to display in total without paging, and in the bulletin-page-navigation.php I used to following lines to force the function to use not 100 but 10 posts per page.
$posts_per_page = 10;
( I put this right after the
global $p, $what_to_show, $request, $posts_per_page, $wpdb;
global $HTTP_SERVER_VARS, $paged;
global $querystring_start, $querystring_equal, $querystring_separator;)
and further on I even manually changed this line
$max_page = ceil($numposts / 10) ;
But it doesn't work. The months show up correctly now, but for the categories I don't see the pagenumbers?
What am I doing wrong here?
(www.spoenk.nl/weblog)
I kept busy and found the answer, aaaaaaaall by my self :)
Not really. I bumped into this post http://wordpress.org/support/index.php?action=vthread&forum=6&topic=2766&page=0 and that did exactly what I was searching for. :)