Trying to add Custom Post Type to this functions.php command

Both is check single post existing or not. But both function argument is different. is_singular(). Pass argument for this post type slug is_single() Pass argument for post ID, slug, title. If you are use is_single() then check post type name. Like: if ( is_single() && ‘conference_2021’ == get_post_type() ) { } Ref: https://developer.wordpress.org/reference/functions/is_singular/ https://developer.wordpress.org/reference/functions/is_single/

How to put variable in array, wp_insert_post?

You have to convert the $get_value variable in the simple array and then you have to convert in the associative array after that merge both array into one then you can create or update the post through the wp_insert_post() function. you can achieve this by the following code. if ($get_value) { // change the string … Read more

remove_action from parent theme using child theme functions.php

Well, all I needed to fix the issue was to add the exact same priority to the remove_action and it worked pretty well, thanks to Sally CJ answer add_action( ‘wp_head’, ‘remove_site_hero_sections’); function remove_site_hero_sections() { global $theme_header_layout; remove_action(‘theme_site_header’, array($theme_header_layout, ‘site_hero_sections’), 9999); }

How to get specific multiple pages excerpts at homepage?

It looks like your loop is running through all the posts, your array of post id isn’t getting passed. However, you may be able to make the call using this code Get excerpt using get_the_excerpt outside a loop tl;dr $text = apply_filters(‘the_excerpt’, get_post_field(‘post_excerpt’, $post_id)); https://wordpress.stackexchange.com/a/150005/26744