Gyrate360
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress URL IssueGo to the edit page page,and above the list of pages,just click the quick edit link to see if someone is using the slug
Forum: Fixing WordPress
In reply to: Custom post type single page templatenice,can we make friends,my email is [email redacted – please keep help/discussion on these forums]
Forum: Fixing WordPress
In reply to: Custom post type single page templateadd_filter('single_template', 'my_single_template'); function my_single_template($single) { if(file_exists(get_template_directory() . '/single-' . get_the_ID() . '.php')) return get_template_directory() . '/single-' . get_the_ID() . '.php'; return $single; }
Then just create a file single-90.php,that’s ok!
Forum: Plugins
In reply to: Suggest to add a hook to class_wp_posts_list_tableanyone here?
Forum: Fixing WordPress
In reply to: List custom postsI have tried this,seems not work
SELECT p.* FROM wp_posts AS p, wp_postmeta AS m WHERE p.ID = m.post_id ORDER BY ( SELECT ABS(m1.meta_value-UNIX_TIMESTAMP(NOW())) from wp_postmeta AS m1 WHERE m1.meta_key='st_time' AND m1.post_id=p.ID)
Forum: Fixing WordPress
In reply to: How to list user by customer meta data using wp_user_queryGood,thanks,but I have another question: the format is variable,may be DD/MM/YY,so It will not work any more.how can I get there?
Forum: Fixing WordPress
In reply to: Make WP_List_Table columns selectable from screen optionsI have an example in my blog ,see:https://www.liyingqing.com/archives/1716
Forum: Themes and Templates
In reply to: Customizing children comments in wp_list_comments in wordpressAnyone can help me?
oh I had a way
because I didn’t put the function “comment_list” in function.php
I delete the code ‘avatar_size=60&callback=comment_list’ out of ‘<?php wp_list_comments(‘avatar_size=60&callback=comment_list’);?>’ in comment.php
that’s to use ‘<?php wp_list_comments();?>’,In this way,It can work,but I need a custom loop,and then I thougt I may be my function ‘comment_list’ has problem , so I copy the theme twentyten’s function ‘twentyten_comment’
but It still outputs the same warning!
I don’t know what to do next,I got missed!yes I have
here it is<?php function comment_list($comment, $args, $depth){?>
<?php $GLOBALS[‘comment’] = $comment; ?>
<li id=”comment-<?php comment_ID() ?>” class=”comment even”>
<div class=”gravatar”><?php echo get_avatar( $comment, 60, $template_path . ”.get_bloginfo(‘template_directory’).’/images/gravatar.png’ ); ?> </div>
<div class=”block”>
<div class=”comment-text”>
<?php comment_text() ?>
<?php if ($comment->comment_approved == ‘0’) : ?>
<p><?php _e(‘Your comment is awaiting moderation.’); ?></p>
<?php endif; ?>
</div>
<!–.comment-text–>
<div class=”comment-meta”>
<?php edit_comment_link(”.__(‘Edit’).”, ”, ”); ?>
<?php comment_author_link() ?> <?php if(!function_exists(‘how_long_ago’)){comment_date(‘M/d/Y’); } else { echo how_long_ago(get_comment_time(‘U’)); } ?>
</div>
<!–.comment-meta–>
</div><?php }?>
@chymyth
The Sweeper & Moderatorthe comments.php codes
<?php /** * The template for displaying Comments. * * The area of the page that contains both current comments * and the comment form. The actual display of comments is * handled by a callback to twentyeleven_comment() which is * located in the functions.php file. * * @package WordPress * @subpackage dzcas * @since dzcas 1.0 */ if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!'); if ( post_password_required() ) { ?> <p class="nocomments"><?php echo get_option('ptthemes_password_protected_name'); ?></p> <?php return; } ?> <div id="comments"> <?php my_comment_form();?> <?php if ( post_password_required() ) { ?> <p><?php _e( 'This post is password protected. Enter the password to view any comments.' ); ?></p> <?php return;?> <?php }?> <?php if ( have_comments() ) { ?> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { // Are there comments to navigate through? ?> <div class="navigation"> <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> </div> <!-- .navigation --> <?php } // check for comment navigation ?> <?php global $is_place_post; if($is_place_post){ $comment_count_text = REVIEW_TEXT;}else{$comment_count_text = COMMENT_TEXT;} if($is_place_post){ $comment_count_text2 = REVIEW_TEXT2;}else{$comment_count_text2 = COMMENT_TEXT2;} ?> <h3> <?php comments_number('0 '.$comment_count_text, '1 '.$comment_count_text, '% '.$comment_count_text2);?> </h3> <ol class="clist"> <?php wp_list_comments('avatar_size=60&callback=comment_list');?> <?php }else{ ?> <?php if ( ! comments_open() ) {?> <p class="nocomments"><?php _e( 'Comments are closed.' ); ?></p> <?php }else{?> <p>No comments yet. You should be kind and add one!</p> <?php }?> <?php }?> </div> <!-- #comments-->
[Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use a pastebin. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]
thx a lot in advance my gmai is [email address moderated – this forum does not provide support via email] U can contact