adsworth
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Permalinks and “Pages”Have you made sure that the .htaccess has been rewritten. WordPress creates one rewrite rule for each page. Try going to WPAdmin/Options/Permalinks and click on “Update Permalink Structure”.
Regards
AdiForum: Fixing WordPress
In reply to: How to list the current page’s children?Hi,
since I had some time on hand and some people wanted this I went ahead and implemented my understanding of this problem as a plugin for WordPress 1.5.
Get it here https://www.adsworth.info/wp-pagesnavRegards
AdiForum: Fixing WordPress
In reply to: How to list the current page’s children?Hi ayb1,
The page is on my laptop and it went into suspend mode over night.
That with the children is true. For that you would need to roll your own wp_list_pages or whatever you want to call it. The function get_pages() will give you all the pages in the DB, no need to do your own selects. It’ll return an array, each entry in the array is an object with the following properties. ID, post_title, time_modified, time_created and post_parent.
So you should have all the info to build your own nav.
I’d have a go but I’m totally under with work till mid next week.Regards
adsworthForum: Fixing WordPress
In reply to: How to list the current page’s children?Hi ayb1,
this is the best I can do with standard WP functions
https://stegen.dyndns.info:666/apps/wordpress/see the box labeled “for ayb1” it is empty when on the homepage
but as soon as you navigate to one of the pages it’ll show the direct subpages, of that page. But not the parent pages aswell.
This is the code, I added to sidebar.php:
<?php
if($wp_query->is_page && !is_home()) {
$lp_param = "";
$lp_param = "title_li=&depth=1&child_of=" .
$wp_query->get_queried_object_id();
wp_list_pages($lp_param);
}
?>
Regards
AdiForum: Fixing WordPress
In reply to: How to list the current page’s children?Hi,
add this just after the main horizontal menu:
if($wp_query->is_page && !is_home()) {
$lp_param = "";
$lp_param = "depth=1&child_of=" .
$wp_query->get_queried_object_id();
wp_list_pages($lp_param);
}
it will only display the direct childern of the page you are currently viewing.
What won’t work with this, is a third bar if you are viewing a grandchild of a main parent page.That’s the best I can do, off the top of my head.
The only other idea I have is call get_pages() which returns
all pages titles plus ID and parent ID as an array and then
build the nav yourself.Regards
adsworthForum: Everything else WordPress
In reply to: Problem after Upgrading PHPHi Riddler,
as far as I know under FreeBSD the php.ini is in /usr/local/etc somewhere and the extension is extension=php_mysql.so.
Regards
adsworthForum: Fixing WordPress
In reply to: How to list the current page’s children?If you can’t call the_post() earlier you might also try this:
$lp_param = “”;
if($wp_query->is_page) {
$lp_param = “child_of=” . $wp_query->get_queried_object_id();
}
wp_list_pages($lp_param);this should show children of the current page and all pages otherwise.
there isn’t a has_children functionality as far as I know.
Regards
AdiForum: Fixing WordPress
In reply to: How to list the current page’s children?Hi,
OK, I know what’s happening….
The call to the_ID() only works after the call to the_post().
In other words you can only use the_ID() after you have loaded the page/post content with the_post().I hope that info helps.
Regards
AdiForum: Fixing WordPress
In reply to: How to list the current page’s children?Hi,
then rewrite try this:
$page_id = the_ID();
wp_list_pages(“child_of=” . $page_id);regards
adiForum: Fixing WordPress
In reply to: How to list the current page’s children?Hi,
wp_list_pages has a child_of parameter.
So calling it like this should work:
$page_id = the_ID();
wp_list_pages(“child_of=$page_id”);Regards
AdiForum: Fixing WordPress
In reply to: Astounding performance hit with large number of rows in wp_usersHi Alphaoide,
try adding an index to the wp_users table and user_level column.
i.e. ALTER TABLEwp_users
ADD INDEX (user_level
)
there is no index on that column so MySQL has todo a complete talbe scan which takes awhile. ??Regards
adsworthForum: Fixing WordPress
In reply to: Continued PermaLink ProblemHi,
what version of apache are you running.
I have found one version (2.0.51 I think) where I have problems with mod_rewrite. The problem arises when you have a rule that expects two variables one of which isn’t set, in that case it silently fails todo the rewrite.
i.e.
^/(.+)/?(.+)/?$ index.php?page_name=$1&feed=$2
(that rule is untested, just to explain the problem)
now if I just call /post-slug then the second parameter isn’t filled and the rewrite doesn’t happen. I need to add a new rewrite rule just before this one without the second parameter so it catches the request and processes it OK.I hope that gives you an idea and somewhere to start.
Regards
adsworthForum: Plugins
In reply to: Stattraq & CommentsHi,
the only reference to the comments is currently on the summary page and it only tells you how many comments there are in your blog.
What specific information about the comments would you expect to see?Regards
adsworthForum: Plugins
In reply to: StatTraq and 1.5alpha patchHi all,
I found a couple more problems with StatTraq when using it with 1.5alpha. Here is a new download with more info and downloads: https://www.adsworth.info/more-stattraq-patches
Regards
adsworthForum: Fixing WordPress
In reply to: Instructions for creating static php page using 1.5Hi,
now that’s a neat trick. ??
I presume the snarfer.php file belongs in the theme directory?Regards
adsworth