Posts are deleted everyday at night

‘Every night’ sounds like it’s triggered via a cronjob. You may install the wp-crontrol plugin to see what cronjobs are sheduled in your wordpress install. If you don’t see something obvious there I would also suppose it happens outside of wp. But as you already pointed out, you can only be sure when you revert … Read more

Pagination URL order

Well this seems to fix it. Not sure if this is the best way to do it so please enlighten me if I’m wrong: By changing: if ( $wp_rewrite->using_permalinks() ) $pagination[‘base’] = user_trailingslashit( trailingslashit( remove_query_arg( ‘s’, get_pagenum_link( 1 ) ) ) . ‘page/%#%/’, ‘paged’ ); to: if ( $wp_rewrite->using_permalinks() ) $_SERVER[‘REQUEST_URI’] = user_trailingslashit( trailingslashit( remove_query_arg( … Read more

How to eliminate the Web Address / Web Link textbox from comment forms

You made a mistake when put your functions.php file into mu-plugins directory. Why? Because your file rendered above is not a plugin, it is just a script. WordPress looks for a plugin inside mu-plugins directory. So you have to do one of two things: Add plugin header into functions.php file Move functions.php file into your … Read more

Identifying a Page Containing Shortcode at `init`

I’ve found an answer, although messy. /* // Plugin information goes here */ $GLOBALS[‘example_class’] = new example_class; class example_class { var $public_loaded = false, $content=””; public function admin_init() { add_menu_page( // … ); } // End of admin_init function public function get_random( ) { // … } } // End of example class add_action(‘init’, function() … Read more

Showing Subcategory’s Name and Link Instead of Parent Category’s

Little change: <?php $category_separator = “”; foreach((get_the_category()) as $childcat) { $parentcat = $childcat->term_id; if( $parentcat != 0 ) echo ‘<span class=”‘ . get_cat_name($parentcat) .'”><a href=”‘ . get_category_link($parentcat) . ‘”>’ .get_cat_name($parentcat) .'</a></span>’; else echo ” . $category_separator . ‘<span class=”‘. $childcat->cat_name .'”><a href=”‘ . get_category_link($childcat) .'”>’ . $childcat->cat_name . ‘</a></span>’; $category_separator = “https://wordpress.stackexchange.com/”; } ?> Actually … Read more