Category "wordpress"

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

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

Private Notes In Woocommerce Order List

We add our own production numbers in private notes and it would be really handy if we could show these private notes on the order list under a new column, searc

Add custom CSS class to "add to cart" button on WooCommerce shop and archives pages based on certain condition

I am trying to disable "add to cart" button on WooCommerce shop and archives pages if product's quantity stock is zero or less. I don't want to hide it so I cam

how do i retrieve and display the alt text of an image in wordpress?

how do i retrieve and display the alt text of an image in wordpress? trying to substitute the title for the alt. here is the original code. <?php while ( ha