Forum Replies Created

Viewing 9 replies - 16 through 24 (of 24 total)
  • I don’t know how to do it, but i don’t even understand why users shouldn’t be able to change their passwords…

    Thread Starter troglodyth

    (@troglodyth)

    Okay, this might be a good idea. I’ve downloaded the package and installed it. Let’s see if it works out! Thanks so far.

    Forum: Fixing WordPress
    In reply to: flip comment order
    Thread Starter troglodyth

    (@troglodyth)

    Found the bug – my commented out code must somehow have been executed without being written. So now i’ve put this one into comment.php before the comment list is generated

    <?php if ($id == 42) { $commentcount = count($comments); $direction = -1; }
    		else { $commentcount=1; $direction=1; } ?>

    Then i’ve substituted the div class=commentnumber line with:
    <div class="commentnumber"><?php echo $commentcount; $commentcount=$commentcount+$direction; ?></div>

    Now it works and i’m happy. Thanks for your help.

    Forum: Fixing WordPress
    In reply to: flip comment order
    Thread Starter troglodyth

    (@troglodyth)

    Where exactly do i find “the comment loop” or where does it start. I have read “The Loop” in the codex, but still have no clue.
    Anyways i’ve tried to put the first line into my templates pages.php (guestbook is a page, not a post) and the following lines to the comments.php to where i’ve found $commentcount++, it didn’t work. Tried to put first line into comment.php, too it didn’t work. Now i’ve commented out the first line and it works, but not the right way. Now every comment on my guestbook page is number 12 and comments in posts have even numbers 2, 4, 6 – very strange.
    Where did i fail?

    Forum: Fixing WordPress
    In reply to: flip comment order
    Thread Starter troglodyth

    (@troglodyth)

    Wow, this one works great. Thanks a lot. But there’s still one thing i’d like to improve. My theme gives comment counts to each comment, so the one at top is still marked “1” now, even though it is the last/latest comment (in my case 12). Can i change that, too?

    The code to the count in my themes comments.php is
    <div class="commentnumber"><?php echo $commentcount++;?></div>

    Me again. I tried the plugin and it didn’t fit my wishes, so i decided to “mess up the core files” and succeeded. I found the function wp_trim_excerpt in wp-includes/formatting.php and changed the line array_push($words, '[...]'); to array_push($words, '<a href="' . apply_filters('the_permalink', get_permalink()) . '" rel="bookmark" title="more-link">read on ?</a>');
    Now it looks just like what i wanted. I’ll see if it’s stable. Thanks to forum-members and Jowra

    Another helpful site was: Customizing the Read More

    ?? Okay, can understand that. So i’m learning about the loop. If the plugin can create a “read on” link there, so maybe can i.

    Okay, excerpts are now working for front-page, too, but there’s still my “read on” problem. If i have no optional excerpt, my theme shows […]. If i have an optional excerpt it shows nothing. So let’s assume, i know which code to enter or at least have an idea, where is the function the_excerpt() generated/defined? Means, where do i have to change code for getting a “read on” or in case of an excerpt a “read full entry”. It seems not to be the index.php of my theme, because that’s just where the function is called.

    (ps.: I don’t want to use the plug-in for two reasons. It’s talking about the loop to which i have no clue at all and second i want to learn about my php code to improve my hacking abilities.)

    Related question: My optional excerpts show in the categories and archives. If i have set no optional excerpt, the text is simply chopped off automaticly and that’s all right with me. But because my articles are usually very long, i want to give an excerpt at the front page, too.
    Do i just have to change the function the_content() to the_excerpt() in the index.php or do i have to set rules for articles without optional excerpt, too? And how can i involve some button or link like “read more”, instead of […] at the end of each excerpt?
    I don’t want to use the <!–more–> tag, because that’s chopping off articles in feeds, too and at least i don’t want my theoretical essays simply being chopped off. ??

Viewing 9 replies - 16 through 24 (of 24 total)