Documentation / Tutorials / Awesome Enterprise

How to fetch posts by post builder

/ Awesome Enterprise / How to fetch posts by post builder

To fetch the posts by post builder query use the db.post-builder.get_data shortcode

Examples:

  1. basic query:
  2. [arr.create set="module.db_params"]
      [post_type]event[/post_type]
      [posts_per_page]12[/posts_per_page]
    [/arr.create]
    [db.post-builder.get_data args="{module.db_params}" set="module.result_event" /]
  3. Post Builder with single meta field:
  4. [arr.create set="module.db_params"]
      [post_type]event[/post_type]
      [posts_per_page]12[/posts_per_page]
      [single_meta]
      	[event_end_time]
        	[value][php.date p1="Y-m-d g:i:s" /][/value]
      		[compare]>[/compare]
            [type]DATETIME[/type]
        [/event_end_time]
      [/single_meta]
    [/arr.create]
    [db.post-builder.get_data args="{module.db_params}" set="module.result_event" /]
Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *