danielb
Forum Replies Created
-
Oh! Please delete this topic and ignore the question, it was a theme’s style ??
Forum: Themes and Templates
In reply to: How do I add a custom CSS class to select tables?It would be very nice to have an ability to assign a class to a table.
I’ve set up two several sets of CSS rules for different types of tables. Currently it seems like the only option to run several “table classes” is to add each table ID to corresponding CSS selector, which is not very handy.
TIA
Forum: Fixing WordPress
In reply to: Display Each Comment Numbertedcarter
I just gave up using the custom function.Below is my code. I’m not sure if it’s nice but it works ??
You’ll have to add markup appropriate for your theme.<?php $i = 0; foreach ($comments as $comment) : ?> // Prints comment number for approved comments and M-dash for unapproved ones <?php if (($comment->comment_approved == '1')) { $i++; echo $i; } else { ?>—<?php } ?> // Prints comment info <a name="comment-<?php comment_ID() ?>"></a> <?php comment_author_link(); comment_date('j F Y'); comment_time() ?> // Prints comment text for approved comments and notification for unapproved ones. <?php if ($comment->comment_approved == '0') { ?>An administrator must always approve the comment.<?php } comment_text(); endforeach; ?>
Forum: Fixing WordPress
In reply to: Why does WP put pre tags in paragraphs?Thanks for the tip.
The interesting thing is that when installed this plugin I couldn’t get it to work. It was very surprising because it’s pretty clear and simple. I thought it may be not working because of one of my other plugins, which improves typography (Typo Lite). When I disabled this plugin, not only WP unformatted started to work, but also the issue with incorrect wrapping of P and CODE was gone. So, I’ll contact the author of the plugin and ask him to fix it.
Thanks again )
Forum: Themes and Templates
In reply to: Can’t get is_page() tag to work in the sidebarwp_reset_query() worked.
Thanks a lot!Forum: Themes and Templates
In reply to: Can’t get is_page() tag to work in the sidebarThis doesn’t work as well.
Are conditional tags supposed to work in sidebar at all?Forum: Fixing WordPress
In reply to: Show Comment NumberMaybe this will be helpful to someone:
The better way is to use get_comments_number() function. It returns an integer with just number of comments for a given post, while comments_number() returns a NULL variable. It matters if you need to pass comments number to some custom PHP function.Forum: Your WordPress
In reply to: Please review non-CSS ultra-minimal siteText-only design is good thing but you still have to design the layout.
I think you can use page area and font sizing to make accent on the most important parts of the page.
Navigation is hard to use.
Post title, post category and post date have different “value” but you style them with the same font size, weight and family.
It would be nice to add more space between non related elements and group related ones.
(Here’s a nice article by A. Lebedev: https://www.artlebedev.com/mandership/136/)If your posts list is so compact, why include only 10 items and make your visitor press the “Older” link? 46 lines of text with links to all posts wouldn’t hurt a user.
Cheers )
Forum: Fixing WordPress
In reply to: Display Each Comment Numbermhsouthpaw,
Can I ask a little help on placing the counter? I’m scarely a programmer and it’s been about 10 years since I’ve wrote my last script and it’s a bit tricky for me to sort out the Loop..
I’m trying to use a custom comment display function, here it is:
function mytheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <?php $commentNo = 1; ?> <div class="comment" id="comment-<?php comment_ID() ?>"> <div class="commentinfo"> <div class="number"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php comment_ID() ?></a></div><div class="author"><a name="<?php comment_ID() ?>"></a><?php printf( get_comment_author_link() ) ?></div> <?php if ($comment->comment_approved == '0') : ?> Your comment is awaiting moderation.') <?php endif; ?> <div class="time"><?php printf(__('%1$s,%2$s'), get_comment_date(), get_comment_time()) ?></div> </div> <div><?php comment_text() ?></div> </div> <?php }
And here is the code in comments.php that calls this function:
<?php wp_list_comments('type=comment&callback=mytheme_comment'); ?>
If I put the counter declaration inside the function, it’s assigned “1” value on every loop, so the counter doesn’t work. If I put it outside, it’s not seen in the function at all. Please can you tell me what should I do to get this numbering work?
Thanks
Forum: Themes and Templates
In reply to: Is it possible to make a link from excerpt?I did more thorough search and found this topic:
https://www.ads-software.com/support/topic/197815
It works right in the template and doesn’t require any mods.Thanks for your reply.
Forum: Themes and Templates
In reply to: Is it possible to make a link from excerpt?Unfortunately, XHTML doesn’t allow
<p>
inside<a>
.Forum: Requests and Feedback
In reply to: _wp_unfiltered_html_comment causes warning in XHTML1.0 StrictAny news on this topic?
It’s really annoying to see this warning in your 100% valid template )And, by the way, what is unfiltered comment? Is it one that contains HTML tags etc.? If so, how do I disallow everything but plain text in commments? I haven’t found such option in settings.
Thanks.
Forum: Fixing WordPress
In reply to: Moving WP to non-root directoryGuys, I’m sorry, but I’ve forgot to mention that I want my blog to be still accessible from the site root. As I’ve already found out by practice, the right solution is to store index.php and .htaccess generated by WP in the “blog root” folder. In my case this is the same as the site root.
Thanks for you help!
Forum: Fixing WordPress
In reply to: Moving WP to non-root directoryrnawky, yes I’ve copied the files from / to /wordpress. I would think I had to move them like you said, but here’s a quote from the Codex (see link in the first post):
Copy the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address).
figaro, these .htaccess files are identical, all they contain is WP rewrite rules. So I can delete both files from the “old” location?