Add acf field in title (admin table)

Use this to filter the title: add_action( ‘admin_head-edit.php’, ‘wpse264139_edit_post_change_title_in_list’ ); function wpse264139_edit_post_change_title_in_list() { add_filter( ‘the_title’, ‘wpse264139_construct_new_title’, 100, 2 ); }` `function wpse264139_construct_new_title( $title, $id ) { if(get_post_type($id) == ‘post_type’) { $field = get_field(‘place’, $id); return $field . ” ” . $title; } else { return $title; } } NOTE: most of the code came from: … Read more

Remove Title of youtube video

Update: Try this one.. it works for youtube url in your post which is converted to iframe by wordpress. function remove_youtube_controls($code){ if(strpos($code, ‘youtu.be’) !== false || strpos($code, ‘youtube.com’) !== false){ $return = preg_replace(“@src=([‘\”])?([^’\”>]*)@”, “src=$1$2&showinfo=0&rel=0”, $code); return $return; } return $code; } add_filter(’embed_handler_html’, ‘remove_youtube_controls’); add_filter(’embed_oembed_html’, ‘remove_youtube_controls’);

How get get list of pages in ajax search

There is no get_pages() method in the WP_Query class (for WordPress version 4.9.4). So in the data_fetch() function, replace the following: if( $the_query->get_pages() ) : while( $the_query->get_pages() ): $the_query->get_pages(); ?> ..with this: if( $the_query->have_posts() ) : while( $the_query->have_posts() ): $the_query->the_post(); ?> And in the fetch() JS function, set the type to POST, like so: function … Read more

Automatically add words if duplicate post titles

Please give this a shot. I didn’t test it, so let me know if it has any errors. Basically, it will check the title before saving and run a loop checking to see if it can get a post by that title. If it can, it will add a new suffix and keep trying. As … Read more

How to remove “Category : …”

That title is coming from archive.php file of TwentySixteen theme. You can find a <header> code section in that file. What you can do, simply copy the archive.php file as category.php and then remove the following code section from category.php file: <header class=”page-header”> <?php the_archive_title( ‘<h1 class=”page-title”>’, ‘</h1>’ ); the_archive_description( ‘<div class=”taxonomy-description”>’, ‘</div>’ ); ?> … Read more

Woocommerce: How to remove page title from storefront theme homepage

Try this: add_action( ‘wp’, ‘storefront_remove_title_from_home_homepage_template’ ); function storefront_remove_title_from_home_homepage_template() { remove_action( ‘storefront_homepage’, ‘storefront_homepage_header’, 10 ); } or if you use default template add_action( ‘wp’, ‘_storefront_remove_title_from_home_default_template’ ); function storefront_remove_title_from_home_default_template() { if ( is_front_page() ) remove_action( ‘storefront_page’, ‘storefront_page_header’, 10 ); }

How to edit title on Edit post pages?

Add this code instead on your functions.php, this will change the post and product title to the post or product that is being edit: add_filter(‘admin_title’, ‘my_admin_title’, 10, 2); function my_admin_title($admin_title, $title) { global $post, $action; if ( isset($post->post_title) and $action == ‘edit’ ){ return ‘Edit < ‘.$post->post_title.’ – ‘.get_bloginfo(‘name’); } else { return $title .’ … Read more

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