Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter danielb

    (@danielb)

    Oh! Please delete this topic and ignore the question, it was a theme’s style ??

    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

    tedcarter
    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 { ?>&mdash;<?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; ?>

    Thread Starter danielb

    (@danielb)

    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 )

    Thread Starter danielb

    (@danielb)

    wp_reset_query() worked.
    Thanks a lot!

    Thread Starter danielb

    (@danielb)

    This doesn’t work as well.
    Are conditional tags supposed to work in sidebar at all?

    Maybe 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.

    Text-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 )

    mhsouthpaw,

    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

    Thread Starter danielb

    (@danielb)

    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.

    Thread Starter danielb

    (@danielb)

    Unfortunately, XHTML doesn’t allow <p> inside <a>.

    Any 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.

    Thread Starter danielb

    (@danielb)

    Guys, 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!

    Thread Starter danielb

    (@danielb)

    rnawky, 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?

Viewing 14 replies - 1 through 14 (of 14 total)