Cory.Nickerson
Forum Replies Created
-
Having same issue. Form is being submitted and it is logging the submission in WP admin area but the email isn’t sending.
Forum: Themes and Templates
In reply to: the_post_thumbnail() questionForum: Fixing WordPress
In reply to: Website hackedI just deleted my hosting account, re-created it new and did a fresh install on everything. Also using Wordfence Security now.
Forum: Fixing WordPress
In reply to: Website hackedThanks for the advice. I’ve read the hardening tips and a few articles. Here is what I currently do. Thoughts?
Securing WordPress
1. Replace “Authentication Unique Keys” in wp-config.php.
https://api.www.ads-software.com/secret-key/1.1/salt/2. Change db_prefix from default “wp_”.
3. Create random admin name and secure password.
4. Move wp-config.php out of the root directory.
5. Disable directory browsing. Add following code to .htaccess file.
# Disable directory browsing Options ALL -Indexes
6. Change folder permissions to 755 and file permissions to 644.
7. Change file permission of wp-config.php to 400.
8. Secure wp-includes. Add following code to .htaccess file.
# Block the include-only files. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^wp-admin/includes/ - [F,L] RewriteRule !^wp-includes/ - [S=3] RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] RewriteRule ^wp-includes/theme-compat/ - [F,L] </IfModule>
9. Disable file editing from WordPress admin area. Add following code to wp-config.php
define('DISALLOW_FILE_EDIT', true);
Securing Themes
1. Add the following line to theme’s function.php
add_filter('login_errors', create_function('$a', "return null;")); remove_action('wp_head', 'wp_generator');
2. Remove the following from themes header.php
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
Forum: Fixing WordPress
In reply to: Problem displaying newest commentsIt appears this flaw is in every theme. Its coded flawed. You cannot create results in descending order from newest post time. All you can do is make newer pages display first.
Comment system was badly planned out. Guess I will have to do a re-write with a custom query to the DB to sort this out.
Forum: Fixing WordPress
In reply to: Problem displaying newest commentsIs this posted in the correct forum?
Forum: Fixing WordPress
In reply to: Problem displaying newest commentscomments.php
<?php if ( have_comments() ) : ?> <ol class="commentlist"> <?php wp_list_comments( array ( 'type' => 'comment', 'callback' => 'yyz_custom_comments' ) ); ?> </ol> <?php endif; ?>
functions.php
// Custom comments template. function yyz_custom_comments() { include( 'comments-single.php' ); }
comments-single.php
<li id="comment-<?php echo get_comment_ID(); ?>"> <div class="comment-avatar"> <?php echo get_avatar( $GLOBALS['comment'], 48 ); ?> </div> <div class="comment-meta"> <strong><?php echo get_comment_author_link(); ?></strong> • <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ); ?>"><?php echo get_comment_date(); ?> <?php echo get_comment_time(); ?></a> <?php edit_comment_link( __( '(Edit)' ), ' ', '' ); ?> </div> <div class="comment-content"> <?php comment_text(); ?> </div> <div class="comment-bottom"> <?php $post_id = get_the_ID(); $comment_id = get_comment_ID(); $max_depth = get_option('thread_comments_depth'); $default = array( 'add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __('Reply'), 'login_text' => __('Log in to Reply'), 'depth' => 1, 'before' => '', 'after' => '', 'max_depth' => $max_depth ); comment_reply_link( $default, $comment_id, $post_id ); ?> </div> </li>
Forum: Fixing WordPress
In reply to: Problem displaying newest commentsTara,
I am coding my own theme. I am using the default
wp_list_comments()
function.Forum: Themes and Templates
In reply to: WordPress remove comment_form( 'cancel_reply_link' )?Edit: this is working good now.
<?php comment_form( array( 'comment_notes_after' => '', 'title_reply' => '', 'comment_field' => '<textarea id="comment" name="comment" aria-required="true" placeholder="Leave a comment..."></textarea>', 'logged_in_as' => '', 'cancel_reply_link' => '' ) ); ?>
I replaced this line in
comments.php
with the following:<div id="respond" class="comment-respond"> <form action="<?php echo get_bloginfo( 'url' ); ?>/wp-comments-post.php" method="post" id="commentform" class="comment-form"> <textarea id="comment" name="comment" aria-required="true" placeholder="Leave a comment..."></textarea> <p class="form-submit"> <input name="submit" type="submit" id="submit" class="submit" value="Post Comment" /> <?php if ( $_GET['replytocom'] != 0 ) : ?> <a rel="nofollow" id="cancel-comment-reply-link" class="button" href="/websites/wordpress/post-6/#respond">Cancel Reply</a> <?php else : ?> <a rel="nofollow" id="cancel-comment-reply-link" class="button" href="/websites/wordpress/post-6/#respond" style="display: none;">Cancel Reply</a> <?php endif; ?> <input type="hidden" name="comment_post_ID" value="<?php echo get_the_ID(); ?>" id="comment_post_ID" /> <input type="hidden" name="comment_parent" id="comment_parent" value="<?php if ( isset( $_GET['replytocom'] ) ) { echo $_GET['replytocom']; } else { echo 0; } ?>" /> </p> <?php wp_comment_form_unfiltered_html_nonce(); ?> </form> </div>
Works great
Screenshot of how it looks.
Forum: Themes and Templates
In reply to: WordPress remove comment_form( 'cancel_reply_link' )?What was I doing wrong? for reference.
Forum: Themes and Templates
In reply to: WordPress remove comment_form( 'cancel_reply_link' )?test. its not letting me past code.
Forum: Themes and Templates
In reply to: WordPress remove comment_form( 'cancel_reply_link' )?Okay so if you are using the
<?php comment_form(); ?>
function in your template to display the comment form and adjusting the variables within the array to change things, just replace it with this.<form action="<?php echo get_bloginfo( 'url' ); ?>/wp-comments-post.php" method="post" id="commentform" class="comment-form"> <textarea id="comment" name="comment" aria-required="true" placeholder="Leave a comment..."></textarea> <p class="form-submit"> <input name="submit" type="submit" id="submit" class="submit" value="Post Comment" /> <input type="hidden" name="comment_post_ID" value="<?php echo get_the_ID(); ?>" id="comment_post_ID" /> <input type="hidden" name="comment_parent" id="comment_parent" value="<?php if ( isset( $_GET['replytocom'] ) ) { echo $_GET['replytocom']; } else { echo 0; } ?>" /> </p> <?php wp_comment_form_unfiltered_html_nonce(); ?> </form>
Forum: Themes and Templates
In reply to: WordPress remove comment_form( 'cancel_reply_link' )?I think I’m just going to make a new function rewriting the default function for this. Will post it if I do.
Forum: Fixing WordPress
In reply to: Displaying Sub-Pageshelp please? ??
Forum: Plugins
In reply to: Custom login templateNot sure how to edit. Sorry for double post.
Also was wondering which file is used to create the session when a user logs in?