All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
960 views

Filter media library by custom postmeta

I am using ACF plugin. I created a select field custom_select on ACF that is included to every attachment. ACF writes these values in the postmeta table. I now want to filter my attachments in my ...
0 votes
0 answers
25 views

Display featured posts first, then display all others within a specific category in WordPress

I want to display featured posts first, then all other posts not marked as featured on a category archive page. I am using a plugin that has functionality to mark posts as featured. I have figured out ...
0 votes
1 answer
657 views

permalinks constantly needs re-saving

I have my WP running on an Nginx environment, with Wordfence, WP Rocket, and Search&Filter plugins installed (along with some others). Permalinks are working just fine, except /search permalink ...
0 votes
0 answers
6 views

How hide attribute in woocommerce cart? [closed]

Does anyone know how to remove product attributes with variants from the cart and order? I found and tried this code but it doesn't work add_filter( '...
1 vote
2 answers
714 views

Wordpress uploads autocreate folder every month

In start of every month WP creating folder with month number, like /uploads/2019/11, and it's creating with ROOT, so I dont have permission to write it. If I delete it, and then it's creating when I ...
0 votes
1 answer
937 views

WordPress Search Ajax + Isotope + InfiniteScroll

Custom Ajax Search filter for WordPress Search I want to give a complete breakdown so you can easily analyse the problem and see that the issue is nowhere else, but the JavaScript. If you are not new ...
0 votes
0 answers
16 views

Created snippets via chatgpt of discount based on selected payment gateway.It is working but my setting or dashboard page looks like this.Kindly help [closed]

