How to display the custom post related blog by category?

I don’t know below code is the best code but it’s solved my issues function relatedBlogPost($atts){ global $post; //this the the custom post type $args_cat = array( ‘taxonomy’ => ‘blogs_cat’, ‘orderby’ => ‘name’, ‘show_count’ => 1, ‘pad_counts’ => 1, ‘hierarchical’ => 1, ‘echo’ => 0 ); $categories = get_the_terms($post->ID, “blogs_cat”); // getting the category id … Read more

Critical Error message of WordPress adming

If you can access your dashboard, deactivate all the plugins and activate it one by one, and check your website. If you are not able to access your WP Dashboard because of this error. Go to your hosting Cpanel > File Manager > Public_html > wp-content, rename the plugin folder, and then check your website. … Read more

reminder wp_schedule_event

It’s because your code is explicitly written to ignore whether or not the event is in the past or the future. See here: $diff = strtotime($my_meta) – strtotime($datetime2); If the event date is in the future, $diff will be a positive number, but if it’s in the past, it will be a negative number. Then … Read more