How to safely remove the footer (twentytwenty)
Its not safe and not recommended. Thats action that read all Javascripts, CSS from other plugins or theme. Hide your footer with css or theme option. #footer,footer{display:none!important}
Its not safe and not recommended. Thats action that read all Javascripts, CSS from other plugins or theme. Hide your footer with css or theme option. #footer,footer{display:none!important}
Try the following code: add_filter(‘manage_users_sortable_columns’, ‘my_user_sortable_columns’); function my_user_sortable_columns($sortable_columns) { $sortable_columns[‘posts’] = ‘post_count’; return $sortable_columns; } Credit to: Add additional user fields and make them sortable in the user screen
You could try changing the output type of get_results() to ARRAY_A or ARRAY_N and see what kind of array they give you. E.g. $tables = $wpdb->get_results(“show tables like ‘pro_hist%'”, ARRAY_A); var_dump($tables); foreach( $tables as $table ) { var_dump($table); } If $table is an array and it has the name as the first value, then get … Read more
This could probably make exquisite debugging session, but taking in account it’s Friday evening – just use date_i18n() instead and let WordPress deal with a huge mess that time/date issues usually are.
IF you want to retrieve thumbnail in size that you had set with set_post_thumbnail_size() then call the_post_thumbnail() without passing any arguments. That will default to named post-thumbnail size that that set_post_thumbnail_size() actually creates. Also crop for this will be determined by third argument in set_post_thumbnail_size() (defaults to false) and is not tied to media settings … Read more
The only way to keep it the way you paste it is by switching to the HTML tab – this will show you the raw code as you formatted it. Wrapping code in tags is also a good idea because it tells the browser that the code is literally ‘precomposed’, and it therefore won’t render … Read more
Make sure the HTTP headers are not sent already at the point you want to set the cookie. Here’s how you can test that: function set_cookie() { var_dump(headers_sent()); // should be bool(false) … Turning WP_DEBUG on in your config.php file may help also while debugging. By the way, you really should be doing some filtering … Read more
Here is the relevant code from home.php (the Blog Posts Index): <?php if($grisaillePostCount == 1) { the_post_thumbnail(); } else { the_post_thumbnail(‘following-post-thumbnails’); } ?> Here is the relevant code from index.php: <?php the_post_thumbnail(‘following-post-thumbnails’); ?> So, the difference is the default thumbnail size, and the custom ‘following-post-thumbnails’ image size. In functions.php, the Theme defines the defualt ‘thumbnail’ … Read more
You’re looking at the problem the wrong way. The error you’re seeing isn’t an error coming from WordPress, it’s a PHP error. Somehow, somewhere, something is limiting the memory limit to 96M, and it ain’t WordPress that’s doing it. Here’s the thing: WordPress can’t actually limit the memory on most servers. I know that it … Read more
Here’s something I wrote because my clients were using very high quality pngs, when they could be more lossy jpgs for web. Note this still preserves the original image, only changes the thumbnails. Add this to your functions.php <?php //Force PNG Thumbnails into JPGs add_filter(‘wp_generate_attachment_metadata’,’force_png_to_jpg’); function force_png_to_jpg($image_data) { $sizes = array(‘thumbnail’,’medium’,’large’); $upload_dir = wp_upload_dir(); $file … Read more