wp_set_object_terms() not adding new term to custom post and custom taxonomy

I am creating a custom post type with custom taxonomies while submitting front-end form for custom post it is creating a post but it is not creating new taxonomies which I have already set just need to add custom taxonomy <form action= » method= »post » id= »drop_message »> <div class= »input-group »> <div class= »first »> <label for= »first-name-opt »>First Name:</label> <input type= »text » name= »name » id= »name » placeholder= »John Doe » class= »tag-msg »> </div> <div class= »middle »> <label for= »email »>Email:</label> <input type= »email » name= »email » id= »email » placeholder= »johndoe@xyz.com » class= »tag-msg »> </div> <div class= »last »> <label for= »birthdate »>Date Of Birth:</label> <input type= »text » name= »birthdate » id= »birthdate » placeholder= »DD – MM – YYYY » class= »tag-msg »> </div> <div class= »submit »> <input…

Change the number of plugins counted on wp-admin/plugins.php

I have successfully hidden my plugin from the plugins page using $wp_list_table however the pagination at the top still lists plugins as ‘All (3)’ etc. I managed to successfully alter the $wp_list_table array of _pagination_args = total_items. But it was still rendering Plugins – ‘All (3)’ at the top of the page. Any ideas on how I can fix this? I have found WP_Plugins_List_Table::prepare_items() has a global $totals variable but I am unsure of how I would change this, Inside this function it has $totals = array(); foreach ( $plugins…

style.css of my custom theme is not being applied at all

I am creating my own theme WordPress, however the CSS I wrote for the theme design is not being applied at all. It’s saved in style.css and I have applied the following in my functions.php file: function letters_files() { wp_enqueue_style(‘style’,get_stylesheet_uri(),NULL, microtime() ); wp_enqueue_style(‘custom-google-fonts’, ‘https://fonts.googleapis.com/css?family=Amatic+SC|Comfortaa|Cutive+Mono|Dancing+Script|Open+Sans|Roboto’); } add_action(‘wp_enqueue_scrips’,’letters_files’); function letters_features() { add_theme_support(‘title-tag’); register_nav_menu(‘FloatingHeaderMenu’, ‘Floating Header Menu’); register_nav_menu(‘footerLocationOne’, ‘Footer Nav Menu (Footer Menu 1)’); register_nav_menu(‘footerLocationTwo’, ‘Legal Footer Menu (Footer Menu 2)’); } add_action(‘after_setup_theme’, ‘letters_features’); To make sure that the CSS itself isn’t the problem, I have stripped down style.css to something simple to…

The CSS (style.css) Of My Custom Theme Is Not Being Applied At All

I am creating my own theme WordPress, however the CSS I wrote for the theme design is not being applied at all. It’s saved in style.css and I have applied the following in my functions.php file: <?php function letters_files() { wp_enqueue_style(‘style’,get_stylesheet_uri(),NULL, microtime() ); wp_enqueue_style(‘custom-google-fonts’, ‘https://fonts.googleapis.com/css?family=Amatic+SC|Comfortaa|Cutive+Mono|Dancing+Script|Open+Sans|Roboto’); } add_action(‘wp_enqueue_scrips’,’letters_files’); function letters_features() { add_theme_support(‘title-tag’); register_nav_menu(‘FloatingHeaderMenu’, ‘Floating Header Menu’); register_nav_menu(‘footerLocationOne’, ‘Footer Nav Menu (Footer Menu 1)’); register_nav_menu(‘footerLocationTwo’, ‘Legal Footer Menu (Footer Menu 2)’); } add_action(‘after_setup_theme’, ‘letters_features’); ?> To make sure that the CSS itself isn’t the problem, I have stripped down style.css to something…

Add Button to Bottom of Mobile Menu

How to add a button to the bottom of the Mobile Menu. The way I’m currently implementing it, I’m using the last item on the Menu as my Button(after styling it with CSS) Have made it position Absolute and made the height of Mobile 100vh Now on different browsers(Safari/Chrome/Firefox) & different mobiles(iPhone/Android) the actual viewable screen size is different than the Device Screen Height (100vh) So I have set the Bottom value of the Bottom button with an offset of 131px. However, this is giving me a white gap after…

Woocommerce auto cancel On-Hold after X days

I have searched high and low but with no resolve. So we developed a custom « bacs » type gateway for our site. Here in Brazil you can pay via a bank billet. The billet usually has an expiration date for payment (around 7 days). So when a person goes through check-out the gateway sends the billet to our customer and he has to pay until the expiring date. Since this is an offline payment, the order status goes to « on-hold ». What I have been looking for is a way to specify…

WP_Query: include custom post type only with specific meta value

I have the following arguments for a WP_Query: $args = array( ‘post_type’ => array( ‘cpt-1’, ‘cpt-2’ ), ‘post_status’ => ‘publish’, ‘posts_per_page’ => 9, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘key-1’, ‘compare’ => ‘NOT EXISTS’ ), array( ‘key’ => ‘key-1’, ‘value’ => 1, ‘compare’ => ‘!=’ ) ), ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘ctax-1’, ‘field’ => ‘slug’, ‘terms’ => ‘term-1’, ‘operator’ => ‘NOT IN’ ), array( ‘taxonomy’ => ‘ctax-2’, ‘field’ => ‘slug’, ‘terms’ => ‘term-2’, ‘operator’ => ‘NOT IN’ ) ), ); Now I…

Web Design Weekly #308

Headlines CSS Grid for UI Layouts Josh Marinacci shows us how to use CSS Grid to improve application layouts that need to respond and adapt to user interactions and changing conditions, and always have your panels scroll properly. (mozilla.org) Chrome 68, Chrome will mark all HTTP sites as “not secure” (googleblog.com) Sponsor Web Design Weekly and reach over 27,822 passionate designers and developers Articles Evolving Patterns in React A look at some of the patterns that are emerging in the React ecosystem. These patterns improve readability, code clarity, and push…

Menu Custom Data Attributes

I’m trying to add a custom data attribute to the <a> element. What I’m trying to do is integrate the navigation effect in this CodePen I can do all the CSS but I need to add the HTML part such as below: <ul class= »snip1226″> <li class= »current »><a href= »# » data-hover= »Home »>Home</a></li> <li><a href= »# » data-hover= »About Us »>About Us</a></li> <li><a href= »# » data-hover= »Blog »>Blog</a></li> <li><a href= »# » data-hover= »Services »>Services</a></li> <li><a href= »# » data-hover= »Products »>Products</a></li> <li><a href= »# » data-hover= »Contact »>Contact</a></li> </ul> How and where would I add this into WordPress? What would I need to edit to add this HTML functionally? Thanks, Harvey Source:…

How to upload post thumbnail while wp_insert_post?

I am trying post submit on front end. All works without thumbnail uploading and setting. Here is my html form. <form method= »post » action= » »> <input type= »text » name= »title »> <textarea name= »content »></textarea> <input type= »file » name= »thumbnail »> <input type= »submit » name= »submit »> </form> And here is my php code. <?php if (isset($_POST[‘submit’])) { global $wpdb; require_once ABSPATH . ‘wp-admin/includes/image.php’; require_once ABSPATH . ‘wp-admin/includes/file.php’; require_once ABSPATH . ‘wp-admin/includes/media.php’; $title = $_POST[‘title’]; $content = $_POST[‘content’]; # Set Post $new_post = array( ‘post_title’ => $title, ‘post_content’ => $content, ‘post_status’ => ‘pending’, ‘post_type’ => ‘post’, ); $post_id = wp_insert_post($new_post); # Set Thumbnail…