Turn off the_content() filter in Layout Visual Editor Cells

Sometimes when you insert a Visual Composer Cell you will see the post body content repeated in each of those Cells.
This is mostyl due to other Plugins applying filters to the_content().

This can be solved with this filter:

apply_filters( 'ddl_apply_the_content_filter_in_cells', true, $this )

Example:

add_filter( 'ddl_apply_the_content_filter_in_cells', 'my_override_to_content_filter' );

function my_override_to_content_filter( $bool, $cell ){
    $content = $cell.get('content');

    if( strpos( $content, 'find me') ){
        $bool = false;
    }

    return $bool;
}

YT and Forum:
https://onthegosystems.myjetbrains.com/youtrack/issue/tssupp-1945
https://wp-types.com/forums/topic/theres-a-bug-when-using-layouts-plugin-with-the-elementor-builder/

List only parent CPT that has childs in a View list

Through wpv_filter_query you can achieve that a View returns only Parent CPT’s which actually have some Childs assigned.

add_filter('wpv_filter_query', 'parent_has_childs_func', 101, 3);

function parent_has_childs_func($query, $view_settings, $view_id) {
 if ( $view_id == XX ) {
  global $wpdb;
  $ids = $wpdb->get_results( "SELECT meta_value FROM wp_postmeta WHERE meta_key = '_wpcf_belongs_city_id'" );
  $query['post__in'] = array($ids);
 }
 return $query;
}

Change the URL of the CPT’s archive

Let’s imagine you have a CPT called “Business” and want to access its archive through mysite.com/businesses. But also access the single page through mysite.com/business/otgsystems. Singular for single page and plural for archive.
You have to open the permalinks page and then save changes.
You can also use Toolset > Post Types > your_post_type > Edit > Options > Rewrite post slug and archive.

function codex_custom_init() {
    $args = array(
      'public' => true,
      'has_archive' => 'businesses'
    );
    register_post_type( 'business', $args );
}
add_action( 'init', 'codex_custom_init' );

Display the data of a term by URL argument

A ShortCode to display the data of a term by URL argument.

function wpv_get_term_by_url_parameter( $atts ) {
    $a = shortcode_atts( array(
        'field' => '',
        'taxonomy' => '',
        'url_parameter' => '',
        'display' => '',
    ), $atts );

    $term = get_term_by($a['field'], $_GET[$a['url_parameter']], $a['taxonomy']);

    return $term->$a['display'];
}
add_shortcode( 'get_term_by_url_parameter', 'wpv_get_term_by_url_parameter' );

Can be used as this:

[get_term_by_url_parameter field="slug" taxonomy="category" url_parameter="country" display="name"]