Categories
Mastering Development

WordPress Notice: Undefined variable

could someone help me with this. Seems like there are some php errors in my code where the index variable is not set. How could i fix it? About.php Code <?php // Template Name: About ?> <?php get_header();?> <?php if(have_posts()): ?> <?php while(have_posts()): the_post(); ?> <?php $args = array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘page’, […]

Categories
CMS Mastering Development Wordpress

Multiple Search Terms WP_Query

I’ve tried searching to no avail, and it may be that I’m not sure what it is I’m actually searching for. I am trying to use the WP_Query to display a list of posts that contain ANY (not ALL) of the keywords. So, here is my code: <?php $queertionary_index_all = new WP_Query( array( ‘post_type’ => […]

Categories
CMS Mastering Development Wordpress

Problem querying Custom post type by custom fields

I have created a custom post type called jugadores in a wordpress site, this custom post type includes custom meta fields for storing custom fields, this include things like the number of the player, name etc, I would like to use this information y a query that will present all the players in a page […]

Categories
CMS Mastering Development Wordpress

Order is breaking wp_query

Have never encountered anything like this. Running a simple query of custom post types, show only those that the current user is the author, and sort them by a custom meta field. global $current_user; $user = wp_get_current_user(); $args = array( ‘post_type’ => ‘order’, ‘post_status’ => ‘publish’, ‘author’ => $current_user->ID, ‘posts_per_page’ => ‘-1’, ‘meta_query’ => array( […]

Categories
Mastering Development

Exclude a category woocommerce

In my woocommerce website, i display each category in my home page. My category tree is like : Parent category (ID:23) -sub cat -sub cat -sub cat I would like to exclude the parent category Please find my code : <div class="row"> <?php $prod_categories = get_terms( ‘product_cat’, array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘hide_empty’ […]

Categories
CMS Mastering Development Wordpress

Displaying all posts by category and showing content on click

I am building a WordPress site for a composer who has written over 200 pieces of music. Each is a custom post (work), organised by a hierarchical custom taxonomy/category (type – being orchestral, vocal, etc). I need to build a catalogue page in which all works are displayed in lists by type: Orchestral Works: Work […]

Categories
CMS Mastering Development Wordpress

Hide children categories from a WPBakery Widget

My theme comes with an addon plugin that include some visual composer element. They display the products on my homepage, with categories filter. But I want to exclude subcategories products (children). I already tried to add "include_children => false" in what I suppose to be the query, but it has no incidence on the code. […]

Categories
CMS Mastering Development Wordpress

Hide children categories from a WPBakery Widget

My theme comes with an addon plugin that include some visual composer element. They display the products on my homepage, with categories filter. But I want to exclude subcategories products (children). I already tried to add "include_children => false" in what I suppose to be the query, but it has no incidence on the code. […]

Categories
CMS Mastering Development Wordpress

Hide children categories from a WPBakery Widget

My theme comes with an addon plugin that include some visual composer element. They display the products on my homepage, with categories filter. But I want to exclude subcategories products (children). I already tried to add "include_children => false" in what I suppose to be the query, but it has no incidence on the code. […]

Categories
CMS Mastering Development Wordpress

Hide children categories from a WPBakery Widget

My theme comes with an addon plugin that include some visual composer element. They display the products on my homepage, with categories filter. But I want to exclude subcategories products (children). I already tried to add "include_children => false" in what I suppose to be the query, but it has no incidence on the code. […]