aslee
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Displaying Links with CatagoriesIf I remember right,
get_links()
is deprecated since Version 2.1, so let’s usewp_list_bookmarks()
instead.Try this:
<?php wp_list_bookmarks('categorize=1&before=<li>&after=</li>&show_images=0&show_description=0&orderby=name'); ?>
I think it does everything you’re looking for in that code. Take a look at the wp_list_bookmarks Codex page if you need further customization.
Forum: Fixing WordPress
In reply to: Comments.php not recognizing login properly after upgradeI’m still not sure why this fails on the default theme and such, but I did work a hack up to get around it. In comments.php there is a piece of code that looks something like this:
< ?php if ( $user_ID ) : ?> <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"> < ?php echo $user_identity; ?></a>. <br /> <a href="<?php echo get_option(’siteurl’); ?>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p> < ?php else : ?>
I changed it to look like this instead:
< ?php if ( $user_ID ) : ?> < ?php global $user_email; global $user_url; get_currentuserinfo(); ?> <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"> < ?php echo $user_identity; ?></a>. <br /> <a href="<?php echo get_option(’siteurl’); ?>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p> <input type="hidden" name="author" id="author" value="<?php echo $user_identity; ?/>" /> <input type="hidden" name="email" id="email" value="<?php echo $user_email; ?/>" /> <input type="hidden" name="url" id="url" value="<?php echo $user_url; ?/>" /> < ?php else : ?>
Note the
< ?php global $user_email; global $user_url; get_currentuserinfo(); ?>
along with theinput type="hidden"
fields. It initializes $user_url and $user_email so that you can reference them.I don’t think author/email/url will need changing to fit themes, but I could be wrong.
Forum: Fixing WordPress
In reply to: Hosting Question – MacI do the reverse a lot of the time – I host on a PowerMac but I do a lot of fiddling-around on a Linux box. I copy the WordPress install back and forth without any trouble.
You <i>might</i> have to make a tiny change to your wp-config.php, as per the Warker instructions (step 13). More than likely, you changed it for MAMP and have to change it back now.
I’m not 100% familiar with how hard they stack the boxes at Hostgator, but a shared plan is probably enough for the immediate future, and then some. I’m sure they’ll be more than happy to help you with migration if you grow big enough to need a dedicated box.
Forum: Fixing WordPress
In reply to: How do I transfer previous blog posts to new domain?Log into your old blog as Admin. Go to Manage>Export and download the export file.
Then, consulting the Codex page for safety, log into your new blog (also as Admin). Go to Manage>Import and upload the export file and follow the import directions. =)Forum: Themes and Templates
In reply to: wp_list_bookmarks() – alphabetical random?This is very true. =D I thought I could work from a general solution to the specific one, but my SQL-fu is weak. I think having both in one place will be good for future reference, though.
That works beautifully!
Thanks again!Forum: Themes and Templates
In reply to: can’t edit side bar in themechmod the file to be group and world writable (666).
Forum: Themes and Templates
In reply to: Can’t edit Blogroll like I wantOK, so I downloaded Purpling and took it apart for you.
in rsidebar.php, there’s a set of lines that looks like this:
<?php get_links($link_cat->cat_id, '<li>', '</li>', '<br />', FALSE, 'id', TRUE, TRUE, -1, TRUE); ?>
If you look at the Codex page for get_links you can see what this means, and change it to your heart’s content.
If you’re happy with it otherwise, you find out that the second TRUE after ‘id’ determines whether your ratings will show up (try editing one of the links’ rating to 9, and you’ll see it change to 9). You want it to go away, so change it to look like so:
<?php get_links($link_cat->cat_id, '<li>', '</li>', '<br />', FALSE, 'id', TRUE, FALSE, -1, TRUE); ?>
You could also change ‘id’ to ‘name’ to alphabetize your links, if you’d like.
Forum: Themes and Templates
In reply to: Can’t edit Blogroll like I wantThe call to wp_list_bookmarks in the PHP file probably has show_rating=1. I’m not familiar with Purpling, but it’s probably rightsidebar.php or something similar.
If you set show_rating=0, it should go away.
Forum: Themes and Templates
In reply to: wp_list_bookmarks() – alphabetical random?That’s very helpful, thank you!
However, I can’t figure out how to pull from one specific link category in that case. I tried changing the SQL query to “SELECT link_id FROM $wpdb->links where link_category=something ORDER BY RAND() LIMIT 5″, which seems intuitive (looking at the SQL structure, but on further inspection all of my links have the link_category=0, even though they belong to separate categories in WordPress.
Going into mySQL and doing “SELECT * FROM wp_links” I’m afraid I don’t see any other easy way to distinguish them.
Am I missing something obvious?
Thanks!