Viewing 5 replies - 1 through 5 (of 5 total)
  • Eduard

    (@cteduard)

    Hey @mrskt00

    By looking at the website it seems that you’re a Blocksy Pro user. Unfortunately, these forums are only for our free users, so I would like to invite you to submit a support ticket here — https://creativethemes.com/blocksy/support/. We like to keep things on track and organised and it would be an immense help if you could use our website above.

    Thanks a lot!

    Thread Starter Mrskt

    (@mrskt00)

    I found this problem happened from this code

    
    add_action('pre_get_posts', 'add_my_custom_post_type');
    
    /**
     * @param WP_Query $query
     * @return WP_Query
     */
    function add_my_custom_post_type($query) {
        if(
            empty($query->query['post_type'])
            or $query->query['post_type'] === 'post'
            and !is_admin()
        ){
           $query->set('post_type', array('post', 'tutorial', 'review', 'collection'));
        }
    }
    

    Which I was inserted in blocksy child theme, can you give any solution?

    Eduard

    (@cteduard)

    Hello @mrskt00

    Sorry, but we do not give out support for custom code.

    Looking at the code, it seems that you’re trying to add a custom post type. I would recommend using one the tried and true plugins, such as CPT UI or Metabox to achieve this. This should work much smoother.

    Thanks.

    Thread Starter Mrskt

    (@mrskt00)

    Hi @cteduard , No I am using this custom code only to Display some custom post types in homepage.

    Is there anyway to Not Run That Custom Code in Pages?

    Eduard

    (@cteduard)

    Again, sorry but we are not offering support for custom code. This is our policy. You’re better off hiring a developer to debug custom code. Also, I tested your code with other themes and it breaks them as well, so it is clearly an issue with it and not with Blocksy.

    Why are you using custom code to display posts on the homepage, exactly? [blocksy_posts] already has this function built in — https://creativethemes.com/blocksy/docs/developers-general-developers/blocksy-posts-shortcode/

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Page not Found Error on My All Pages’ is closed to new replies.