Custom post type not showing in xml sitemap

I create a custom post type in WordPress and it’s working. My issue is when I create my XML sitemap then I am getting my all the pages and post but not getting the custom post type.

Would you help me out with this?

// Register Custom Post Type blog function create_blog_cpt() {      $  labels = array(         'name' => _x( 'blogs', 'Post Type General Name', 'bloglist' ),         'singular_name' => _x( 'blog', 'Post Type Singular Name', 'bloglist' ),         'menu_name' => _x( 'blogs', 'Admin Menu text', 'bloglist' ),         'name_admin_bar' => _x( 'blog', 'Add New on Toolbar', 'bloglist' ),         'archives' => __( 'blog Archives', 'bloglist' ),         'attributes' => __( 'blog Attributes', 'bloglist' ),         'parent_item_colon' => __( 'Parent blog:', 'bloglist' ),         'all_items' => __( 'All blogs', 'bloglist' ),         'add_new_item' => __( 'Add New blog', 'bloglist' ),         'add_new' => __( 'Add New', 'bloglist' ),         'new_item' => __( 'New blog', 'bloglist' ),         'edit_item' => __( 'Edit blog', 'bloglist' ),         'update_item' => __( 'Update blog', 'bloglist' ),         'view_item' => __( 'View blog', 'bloglist' ),         'view_items' => __( 'View blogs', 'bloglist' ),         'search_items' => __( 'Search blog', 'bloglist' ),         'not_found' => __( 'Not found', 'bloglist' ),         'not_found_in_trash' => __( 'Not found in Trash', 'bloglist' ),         'featured_image' => __( 'Featured Image', 'bloglist' ),         'set_featured_image' => __( 'Set featured image', 'bloglist' ),         'remove_featured_image' => __( 'Remove featured image', 'bloglist' ),         'use_featured_image' => __( 'Use as featured image', 'bloglist' ),         'insert_into_item' => __( 'Insert into blog', 'bloglist' ),         'uploaded_to_this_item' => __( 'Uploaded to this blog', 'bloglist' ),         'items_list' => __( 'blogs list', 'bloglist' ),         'items_list_navigation' => __( 'blogs list navigation', 'bloglist' ),         'filter_items_list' => __( 'Filter blogs list', 'bloglist' ),     );     $  args = array(         'label' => __( 'blog', 'bloglist' ),         'description' => __( '', 'bloglist' ),         'labels' => $  labels,         'menu_icon' => 'dashicons-admin-comments',         'supports' => array('title', 'editor', 'thumbnail', 'custom-fields'),         'taxonomies' => array(),         'public' => true,         'show_ui' => true,         'show_in_menu' => true,         'menu_position' => 5,         'show_in_admin_bar' => true,         'show_in_nav_menus' => true,         'can_export' => true,         'has_archive' => true,         'hierarchical' => false,         'exclude_from_search' => true,         'show_in_rest' => true,         'publicly_queryable' => true,         'capability_type' => 'post',     );     register_post_type( 'blog', $  args );  } add_action( 'init', 'create_blog_cpt', 0 ); 

Displaying all posts by category and showing content on click

I am building a WordPress site for a composer who has written over 200 pieces of music. Each is a custom post (work), organised by a hierarchical custom taxonomy/category (type – being orchestral, vocal, etc).

I need to build a catalogue page in which all works are displayed in lists by type:

Orchestral Works:

  • Work
  • Work

Vocal Works:

  • Work
  • Work

etc.

The user can add categories to the list, so I can’t simply write a query for each category. The catalogue page needs to check the list dynamically.

So far so good. This can be achieved – and sorted the way I need – like this:

