pmccoy
Forum Replies Created
-
Forum: Themes and Templates
In reply to: comments link classSorry for the confusion. I should have explained my particular situation from the beginning.
Forum: Themes and Templates
In reply to: comments link classYes, but I’m using the style sheet from my already existing website. Instead of adding code to the style sheet and adding the div tag each time I use these functions, I can just add the parameter to call the class I’ve already created.
IMO, my solution is more efficient.
Forum: Themes and Templates
In reply to: comments link classThose functions return something like this:
<A href=”…”>text</A>
Wrapping a DIV around the above and assigning a class to it does not apply the class to the text within the <A> tag.
You need to assign the class directly to the <A> tag. The modifications I made to the functions accomplishes that.
Forum: Themes and Templates
In reply to: comments link classI found there were problems attaching classes to functions like edit_comment_link and edit_post_link.
Here’s what I did:
I went into wp-includes and opened templates-functions-links.phpI changed the 2 functions to the following:
function edit_post_link($link = ‘Edit This’, $before = ”, $after = ”, $CSSclass=”) {
global $user_ID, $post;get_currentuserinfo();
if (!user_can_edit_post($user_ID, $post->ID)) {
return;
}$location = get_settings(‘siteurl’) . “/wp-admin/post.php?action=edit&post=$post->ID”;
echo “$before <a href=\”$location\””;
if(!empty($CSSclass)) {
echo ” class=\”” .$CSSclass.”\””;
}
echo “>$link $after”;
}function edit_comment_link($link = ‘Edit This’, $before = ”, $after = ”, $CSSclass=”) {
global $user_ID, $post, $comment;get_currentuserinfo();
if (!user_can_edit_post_comments($user_ID, $post->ID)) {
return;
}$location = get_settings(‘siteurl’) . “/wp-admin/post.php?action=editcomment&comment=$comment->comment_ID”;
echo “$before <a href=’$location'”;
if(!empty($CSSclass)) {
echo ” class=\”” . $CSSclass. “\””;
}
echo “>$link $after”;
}Then I could add the class when I made the function call. Example:
<?php edit_comment_link(‘edit’,”,”,’white’); ?>I’m new to wordpress, too, so if there is a better way to do this that I don’t know about, let me know. I didn’t see anything in my search.
Forum: Fixing WordPress
In reply to: the_time only displays in WP 1.5Thank you for posting this.
I was having problems trying to figure what how to get the time assigned to a variable.
Problem solved.