Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
csammis
Aug 26, 2003

Mental Institution

Kitsch Ersatz posted:


Why didn't you save the database?

Adbot
ADBOT LOVES YOU

csammis
Aug 26, 2003

Mental Institution
I'm on Wordpress 2.8.6 and I'm playing around with modifying a WP theme. I'm having some trouble with wp_list_pages in header.php to create a navigation menu listing only pages with a certain custom value, so:

code:
$navpages =
  wp_list_pages('echo=0&orderby=name&title_li=&meta_key=book_author&meta_value=butts');
but this is returning every page, regardless of its book_author value. The codex says meta_key/meta_value is supported in this call, should I be using a different method?

csammis
Aug 26, 2003

Mental Institution
I'm working on a WP site which uses page templates to replace all of the simple user account registration and post administration. When the site goes live, I won't want any users who don't have the Administrator role to be able to log in at the /wp-admin/ area...but I'm not wild on the idea of changing the core files in order to suit the purpose. Is there a way to write a plugin that can hook the admin login functions to filter out non-admins? Any resources on the subject would be much appreciated.

csammis
Aug 26, 2003

Mental Institution
I followed the directions to Give Wordpress its own directory but now the site_url() function is returning paths relative to the subdirectory in which I installed WP instead of the root of my site.

As an example, let's say WP is installed in http://myblog.com/blog/ and I have the site configured so that WP displays at http://myblog.com. When I call site_url('/blah.php'), it gives me http://myblog.com/blog/blah.php instead of http://myblog.com/blah.php

What do I need to call instead of site_url to get the correct URL?

csammis
Aug 26, 2003

Mental Institution

Ned posted:

Also check your general settings. You usually define the blog path there.

True...the blog path is defined correctly according to the directions I linked above. site_url still returns the Wordpress path, not the blog path.

Twiin, I'll try your suggestion this weekend. Thanks!

Adbot
ADBOT LOVES YOU

csammis
Aug 26, 2003

Mental Institution

Twiin posted:

Try get_bloginfo('siteurl') instead of siteurl().

This worked, thanks :)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply