How To Remove The “Click here to cancel reply” Link From The WordPress Comment Form

add_filter( ‘cancel_comment_reply_link’, ‘__return_false’ ); See /wp-includes/comment-template.php#function get_cancel_comment_reply_link() for more background. But if you do that the reply form will not move to the comment. The more interesting question is: Why doesn’t the link work for you? Do you have this line in your footer? is_singular() and get_option( ‘thread_comments’ ) and wp_print_scripts( ‘comment-reply’ );

List Categories of the Parent Category of the Current Category

Assuming you have only two levels of categories, you could first retrieve the parent category and then list the child categories. Furthermore, calling get_children and wp_list_categories uses more resources than necessary, using only wp_list_categories would suffice. I’ve explained my answer in the following snippet that should behave exactly as you need it to! $category_id = … Read more

The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”

The best way to customize a navigation menu is to use a custom ‘walker’ function.. Here are the steps how to achieve the customization that you want! Create a “wp-custom-nav-walker.php” file in your theme directory for a new custom ‘walker’ class. Extend the Walker_Nav_Menu class and copy the class’ function that you want to modify … Read more

Updating custom theme that is built from scratch

Right now I suggest simply uploading it via FTP. If you’re not too familiar, many hosts offer “WebFTP” which is usually easier to use. For the future you might consider GitHub Updater, check out their wiki. This basically allows you to use a new setting in style.css GitHub Plugin URI: foo/bar Once configured, you can … Read more

Replacing mysql_real_escape_string in WordPress theme

As mysql_real_escape_string() was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0, you can try esc_sql() to work for later WP/PHP versions. Replace mysql_real_escape_string() with esc_sql() at line 111 & 118 in your admin-interface.php file. Hope this should work well for you!

Theme Advanced Styles in Visual Editor and Paragraphs

If you always want <br/> instead of <p> for newlines you can change the TinyMCE configuration: forced_root_block: false, force_br_newlines: true, force_p_newlines : false, I think you cannot do this based on the context (use <br/> when in class=”box_note”, <p> otherwise), but it is an interesting question for the TinyMCE forum. Shift+Enter is indeed the standard … Read more