Kathy_P
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Author.php just won’t workGlad to be of help–I’ve certainly had a lot of help from others myself.
Forum: Fixing WordPress
In reply to: Author.php just won’t workThe easiest way to pass a user name to the author template is to use one of the following template tags
<?php the_author_posts_link(); ?>
<?php wp_list_authors(); ?>
<?php list_authors(); ?>
somewhere else on your site, such as in The Loop or on your sidebar. (The first template tag mentioned can only be used in The Loop.)However, the author template is only meant to display information for one author at a time. If you want to show all your authors on the same page, I think you will have to do something similar to this thread. I am working on this at the moment. If you want to see what mine looks like, go here. It needs some work with the formatting of it, but it is basically doing what I want it to.
But I have been having trouble with the same piece of code as you are in my author template, as described in this thread. It works for some authors and not others, and I don’t know why.
Forum: Fixing WordPress
In reply to: Current AuthorJust discovered the purely 1.5 way isn’t working as expected. I am using
<?php wp_list_authors('optioncount=1&show_fullname=1'); ?>
in a custom template for this Page. For most of the authors, when you click on their names, it takes you to the author.php page, but the code<?php echo $curauth->user_nickname; ?>
doesn’t seem to work–it leaves a blank. Only two authors show up: Chan Stroman and Rundy, and looking at my Authors and Users list I can’t see what they have in common that the other authors don’t have. Rundy doesn’t have the first name and last name fields filled out on his, Chan does. All of the authors have nicknames, which is why I picked that one. Any ideas, Kafkaesqui?Forum: Plugins
In reply to: Get_author_profile plugin in a loop?I didn’t mean to annoy by stating the obvious, but not everyone who reads this thread will find it obvious. I’ve run into one little problem using the code provided in the paste bin. I can’t seem to change this
<a href="mailto:<?php echo antispambot(get_the_author_email()); ?>">email
author</a>
(sample code obtained here) into something that the Get Author Profile can process. I tried using
<a href="mailto:<?php echo antispambot(<?php author_profile('email'); ?>); ?>">email
but I get this error:
author</a>
Parse error: parse error, unexpected '<', expecting ')' in /home/coldclim/public_html/wp-content/themes/connections/contributors.php on line 39
What am I doing wrong?Forum: Plugins
In reply to: Get_author_profile plugin in a loop?Thank you once again. The code example was taken directly from your page on the plugin, and I didn’t modify it because I wasn’t sure which parts were essential. I now have a better understanding of what’s going on with that code.
Forum: Fixing WordPress
In reply to: Current AuthorI feel like I am not completely understanding something you’ve already said, or not fully incorporating it into the last piece of the puzzle. It sounds like what you are suggesting is to copy all the code from author.php into a custom template. That’s pretty much what I’ve already done, except I specified the author by “cheating.” I had Rundy create the Page himself while logged in, so he is the author by default. But not all my contributors are as comfortable using WordPress. As a custom template, it would not be called in response to a query, so how would I assign the author? It seems like I would use a modification of the code up above in “the purely 1.5 way,” but I’m not quite sure what to modify. And if I did it that way, I would have to make a custom template for each author, changing one line (one number, actually, the user_id) in each. Is that what you are saying?
Is there a way to “get” the author template in the same way you “get” the sidebar template? In other words, if I create a custom template, can I put something like ‘<?php get_author(2)?>` (where the author’s id is 2) and it will use the author template for author 2 instead of page.php (or index.php)? I’d still have to make a custom template for each author, though. Or would I? I can’t think how I would assign it dynamically.
Forum: Plugins
In reply to: Get_author_profile plugin in a loop?Thank you very much, Kafkaesqui. You’ve certainly helped a lot, and I’ve benefited from your help in other threads as well. I noticed you made a distinction between the owner of the blog and the rest of the authors. Is there a code reason for doing that, or was it just what you thought might be wanted? Since I imported from MT, I am already in the database as an author as well as the administrator, and I don’t want to be listed twice. Is there any reason why I couldn’t use the code you’ve provided as follows?
I don’t know php, but I’m guessing
if($user_id != $owner)
means” if the user_id string is not the owner string.”So to leave out the admin account I would use lines 1-5, 7 to set the owner string and format with css, and then skip to line 17. (I might have missed some css markup, I can’t “read” it that well.) In other words, you tell the program who the owner is, and then tell it to run the loop for everyone above user level 0 who isn’t the owner. Do I have that right?I can see that line 18 controls the user level, but how do I check for users above level 0 who haven’t written any entries? I suppose it might be easier to demote them.
Forum: Fixing WordPress
In reply to: Current AuthorYou are correct: I am replacing
the_content()
withthe_excerpt
. I “mistyped.” Okay, I think I’ve got my author template doing everything I want it to. But I want to be able to access specific authors via thewp_list_pages()
on the sidebar. It is probably easier to show you than to explain it. Look at the sidebar on my site. Under “Menu” you will see a page called “Essays.” I plan on having each author’s page listed as a child of “Essays,” and then all the essays by that author as children-Pages of the author Page. Right now I only have one author (Rundy) and one essay written by him listed below his name. Currently the template for the “Rundy” page is very similar to my author.php, except I usequery_posts( )
to specify the author. But could I make a much simpler template that just called the author template? I know thathttps://www.coldclimategardening.com/author/rundy/
is one way to write the query that will bring up the author.php, but how do I include it on a template for the Page “Rundy” so that it will automatically take the reader there?Forum: Fixing WordPress
In reply to: Current AuthorThank you, Kafkaesqui. I had experimented with query_posts, but couldn’t get it to work quite right. I am looking forward to the day when this function is documented more thoroughly in the Codex.
Just to confirm my understanding–the above code should go right before The Loop, right? Also, usingthe_excerpt
instead ofthe_post
shouldn’t require a change in the code you provided, should it?Forum: Fixing WordPress
In reply to: Current AuthorI would like to get all the posts on the author.php page to be displayed oldest first, so that they could be read in the order they were written, instead of newest first as they are on the blog. I have done some searching on this forum, but am not sure how to adapt it to the author template. Also, the link to this thread www.ads-software.com/support/topic.php?id=26613 gave me an internal server error, so I couldn’t read it.
Forum: Fixing WordPress
In reply to: Current AuthorI developed my author.php from index.php as well. I found that when used in the author template, any author template tag used after The Loop (that is, after the
<?php endwhile; endif; ?>
) worked properly, despite assertions in the Codex that they must be used within The Loop. I used them in my sidebar div before getting the sidebar template. I am specifically referring to the template tags for displaying the author description, author name, and author email. I presume the others would work. The only thing I needed the code in “the purely 1.5 way” above was to get the author’s name in the title as mentioned above, because that comes before The Loop.Forum: Fixing WordPress
In reply to: Current Authorkalico, I’m trying to figure out how what you accomplished with the index.php differs from the results you got with author.php? The author template can display both the profile and the posts, which is what it sounds like you did with your index.php. Or did I miss something?
Forum: Fixing WordPress
In reply to: Using Links Manager to make a directory-how to structure?In case anyone is looking for a similar solution, I solved my problem by using a plugin called Link Library. It is in the plugin repository at https://dev.wp-plugins.org/browser/link-library/trunk/.
Forum: Installing WordPress
In reply to: Entries (RSS) and Comments (RSS).Julie, I’m not sure you have a problem. If you are using Firefox without any extensions for RSS feeds, that is the message you will get when you click on a feed link. What you need to do is copy that address into a program that parses RSS feeds, or get an extension for Firefox such as Sage that will do it. If you use Thunderbird for email, instructions are here: https://kb.mozillazine.org/RSS_basics_(Thunderbird)
If you use bloglines, just copy the feed address into the box provided after you’ve clicked the Add tab.Forum: Fixing WordPress
In reply to: Links: cannot display image AND link nameTry the Link Libary plugin https://dev.wp-plugins.org/browser/link-library/trunk/