Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #456755

    I have 3 kind of posts:
    – Posts (default one)
    – Software
    – Works

    When I ichoose a blog display I get posts news inside the blog, but not from my custom post types (software and works)
    From avia builder I can choose categories or taxonomy, but I can’t get any entry from my custom post types.
    Could it be done some litle hack to choose my custom post type for the blog? Which files should I look into?

    Currently I’ve used page templates. I’ve made a new one from template_archives.php but I feel it’s like working all from scratch.

    Any kind of information, guidance would be really appreciated.

    #457095

    Hey!

    Try adding this at the very end of your theme / child theme functions.php file:

    add_theme_support('avia_template_builder_custom_post_type_grid');
    add_theme_support('add_avia_builder_post_type_option');
    

    Cheers!
    Josue

    #457582

    Thank you, it works!

    Another cuestion related to my custom types:
    I have several taxonomies for software: age, type of licence…
    By default I would like to show all the sofware (I need to choose one taxonomy, so I choose one and mark all the values in order to appear in the blog).
    Is there any way I can filter posts by taxonomy inside my blog page? Should i modify function query_entries($params) in blog.php?

    Thank you very much again!

    #458084

    Hi!

    There’s a hook that filters the query:

    add_filter('avia_blog_post_query', function($query, $params) {
    	// play with $query here
            return $query;
    }, 10, 2);
    

    Cheers!
    Josue

    #459323

    Thank you Josue,
    But I don’t get it….
    I can add the filter, but my query depends on some parameters (dropdown menus) in order to do the filter.
    As the dropdown menu involves php code, I don’t know where to insert it. Should I had a new shortcode to config-template-builder/avia-shortcodes?

    #459704
    #459964

    Thank you Josue,
    But what I don’t get is how to put php code for my filter:
    As my dropdown menu involves php code in order to select the taxonomies, should I insert the code directly in a text block with some php plugin?

    #459979

    Hi,

    Can you post the link to your website so we can get some context? an admin account would be helpful too.

    Regards,
    Josue

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.