• I wanted to see the code behind the php function:php the_category. Can someone tell me what directory the definition of this function resides ?

    I am also looking for the same information for <?php comments_popup_link(__(‘No Comments’), __(‘1 Comment’), __(‘% Comments’)); ?>

    Last question:
    Can someone provide me the WP link where it explains the comments php function. I notice on some Blogs it says “Add/Edit”. On mine it says “No Comments” This confuses my users who think they can not comment. Thus I wanted to change my verbage to Add/Edit. I have no idea what (<?php comments_popup_link(__(‘No Comments’), __(‘1 Comment’), __(‘% Comments’)); ?>) does so if I can figure out this function then I can make my change to Add/Edit.

    POB

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m not sure about your first question, however here’s help with the second one:

    <?php comments_popup_link(__('No Comments'), __('1 Comment'), __('% Comments')); ?>

    All you have to do is change 'No Comments' to 'Add Your Comments' (users can’t edit their comments anyway)

    Does that help?

    The the_category function can be found in this file:
    /wp-includes/template-functions-category.php

    When you are seeing “Edit” it typically is a link for YOU (the person logged in). So the code looks something like:

    posted by <?php the_author('namefl'); ?> | <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?>  <?php edit_post_link(__('Edit This')); ?>

    A separate bit of code:

    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    </div>

    provides the link to edit a post. To change the wording of that, just edit the bits inside ‘Comments (0)’ could become

    ‘hey, there are no comments yet, care to comment?’

    and the others ‘Comments (1)’ which is for a single comment could become ‘only one person has made a comment, want to add to that?’ and finally, the third one, which is for more than one comment, could become ‘here’s what everyone is saying’

    You don’t have to use the numbers, those (”, ”, ”) are the arguments for comments_popup_link() You can even put an image into the arguments… with something like this:

    <?php comments_popup_link(('add a comment? <img src="/wp-content/themes/yourtheme/images/icon-comment2.png" />'), __('someone said <img src="/wp-content/themes/yourtheme/images/icon-comment2.png" /> '), __('what others are saying <img src="/wp-content/themes/yourtheme/images/icon-comment2.png" /> ', 'comments-link')); ?>

    HTH

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Where’s the PHP ?’ is closed to new replies.