Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25183

    Hi There!

    So I created a custom content element for a Custom Post Type I created called “News”. I did this by copying and pasting “enfold/config-templatebuilder/avia-shortcodes/blog.php” and creating a copy called “enfold/config-templatebuilder/avia-shortcodes/news.php”, and have set it up so it displays posts with the Custom Post Type called “News”.

    I am able to see, use and edit the Custom Content Element in the Avia Layout Builder and it works (for the most part) as expected.

    However, I cannot set the “Blog Style” to “Grid Layout” and have it work properly. Doing so recalls the first Blog post, and then proceeds to recall the rest of the Posts with Custom Post Type “News”. Assigning any other “Blog Style” value makes it so that the Content Element recalls all Posts from Custom Post Type “News”, which is what is supposed to happen.

    Why would changing the Blog Style affect which Post Types get called by the Content Element? How can I fix this issue?

    #126057

    Actually the blog element & the post slider element (used for the grid) just support “taxonomies” and they won’t take care of the custom post type. I’d recommend to create a custom taxonomy for your custom post type (eg call it news_entries) and then you can use the $atts variable

    $atts['taxonomy']  = 'news_entries';

    to query just the posts which are assigned to the news_entries taxonomy.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Custom Content Element not working in Grid View’ is closed to new replies.