WP_Query for custom post type and category_id not working

category__in is used for built-in post categories, not for custom taxonomies. You can try something like this: $args = array( ‘post_type’ => ‘tribe_events’, ‘meta_query’ => array( array( ‘key’ => ‘_EventStartDate’, ‘value’ => array( $start_date, $end_date ), ‘compare’ => ‘BETWEEN’, ‘type’ => ‘DATE’ ) ), ‘tax_query’ => array( array( ‘taxonomy’ => ‘tribe_events_cat’, ‘field’ => ‘term_id’, ‘terms’ … Read more

Import Instagram post to WordPress blog post

I’m not currently aware of other ways rather then: Creating an Instagram App Get an access token Build a small API handler Something like this to put in your functions.php: function my_instagram() { $transient_key = ‘instagram_data’; $feed_data = get_transient( $transient_key ); if( false === $feed_data ) { $feed_data = json_decode(file_get_contents(‘https://api.instagram.com/v1/users/self/media/recent/?access_token=<ACCESS_TOKEN>&count=4’)); if ( is_array( $feed_data->data ) … Read more

What is a rock solid development and deployment workflow? [closed]

Have a look at trellis and bedrock at https://roots.io/, it’s open source. Bedrock allows you to manage wordpress plugins via composer. Trellis is a tool to get you a development and production environment, with ensuring that they behave the same, including deployment workflow. They even explain the Twelve-Factor App methodology, how it relates to WordPress … Read more

How to add apply_filter for a class property in plugin

Your problem has nothing to do with apply_filters, it’s a basic PHP mistake: public function init (){ $filter_fields = apply_filters(‘tbg_reg_fields’, $this->fields); } Here, you create a brand new variable in the init method scope named $filter_fields, then never use it. $this->filter_fields and $filter_fields are not the same. Additionally, because you used a filter and stored … Read more

custom post type don’t appear in the home page

Find functions.php in your theme and add this code: function add_custom_pt( $query ) { if ( !is_admin() && $query->is_main_query() ) { $query->set( ‘post_type’, array( ‘post’, ‘cptslug1’, ‘cptslug2’ ) ); } } add_action( ‘pre_get_posts’, ‘add_custom_pt’ ); Change array values to match your post type slugs (add as many as you need), but keep ‘post’.

How do I automatically generate pages from a database?

Yours is a more general question, so I’ll offer some general comments. There are WordPress plugins such as TablePress (https://tablepress.org) that do a nice job displaying data on a WordPress page. The individual data points can be made linkable to another page, as needed. This is, likely, a custom solution, meaning, a developer could help … Read more

WordPress Users authentication with Java Application

any other way in WordPress side to configure external user authentication but without developing anything? No. The only authentication WordPress provides out of the box is cookie based authentication. There are however plugin based solutions, specifically ones that rely on widely accepted standards that aren’t unique to WordPress. These implement standardised authentication protocols such as: … Read more