Replace TinyMCE with Custom Built Editor

You can do that with js/jquery if you want : $(‘#postdivrich’).hide().after(your custom editor div); You can add inputs with jquery and save them with : add_action(‘save_post’, ‘save_the_post’); function save_the_post(){ global $post; update_post_meta($post->ID, ‘field_name’, $_POST[‘field_name’]); } Or use a metabox and replace standard editor with it (width jquery). Hope this help someone 🙂

Add the title of a widget as an ID – for anchor links

Yes you can add an around the title of the widget, you do this in the register_sidebar code which you would put in your functions.php add_action( ‘widgets_init’, ‘theme_register_sidebars’ ); function theme_register_sidebars() { register_sidebar( array( ‘id’ => ‘mysidebar-sidebar’, ‘name’ => __( ‘My Sidebar’, ‘themename’ ), ‘description’ => __( ‘Widgets for my sidebar’, ‘themename’ ), ‘before_widget’ => … Read more

Pagination not displaying

You need to add your query variable to the global used on the function, in that case “$wp_query“, just like that: <?php $yourQuery_args = [‘posts_per_page’ => ‘7’,]; $yourQuery = new WP_Query( $yourQuery_args ); $wp_query = $yourQuery; get_template_part(‘pagination’); ?>

Merging two excerpt functions to work with conditions

Depending on where in the loop you call excerpt() wpautop might be creating the <p>…</p> wrapper. In that case, you could wrap $excerpt with <p>…</p> before returning it. Edit: Try this approach <?php echo excerpt(25).”\n”;?> (or possibly “\n\n”) to change the behavior. in function awesome_excerpt() you have $text = substr( $content, 0, strpos( $content, ‘</p>’ … Read more

Sort results by name & asc order on homepage

Since you only want to hook into the posts on your homepage, I think you only need something like this: <?php add_action( ‘pre_get_posts’, ‘my_change_sort_order’); function my_change_sort_order( $query ){ if ( ! is_admin() && $query->is_main_query() ) : if ( is_front_page() ) : //Set the order ASC or DESC $query->set( ‘order’, ‘ASC’ ); //Set the orderby $query->set( … Read more

How to disable register and reset the password from WordPress admin panel?

put the code bellow into functions.php : class Password_Reset_Removed { function __construct() { add_filter( ‘show_password_fields’, array( $this, ‘disable’ ) ); add_filter( ‘allow_password_reset’, array( $this, ‘disable’ ) ); add_filter( ‘gettext’, array( $this, ‘remove’ ) ); } function disable() { if ( is_admin() ) { $userdata = wp_get_current_user(); $user = new WP_User($userdata->ID); if ( !empty( $user->roles ) … Read more