Stop WP from creating “Sample Page” and “Hello World!” post

If you’re using Multisite The accepted answer is destructive in that it cancels all other set-up items in the overridden function. A less destructive way to do it for multisite installs is to delete the default content during new blog creation by hooking in to wpmu_new_blog add_action( ‘wpmu_new_blog’, ‘delete_wordpress_defaults’, 100, 1 ); function delete_wordpress_defaults(){ // … Read more

How to retrieve text only from wp_content() not from wp_excerpt()?

Or even simpler: echo wp_strip_all_tags( get_the_content() ); By using: get_the_content() Retrieve the post content. (Must be used in a Loop) An important difference from the_content() is that get_the_content() does not pass the content through the ‘the_content‘. This means that get_the_content() will not auto-embed videos or expand shortcodes, among other things. wp_strip_all_tags() Properly strip all HTML … Read more

What is the use of to_ping and pinged column?

to_ping is a list of URLs WordPress should send pingbacks to. pinged is a list of URLs WordPress has sent pingbacks to. Do not use these fields for something else. They are parsed many times in core code (69 matches for to_ping); their format is fixed. You cannot reduce the query load by using these … Read more

removing inline styles from wp-caption div

To remove the inline width in a clean PHP-way could be done with a filter, as described in the source code: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/media.php#L1587 Returning a zero (or false) will remove it: add_filter( ‘img_caption_shortcode_width’, ‘__return_false’ );

How to remove a column from the Posts page

function my_manage_columns( $columns ) { unset($columns[‘date’]); return $columns; } function my_column_init() { add_filter( ‘manage_posts_columns’ , ‘my_manage_columns’ ); } add_action( ‘admin_init’ , ‘my_column_init’ );

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