Category "wordpress"

Woocommerce product attributes with hierarchy like categories

Faced the task of making a filter based on the attributes of the product. I need to make a hierarchy of attributes like the product categories. Can this be real

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

I wanted to get the Yoast SEO generated data manually, see example code below This data is being generated by Yoast and automatically add it inside the head ta

Add free product when a certain coupon is applied in WooCommerce

I can add a product to cart, when a certain coupon is used via the woocommerce_applied_coupon hook and the add_to_cart() function add_action('woocommerce_applie

Show/Hide Checkout Fields according to answer to previous question

I use a multi-step checkout plugin. I ask customers if they have allergies, using checkboxes. The first checkbox is none followed by chicken, beef etc. I wish

Add custom post type template via plugin

I'm creating a plugin for a custom post type. I want to add a custom template for it. But I'm not sure how to add it via the plugin. How can I add a custom pos

How do you add custom fields defined in posts to the rest API responses in wordpress

I want to do this without using any sort of plugin since these are both core wordpress features (custom fields and the REST API). Here is the documentation for

How to create a mail counter for each Contact Form 7

I want to count the number of submission received for every contact form. I've tried to use the method of sevenspark adding in functions.php from below link h

advanced custom fields wordpress custom class

I have a custom field in ACF which is a button that I need to change to a different colour based on what page they are on, so for example Page 1 - Button needs

Wordpress 'post_type_link' hides permalink

So I just added a custom post type through the WP-Types plugin, nothing fancy just a custom post type. Now the permalink of this custom post type isn't showing

How to override the slug of ultimate member profile page?

I want to change the default firstname-lastname slug to something different, like firstname-lastname-city-category. How exactly can I do this using ultimate mem

How to set dynamic `home` and `siteurl` in WordPress?

I config the multi-language setting dynamically using the locale filter. Which fetch the sub-domain name to determine the language. function load_custom_langua

WooCommerce "Error processing checkout. Please try again". How do I get more details?

I am writing (actually modifying an existing one) gift card plugin. During checkout, the gift cards are created on a different system through a Web JSON API.

removing strings from a wordpress database

Hey my Wordpress site has been hacked recently and I have no backup. So I need to revert the hack. the hack placed a link in almost every table and field in my

How to redirect to another page after n seconds in wordpress without using javascript?

Following problem: I check a condition for a plugins' page in php and if it's false I want to redirect to another page. With PHP it would simply be: header('

How do I get the name of the file that is being used to render the current page?

Let's say I have a WordPress installation, with a page named "About". If I go to http://example.com/about, I know from WordPress' template hierarchy page that I

Wordpress - Display Posts Newer Than 30 Days

I'm going nuts trying to figure out why I'm having such a difficult time getting WordPress to only show posts newer than 30-days and I could really use a second

Wordpress check if is tag page

Is there a function like is_single for the tag page? something like is_tag?I need to do an if statement and something like this will be usefull. Thanks

How can I use serialized data in Gutenberg?

I am trying to create a Sidebar plugin that stores post meta to be used on the front end. Without getting into the unnecessary details, I need to store all the

Contact Form 7 mails are being marked like spam

All the mails sent from a Contact Form 7 form are being marked by gmail as spam. A hint: I looked at the option "Show Original" and I found stuff like this:

Line Spacing for Individual Fonts

I'm using custom fonts in WordPress. I do it by defining font family. I'm having problem if line spacing with One if my fonts. If I use line-height code in my