Is there a widget that can display a certain Custom Post Type Terms?

I have build, some time before a widget, Also you can set the number of posts, the category and the order! <?php /****** Widget ******/ class Artdev_Category_Posts extends WP_Widget { function Artdev_Category_Posts() { $widget_ops = array(‘description’ => ‘Add Selected Category Posts to the Sidebar’ ); parent::WP_Widget(false, __(‘&rarr; Category List’, ‘artdev’),$widget_ops); } function widget($args, $instance) { … Read more

Custom Taxonomy order by Custom Field

Ok so after posting the question an option to view another similar question appeared. So here is the answer if somebody is trying to do the same thing. //Using WordPress Pre-Get filter to order the custom taxonomy by custom field function customize_customtaxonomy_archive_display ( $query ) { if (($query->is_main_query()) && (is_tax(‘custom-taxonomy’))) $query->set( ‘post_type’, ‘your-post-type’ ); $query->set( … Read more

WPMU: Programmatically adding CPT posts to specific blog id

I finally found the answer myself. It’s two parts: I need the global $switched to be defined. The variable for blog id can’t be $blog_id because that’s reserved. The above code should thus be the following. require_once( “../wp-load.php” ); global $switched; $blog_id_target = 2; switch_to_blog($blog_id_target); $lang = ‘en’; $new_pr = wp_insert_post( array( ‘post_author’ => 1, … Read more

The editor has encountered an unexpected error. // TypeError: Cannot read property ‘prefix’ of null

So, I was researching this topic a bit deeper. All answers found on this SE suggested disabling Gutenberg with a plugin. This couldn’t be a valid “fix” in my oppinion. After researching and browsing through the git issues of WordPress/gutenberg I’ve found a pretty easy solution for this problem. The user joshuafredrickson on the git … Read more