WordPress wraps span tags into p tags

I have investigated this problem and recognized that it is not the TinyMCE fault, but the issue is caused by the the hook function wpautop instead. And tags are wrapped just before post is being displayed. So in order to fix this issue just remove the hook function like that. remove_filter( ‘the_content’, ‘wpautop’ ); This … Read more

Add ‘page template’ column to dashboard for CPTs

<?php // add new column to the columns array function wpse267793_columns($columns) { // Column name $columns[‘template’] = ‘Template file’; return $columns; } function wpse267793_show_template_columns($name, $post_id) { // get template file name from post meta $template = get_post_meta($post_id, ‘_wp_page_template’, true); echo $template; } // change ‘CPT’ to the relevant custom post type add_filter(‘manage_CPT_posts_columns’, ‘wpse267793_columns’); add_action(‘manage_CPT_posts_custom_column’, ‘wpse267793_show_template_columns’, … Read more

WordPress Screen options does not show any fields

Ok, found it. Not really WordPress related but might be helpful to someone anyway. It was my browser ad blocker plugin. Apparently it adds CSS to pages upon loading. The CSS showed as “inline” in the dev tools inspector but didn’t show at all when viewing page source code. When checking the CSS of the … Read more

WordPress Admin Menu Order for ‘admin.php’ pages

Instead of this: return array( ‘index.php’, // Dashboard ‘separator1’, // –Space– ‘edit.php?post_type=page’, // Pages ‘edit.php’, // Posts ‘edit.php?post_type=portfolio’, // Portfolio ‘admin.php?page=wpcf7’, // Contact Form 7 ‘upload.php’, // Media ‘edit-comments.php’, // Comments ); try this: return array( ‘index.php’, // Dashboard ‘separator1’, // –Space– ‘edit.php?post_type=page’, // Pages ‘edit.php’, // Posts ‘portfolio’, // Portfolio ‘wpcf7’, // Contact Form … Read more

Accidentally changed website url

So you do not know the url what you changed? If so, then follow these steps Go to the phpmyadmin go to the options table search for this option_name siteurl then you can know what you changed then using that url you can login then change it back

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)