<?php     $  cat_terms = get_terms(         array('type'),             array(             'hide_empty' => true,             'orderby' => 'name',             'order' => 'ASC',             'number' => 9999              )         );     if( $  cat_terms ) :     foreach( $  cat_terms as $  term ) :     echo '<h5>'. $  term->name .'</h5>'; ?>  <?php $  args = array(     'post_type' => 'work',     'posts_per_page' => 9999, // Assuming no-one is this prolific     'post_status' => 'publish',     'tax_query' => array(         array(             'taxonomy' => 'type',             'field' => 'slug',             'terms' => $  term->slug,         ),     ),     'ignore_sticky_posts' => true,     'meta_key' => 'date',     'orderby' => 'meta_value',     'order' => 'DESC' );     $  _works = new WP_Query( $  args );         if( $  _works->have_posts() ) :             echo '<table>';                 while( $  _works->have_posts() ) : $  _works->the_post(); ?>                     <tr>                         <td><?php the_field('date'); ?><td><?php the_title(); ?></td>                     </tr>                 <?php endwhile;             echo '</table>';         endif;     wp_reset_postdata();     endforeach;     endif; ?> 

I then need to be able to display the content of the CPT (a small amount of data in a few custom fields) in another div in the same page (and not link out to a single-work.php template as would be more usual). This would be like a tabbed content effect – one posts’ content displayed at a time, chosen from the category-based list on the page.

enter image description here

I could create this second part by loading everything and toggling visibility via jQuery but that would mean loading 200+ posts with the page and making them invisible, which strikes me as a terrible idea.

Is it possible to fetch/load the content of the selected post dynamically on click, so only the posts required are queried beyond the initial list? How would this be handled, and where would I begin with it?

Why my website is not showing up when searched for in Google Maps pack in Google Search

I have a client and we’ve been doing SEO for them since more than the past 6 months now. We’re almost getting them on the first page for target keywords. It’s a local business and, thus, we’re doing Local SEO for them. However, the client is getting impatient. I’ve shown on Google Search Console that their website is showing up on page 1 for target keywords through the maps pack. I was able to achieve this level of reporting by UTM tagging the GMB website URL with:

Source: google Medium: organic Campaign: gmb-listing

This helped me pinpoint page 1 rankings. However, I’m finding it hard to explain to the client that you won’t see the listing all the time.

She searches and does not find the website. I’ve explained that today’s search results are personalised and there are several factors that affect the positions. I googled to look for an explanation of why it does show the impressions in GSC, but, may not show on Google all the time and to everyone.

My issue is that I can’t find resources online to explain to the client why you won’t see the Google Maps result when you search for it although impressions, page 1 (and position 1) ranking and clicks do show in GSC.

Why Google Cache Showing 404 on my React Base Webpages?

My web page is client-side rendered with React. On hitting the cache, it is showing 404 instead of a rendered page.

Example Screenshot enter image description here

When I inspect the Page URL on Search Console, Its parsing and rendering my page properly on Google Index as well as on Live Test.

Example Screenshots enter image description here enter image description here

Why cache page is showing 404? Is the Client-side react is responsible? If not then what is the issue? Or will it be resolved automatically in a few days?

Note It’s my new site which recently goes live in last week.

AWS RDS is showing very high wait/synch/mutex/sql/ values and EXPLAIN statements in performance insights

I’m running a CRON script which checks the database for work and executes anything that needs to be done. It does this across ~500 customers per minute, but we are using AWS RDS with a 16 vCPU machine which, until recently, has been plentiful to keep it happy (normally plugging along under 20%).

This weekend we updated customers to the latest version of the code and implemented some tooling, and since then we’ve started seeing these huge waits: enter image description here

Further I’m seeing that about half of our busiest queries are EXPLAIN statements, somewhere illustrated here: enter image description here

Nowhere in our code base is an "EXPLAIN" performed (though we are using AWS RDS performance insights, ProxySQL and New Relic for monitoring). I did notice that in the past week our number of DB connections was previously baselined around 10 and is now closer to 90. enter image description here

Any ideas on where I should be digging to find the cause of these waits and explain statements? And if they could justify the large number of open connections?

git reflog is showing plain text password used as a secret texts or files in Jenkins

We are using Jenkins Freestyle Project to the push the changes on the remote server. We are executing shell script on remote host using ssh for it. To pull the changes on remote host, we are using origin url with git username and git password. The credentials should not be visible in plain text in the url that’s why we have stored them in variables using ‘secret text(s) or file(s)’ option of ‘Build Environment’.

The git credentials are not visible to the users who are using Jenkins for other projects but the remote server is showing git credentials in plain text. Any user with ssh access of the remote server is able to run the git reflog command in the project directory.

Port 22 cannot be opened on the server where gitlab is deployed so we cannot use ssh keys method to create the build in Jenkins. We can use only http method to pull the changes.

Is there any way so we could implement to avoid showing the git credentials in plain text in the project directory.

ANYDICE – Help with a dice pool showing success against a range of target numbers

I’m having a hard time coding an anydice script to show what I want.

Let me contextualize the mechanic I’m trying to simulate:

You roll a POOL of d10 against a TARGET number. If at least one die from the POOL is equal to or higher than the TARGET, the roll is a success. The count of such dice is the degree of success, but that isn’t my focus at the moment.

I’d like to have a graph for the chances of success of various POOLs of different sizes up to 10 (1d10, 2d10, 3d10…10d10) against different TARGETs from 2 to 10 (2, 3, 4… 10).

The caveat is: I’d like the graph to be layed out in such a way that:

  • the x axis represents the TARGETs;
  • the y axis represents the chances of at least 1 success;
  • each line represents a POOL,

so I can see the chances that each POOL has to succeed against a whole range of TARGETs.

Can any anydice wizard help me with this, please?