Custom post type support Post Blocks?

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

Status: not resolved
Viewing 3 reply threads
  • Author
    Posts
    • #17999

      lydogbilde
      Member

      So any iead how to get this to work without having to modify the plugin?
      I have modified it now, but it dosent support CPT, Custom taxonomies, custom query rules etc.

    • #18000

      lydogbilde
      Member

      Yeah , so found this in doc now for the plugin.

      “Note that currently, WP Post Blocks only supports displaying articles from post posttype.”

      Really?

      For others wondering,

      Just go to the plugin.
      Edit /inc/post-block-base.php

      Add your code here

      private function _get_args(){
      			return array(
      				/**
      				 * Category: args
      				 */ 
      				'post_type' => array('CPT', 'CPT1', 'CPT2'),
      				'

      And it will display your custom post types.
      Will find more solutions and post them here.

    • #18002

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #18012

      lydogbilde
      Member

      Hi again 🙂 So i need to add a simple query rule to all queries for post blocks.

      Its simply just ‘post_parent’ => 0,

      So i dont display any child posts on frontpage.

      Do you have any simple funciton or idea how i can achieve this? 🙂
      It didnt work adding it to post-block-base.php like the CPT query.

      Kind regards
      Marius

Viewing 3 reply threads
  • You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

© Copyright 2020 by wpthms.com. All Rights Reserved.