syncbox
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Reverse order the posts in WordPress 2.0I think that the answer is on this page:
http://codex.ww.wp.xz.cn/Template_Tags/query_posts
The wp_query object will generate a new SQL query using your parameters. When you do this, WordPress ignores the other parameters it receives via the URL (such as page number or category). If you want to preserve that information, you can use the variable $query_string in the call to query_posts().
For example, to set the display order of the posts without affecting the rest of the query string, you could place the following before The Loop:
query_posts($query_string . "&order=ASC")
or DESC, depending upon what you want.
HTH
Forum: Fixing WordPress
In reply to: How to get link to call custom (shared) templatenevermind, it may not be elegant, but I’ve found a way to do it. I haven’t been using the generic category.php file for anything on this site, so I’m tapping into that to create my crew blog template… since it won’t find a category specific template (category-x.php) for each crew member’s blog, it works… and lets me create a custom layout for those blogs…
I wish I were better at php and wordpress to figure out how to set up the if/else conditional logic to allow me to do it that way, but I’m not and this works…
thank goodness.
so I can use the first method and it uses the right layout.
yay.
Forum: Fixing WordPress
In reply to: sort order problems WP2.0.2I still don’t know why this was behaving this way, but I managed to find a plugin whose code I could use to get alphabetical asc sorting and ordering…
http://www.mikesmullin.com/2006/05/23/wordpress-plugin-sort-category-posts-by-title/
using the code in the actual category template before the query rather than as a plugin affecting all category posts.
Forum: Fixing WordPress
In reply to: alphabetical postsPer the code in the excellent plugin by Mike Smullin
http://www.mikesmullin.com/2006/05/23/wordpress-plugin-sort-category-posts-by-title/
you can place this before your query and it will sort by post title
<?php add_action(‘pre_get_posts’,’sort_categories_by_title’);
function sort_categories_by_title($x) {
if(is_category()) {
$x->query_vars[‘orderby’] = ‘title’;
$x->query_vars[‘order’] = ‘ASC’;
}
}
?>If you install the plugin, all your category displayed posts will be alphabetical… by putting it just in the category templates where you want that sorting… you can keep the other categories date based.
Seems to work for me.
Forum: Plugins
In reply to: Need Plugin Ideasnext time (digitalfrog) you send someone to a site of yours… please give advanced notice that the imagery may not be for work or public viewing.
I think that is part of the “new rules” post
Forum: Fixing WordPress
In reply to: Where’s the PHP ?When you are seeing “Edit” it typically is a link for YOU (the person logged in). So the code looks something like:
posted by <?php the_author('namefl'); ?> | <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?> <?php edit_post_link(__('Edit This')); ?>
A separate bit of code:
<div class="feedback">
<?php wp_link_pages(); ?>
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
</div>provides the link to edit a post. To change the wording of that, just edit the bits inside ‘Comments (0)’ could become
‘hey, there are no comments yet, care to comment?’
and the others ‘Comments (1)’ which is for a single comment could become ‘only one person has made a comment, want to add to that?’ and finally, the third one, which is for more than one comment, could become ‘here’s what everyone is saying’
You don’t have to use the numbers, those (”, ”, ”) are the arguments for comments_popup_link() You can even put an image into the arguments… with something like this:
<?php comments_popup_link(('add a comment? <img src="/wp-content/themes/yourtheme/images/icon-comment2.png" />'), __('someone said <img src="/wp-content/themes/yourtheme/images/icon-comment2.png" /> '), __('what others are saying <img src="/wp-content/themes/yourtheme/images/icon-comment2.png" /> ', 'comments-link')); ?>
HTH
Forum: Fixing WordPress
In reply to: Current AuthorOK, I have a custom category template that I link to by passing the category and the author id
a href=”/category/crew?author=51″
and I can get posts to show up. But what I also want to do is to dynamically get the author’s profile information (profile, first name, last name, etc) and display it outside of the loop.
How can I do that? I’ve looked at ALL the various links (all day long) and nothing quite comes to what I want, which is to be able to display both profile and posts for a specific author by passing the author_ID via a link. It seems like most of what I have read relates to the current user or finds the current author by login…
Forum: Requests and Feedback
In reply to: Add Custom Fields to User Profile & Registration Pagesfergbrain, can you show an example where more than one array is added? I’m getting errors trying to modify your php file to do it.
also, you mention “You’ll need to manually add the field to your wp_users table.” Do you mean adding a field that matches the inputName used?
finally, is there a way to use something other than text or textarea to inputType? How would you code up a select menu or checkboxes or radio buttons?
any insight greatly appreciated!
Forum: Fixing WordPress
In reply to: Get User InfoI’d like to display a list of actual author-level users, but list_authors() seems to display all users, not just those with AUTHOR level access. Is there any way to write a query to return a list of just author-level users displaying their “display name”? I also need to generate a link to the author.php page passing their user_id
HELP!
Forum: Plugins
In reply to: Export User Metadata – How?it would be nice if plugin authors actually responded to emails or even comments on their own pages, wouldn’t it? I hope you get an answer. I posted similar questions several times on the plugin author’s page and nada —
Anyone understand how to pull the data contained in the user_extra fields out and display it in an author page? I can’t get this to work, either.
Forum: Fixing WordPress
In reply to: htaccess issue.Be sure you put it before any other rules in .htaccess
You can easily edit the wp-admin.css file (look in the wp-admin folder) and even the wp-register.php, wp-login.php and various other pages used in the admin app. But be careful. Back up the file BEFORE you modify it so you can replace it if you screw up.
Helpful hint: test your pages using Firefox and get the Web Developer tools for it – using shift+ctrl+f, you can hover over elements and see a very helpful breakdown of the heirarchy of containing elements for that element – which makes it ever so much easier to determine what to modify.
Forum: Themes and Templates
In reply to: Dynamic ID for <body> and subpagesOK, question: How do I get the value of the page title (which may be more than one word, eg. home, who we are, etc) to use as the title displayed (in the browser itself , between the title tags) and yet get a syntactically correct reference (no spaces or odd characters because CSS won’t allow it) to the page post SLUG (eg: home, who, etc) to create a body tag id?
I see that I can simply put <?php the_title(); ?> between the <title></title> tags and that works, but I also need to reference something in the body tag (prefer the Page post slug, because I can control that).
Help?
Forum: Fixing WordPress
In reply to: Get User InfoYes, I managed to get the thing working… thanks
Forum: Fixing WordPress
In reply to: Get User InfoIs there a way to pass a user id in a link to the author.php file? For example, let’s say you have a list of author level users in a page or menu.
BOB
FRED
CINDYand you want users to click their names to go to their “author page”
how do you pass the correct user id (author id?) to the file?