Categories
CMS Mastering Development Wordpress

How to exclude woocommerece product category in search results?

I’m looking for a way to exclude a product category from search results with Woocommerce using the pre_get_posts action and $query->set(). I am searching using the WordPress ?s=keyword search. I know that the function will begin like this: add_action(‘pre_get_posts’, ‘exclude_product_category’); function exclude_product_category( $query ) { global $wp_the_query; if ( ( ! is_admin() ) && ( […]

Categories
CMS Magento Mastering Development

Magento 2 Grid Add column with href and hash tag

i want to show url in grid with hash tag below it currently used , is there way to hash tag in end $this->addColumn( ‘edit’, [ ‘header’ => __(‘Download’), ‘type’ => ‘action’, ‘getter’ => ‘getId’, ‘actions’ => [ [ ‘caption’ => __(‘Download’), ‘url’ => [ ‘base’ => ‘*/*/edit’,’downwww’ => ‘ds’ ], ‘field’ => ‘id’ ] […]

Categories
CMS Drupal Mastering Development

Issue in custom view

I ‘m facing issue in custom modul in drupal8. “SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘FROM first_view_table first_view_table LIMIT 11 OFFSET 0’ at line 1: SELECT FROM {first_view_table} first_view_table […]

Categories
CMS Drupal Mastering Development

Issue in custom view

I ‘m facing issue in custom modul in drupal8. “SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘FROM first_view_table first_view_table LIMIT 11 OFFSET 0’ at line 1: SELECT FROM {first_view_table} first_view_table […]

Categories
CMS Drupal Mastering Development

Issue in custom view

I ‘m facing issue in custom modul in drupal8. “SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘FROM first_view_table first_view_table LIMIT 11 OFFSET 0’ at line 1: SELECT FROM {first_view_table} first_view_table […]

Categories
CMS Mastering Development Wordpress

Issue with WordPress AJAX Filtering breaking links on frontend

I’ve been using AJAX taxonomy/post filtering for the past week and just noticed something really strange upon further testing. When you select the filter criteria and click FILTER, it populates the proper posts; however, a random mix of the content that is populated has broken links in there custom metadata. Example: When you visit the […]

Categories
Mastering Development

react-admin useGetOne not working as expected

In react-admin there is a option to use useGetOne hook, to fetch one record, example as below import { useGetOne } from ‘react-admin’; const UserProfile = () => { const userId = 10; const { data, loaded, error } = useGetOne(‘users’, userId); if (!loaded) return “NOT LOADED…”; if (error) return “ERROR”; if (!data) return “NO […]

Categories
CMS Mastering Development Wordpress

How do I match a current post category slug with a custom taxonomy term to display the custom post which is in that custom taxonomy term?

I currently have a custom loop which is placed in single.php, this gets a post from a custom post type called ‘game’ by tag and matches it to the tag of the current post, so if the current post has a tag of “God of War” it gets the game from the custom post type […]

Categories
CMS Mastering Development Wordpress

wp_query is showing posts from other categories

I am trying to make a custom loop that will display the latest 5 posts from select categories, all using a single query. I want the loop to display the category name followed by the 5 posts, and then the next category, etc. I followed this answer and it seems to do what I want, […]

Categories
CMS Mastering Development Wordpress

How to query to return custom post types with categories and custom taxonomy?

The following query is in a function used to filter posts based on user selection on the front-end. This site has blog feeds(CPT) by different authors that users can select to show by choosing any combination of blog feed, region and/or category. Each feed also has an associated category and region. For example, ‘Blog Feed […]