class Payment_Gateway_Discounts { public function __construct() { // Register the settings add_action('admin_init', array($this, 'register_payment_gateway_discount_settings')); ...
0 votes
1 answer
761 views

the_category if/else statement

I need to do the following: The sense if I have a class dportfolio - show a category dportfolio. Otherwise show usual category. I use: if ( class_exists( 'DPortfolio' ) ) { echo DPortfolio::...
0 votes
1 answer
2k views

remove_action() hook not working

On my child theme, I created this: remove_action('woocommerce_single_product_summary','woocommerce_template_single_excerpt',20); add_action('woocommerce_single_product_summary', '...
0 votes
1 answer
739 views

Contact form 7 ajax response true/false based on some condtion

I want to integrate custom logic after submit form. I want to store contact form data in the custom table, if data is stored then the response would be true otherwise false. I am using ...
0 votes
3 answers
783 views

How can I list all slugs categories?

I need to list all slug categories from a taxonomy portfolio_category. Like this: the_terms( get_the_ID(), 'portfolio_category', '', ', ' ); This returns categories from a single portfolio. I want ...
0 votes
0 answers
14 views

Wordpress site is not loading properly ( showing a min-page)

I hope you are doing well, yesterday I was adding new products, deleting some of the categories, and uploading photos, and then I checked my changes but suddenly the website was not loading properly ...
0 votes
0 answers
8 views

UABB Advanced Tabs

Does anyone have experience customizing Advanced Tabs module from UABB (Ultimate Add On Beaver Builder) plug? I have set the Active color using the plugin but I would like each tab to have a different ...
1 vote
1 answer
758 views

Meta inserted through wp_insert_post gets messed up

I'm extending the Woocommerce Product CSV Import functionality to import more data. I'm inserting a CPT with 2 metadata, a string (URL) and a bool, and the post_meta inserted gets messed up. It ...
1 vote
1 answer
7k views

How to add widget in main menu

I want to display widgets in main menu. There are few plugins to do this and i already used in my previous projects. But now i want do without any plugin. I can create a custom sidebar and call this ...
0 votes
1 answer
904 views

Use WP_Query for custom post type but result get empty

When I am using this code on my plugin page, I'm getting empty array but not the required result. What's wrong with this code? $defaults_arr = array( 'post_type' => 'at-subscription', '...
0 votes
2 answers
127 views

Critical error after updating my wordpress

I wanted to update my site to latest wp version but during update first it said : “Briefly unavailable for scheduled maintenance. Check back in a minute.” which went on for several minutes… And now it ...
12 votes
5 answers
13k views

Suppress deprecated notices

When I use: define('WP_DEBUG', 1); In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices. My understanding is that adding this: ...
1 vote
1 answer
673 views

How can I update an ACF field in a repeater on post save?

Using Advanced Custom Fields, I have a repeater field (domain_assets), within which I have two text fields (registered_domain & ssl_expiration), and a sub repeater field (service). I'm trying to ...
1 vote
2 answers
878 views

template_include filter does not render the custom template

I created a plugin that will render a shortcode that is entered to a page. This Shortcode shall override the theme's page template and use the one that I included on the plugin Here's my code: api....
0 votes
1 answer
2k views

Get all uploaded images using REST api

I need to get all the images that are uploaded in my wordpress installation using the REST API. I've tried using the wp-json/wp/v2/media endpoint but it will give me only the last 10 images uploaded ...
0 votes
2 answers
9k views

Removing Product from Woocommerce checkout page using Ajax

I have added remove button for products in the checkout page. The code - function add_delete( $product_title, $cart_item, $cart_item_key ) { if ( is_checkout() ) { /* Get Cart of the ...
2 votes
1 answer
662 views

How to get all functions with priority '1' attached to hook 'wp_head'

How to get (loop through to disable unnecessary) all functions with priority '1' attached to hook 'wp_head' ('_wp_render_title_tag', 'wp_enqueue_scripts', 'noindex' etc.)? It is necessary to get it ...
0 votes
0 answers
9 views

Site1 wordpress website redirect to other site2 in my same server

I am using Alibaba Cloud Server Ubuntu 18.04 and control panel is VestaCP. I have got a WordPress website www.site1.com . However, after I install SSL via really simple ssl plugin. Now, I cannot ...
0 votes
1 answer
863 views

Use WP_query to match post types based on custom field values

i'm trying to query posts from the post type Product that match with the current post in the loop from the post type Item, based on the custom fields product-ean and item-ean. For example: i have a ...
0 votes
0 answers
6 views

Add a new menu selector element into WordPress nav-menus.php

How to build a custom menu selection element in the Menu admin (nav-menus.php) section of WordPress similar to how custom Posttypes/Taxonomies are automatically added in when created and then users ...
1 vote
1 answer
681 views

Saving Custom Field Data before Publish

When creating a page or a post WordPress lets the content (title, body, featured image) be saved when using Ctrl + S. The Custom Fields do not save in the same way (in this case I'm using Advanced ...
1 vote
1 answer
7k views

403 error rest_'cookie_invalid_nonce' on API Request

I'm currently developing a Plugin in which I'm in need of retrieving information from a third-party plugin API. To authenticate my users, I am trying to use the vanilla authentication via cookie as ...
0 votes
1 answer
1k views

Rename image filename using 'media_handle_upload'

I need to rename images uploaded by the user when they post on my site. I have a code that works perfectly to save the image and make it part of the post. But I want the images to be renamed to have ...
0 votes
1 answer
665 views

How to insert category to post via php?

I can't get this to work. I have a page where users can submit their posts. There, ideally I want to show all the categories and let them choose via a dropdown the category to assign the post. I ...
2 votes
1 answer
1k views

Saving data from block editor to the database

I'm developing a wordpress plugin and looking to save data entered in a block to a mySQL table. That's it. But how can data be sent from the block editor to the server side? I've spent two weeks ...
0 votes
1 answer
2k views

How to Access wp_usermeta Data Immediately After a New User is Created

I am trying to find a WordPress action hook that will allow me to access a new user's wp_usermeta information, immediately after the user has been created. In our registration process, custom fields ...
1 vote
1 answer
5k views

Display related products with custom output

I'm trying to display the related products with my custom html output, unfortunately i'm kind of lost on how to do this. The WP_Query below displays the products that are in stock, what i want is to ...
1 vote
2 answers
792 views

Get list of all custom tanonomy id

I created a custom taxonomy called Location then added New Jersey, New York, etc. Is there a Wordpress function that will get the list of all ids under the Location similar to what ...
0 votes
1 answer
1k views

How to add woocommerce product price filter widget to other page

I had actually customise page ( which totally override by Attribute page template type), And I want this page attche woocommerce widget "Filter product by price" As I add shortcode: [...
1 vote
1 answer
264 views

Trouble Finding Error Logs in wp-env

New to wp-env, which is mostly a fantastic dev tool. { "plugins": ["./blinkwellness-mindbody"], "config": { "WP_DEBUG": true, "WP_DEBUG_LOG&...
0 votes
1 answer
663 views

How to use query parameters, as "_fields", to filter data inside an array in the REST API?

How to handle this endpoint /wp-json/wc/v3/products/?_fields=name,meta_data [ { "name": "Test", "meta_data": [ { "...
1 vote
1 answer
311 views

How to use get_post_type_archive_link for a given language?

I try to use get_post_type_archive_link function to retrieve the archives url of a post type but I need to do so for a specific language. Is there a way to achieve this? Is it possible to set the ...
0 votes
1 answer
17 views

Override theme hamburger menu to work without javascript (noscript)

What wordpress hooks can be used to override how the primary menu is displayed in my wordpress header's navigation menu -- ideally in a way that will work cross-theme. I need to build a wordpress ...
0 votes
1 answer
885 views

Wordpress display only child category in template

I have a blog with 1 parent category and 3 child subcategories. For technical reasons, in the backoffice, when I write an article, I have to check the parent AND the child category. In every article, ...
0 votes
0 answers
14 views

Restore Accidentally Deleted Menu in WordPress [closed]

I was adding new pages to the main menu of my multilingual WordPress website using the Groovy Mega Menu plugin. While I was adding new pages in the Appearance section, my page suddenly refreshed and ...
0 votes
1 answer
750 views

Random 404 on any page

I just used Softaculous to install WP on my shared host. When configuring my site, whether it's at /wp-admin/ or any other page of the site, including home, it randomly throws 404. In which case, I ...
1 vote
1 answer
1k views

How to Upload CSV Data into Custom Post Type Data with Metabox programmatically

I have a Custom Post Type called movies which had only title enabled from post support and 3 custom field of metabax as box office, year, and director like now I have like 150 rows CSV formatted ...
1 vote
1 answer
1k views

Meta query with order by another custom field

Edit: I will try to explain in detail my problem. I am working on a portfolio site. There are a few custom post types: Projects, Publications, Exhibitions, Lectures, and Slides. The home page consists ...
6 votes
1 answer
1k views

Show Similar Post Titles ( Similar to Stack Exchange )

I really like how Stack Exchange sites handle posts, where after you finish typing the title it will list out similar titles. How can I implement something similar on my WordPress installation? The ...
1 vote
0 answers
726 views

Is there a solution to auto-post data to a WP post from a database

I'm looking to add posts to my WP website from a (self managed) database source - could be form or excel/CSV data, either internally (in WP itself) or external, i.e. from an excel sheet in Dropbox. I ...
0 votes
0 answers
15 views

Remove contact form 7 mail tag conditional

I have a contact form [contact-form-7 id="2342c34" title="From"] and i am using 2 dropdown fields line this [select* course-list id:k-option "Option 1" "Option 2&...
-1 votes
1 answer
21 views

Add taxonomy or category slug to custom post types URL

I have created a custom plugin that is similar to Woocommerce but will only manage products that are loaded using the WP REST API in a Vue SPA. I've registered two custom post types, one for products ...
0 votes
2 answers
2k views

Masonry layout within the loop

I have tried to to make a custom query, to some extend. it is working fine. But where i cannot make it work, is it to break after every 3 posts and do same thing (print div.row) and run same loop, For ...
26 votes
7 answers
76k views

Ajax call always returns 0

I have a problem with AJAX returning 0 always! I have done everything by the book and can't figure out what is wrong? Please help!! Here is my Ajax call: //Pass data through AJAX var ...

15 30 50 per page
1
2 3 4 5
2308