Categories
CMS Mastering Development Wordpress

How to change this WP_Query to get all ProductIDs and not only specific one?

I am using plugin FooEvents and want to export tickets attendees. But in the core files of the plugin, the export is only possible for 1 specific product. So if I want to export attendees for ticket “Startups” I need to do that from the edit product page and only tickets for “Startups” get exported. […]

Categories
CMS Mastering Development Wordpress

WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC

I’m trying to set up a query for an “event” custom post type that groups posts by year, with a heading for each year, in descending order; then, for each year group, ordered by date in ascending order like so: 2020 Jan 1, 2020 Feb 1, 2020 Mar 1, 2020 2019 Jan 1, 2019 Feb […]

Categories
CMS Mastering Development Wordpress

update post every day

I’m trying to update the post information every 24 hours, and I don’t know why this is not working? public function add_g2a_product() { $product = array( ‘post_content’ => $_POST[‘description’], ‘post_name’ => $_POST[‘name’], ‘post_title’ => $_POST[‘name’], /*’post_excerpt’ => excerpt($_POST[‘description’]),*/ ‘post_status’ => ‘publish’, ‘post_type’ => ‘product’, ‘post_author’ => 1 ); $product_id = wp_insert_post( $product ); add_post_meta( $product_id, […]

Categories
CMS Mastering Development Wordpress

Multiple Loops In Tabs Only Displaying First Loop

I’ve browsed all the other questions that could be related to this and still can’t find the answer. My code is only displaying the results of the loop in the first tab, but won’t show it in the second tab. Can’t figure out why. See code below: <div class=”tab-panels”> <div class=”panel entry-content active” id=”tab_all-lines”> <!– […]

Categories
CMS Mastering Development Wordpress

WP_Query inside foreach loop returning same value for all options when filtered using ajax

I am trying to build a timetable to display classes by time. I have a taxonomy of Day, which I am looping over to create a column for each day of the week. In side the column is a WP_Query which filters using the day taxonomy and meta_key classes_entry_start_time to orderby meta_value_num. The timetable is […]

Categories
CMS Mastering Development Wordpress

How can I use wp_query to show all product attributes using just the products ID?

While on a product page (product 1), I am trying to pull through information about a different relevant product (product 2). To create a kind of ‘you may also like’ list of products. I am trying the simplest of WP_Query but cannot figure out how to pull through all the product attributes from one product […]

Categories
CMS Mastering Development Wordpress

Custom Post Type Slick Slider “$ is not a function”

I’m trying to create a slider with my custom post type rt_testimonial. I believed I had everything setup but I’m getting an error in console: TypeError: $ is not a function Here’s what I did: In my mu-plugins folder in a my_functions.php I created a post type rt_testimonial. (this part is working) In my mu-plugins […]

Categories
CMS Mastering Development Wordpress

How can I use wp_query to show all product attributes using just the products ID?

While on a product page (product 1), I am trying to pull through information about a different relevant product (product 2). To create a kind of ‘you may also like’ list of products. I am trying the simplest of WP_Query but cannot figure out how to pull through all the product attributes from one product […]

Categories
CMS Mastering Development Wordpress

Where is the coding error for the unexpected ‘}’ in this if / else choice of loops?

an unexpected ‘}’ is reported for } else { <?php function mg_get_selected_taxonomy_dropdown_term() { return isset( $_GET[ ‘state’ ] ) && $_GET[ ‘state’ ] ? sanitize_text_field( $_GET[ ‘state’ ] ) : ”; } $selected_term = mg_get_selected_taxonomy_dropdown_term(); $states = get_terms(‘state’); $i = 0; if ($selected_term != “ALL”) { foreach ( $states as $state ) : $doctors = […]

Categories
CMS Mastering Development Wordpress

Show custom post type event if current day using ACF

The following code pulls events from a custom post type that used Advanced Custom Fields, that is shown on an event listing page. It shows upcoming events as desired except when the event is on the current day. So if an event’s start day was today it doesn’t show. For compare it had ‘>’ and […]