All Questions

0
votes
1answer
6 views

When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load

I recently set up my Wordpress website and just noticed that if I click the “home” page from any other page, it points to the IP of my instance and the website won’t load. I have checked from the ...
0
votes
0answers
4 views

How to set Order by random

How do I change the last line to order by rand? Now its order by date of my woocommerce products. INNER JOIN $wpdb->postmeta AS mt1 ON (posts.ID = mt1.post_id) WHERE posts.post_status =...
0
votes
0answers
8 views

How to fix 'Wordpress redirection loop problem in wp-login.php page'?

When I am going to the wp-login.php page of my wordpress website, the login form is not showing. Instead I can see its redirecting back infinitely to the same page. I am confused why suddenly this is ...
-3
votes
0answers
8 views

Hang up the site [on hold]

My site is interrupted and the problem is not hosting, my hosting support said that the problem is the site white page Please help me www.yuotabshop.ir
0
votes
0answers
10 views

Is possible add class for last post of Custom Post Type?

I need to add a different class for last post of a Custom Post Type. Is it possible? I have found this code, but it works only in posts function wpc_last_post_class( $classes ) { global $...
0
votes
0answers
2 views

Internal forward link with add_rewrite_rule

I want to forward a link to another link but internally. I've set up the wordpress to show post links like this - https://asif.bzstage.com/medical/website/nyc/ which only throws 404 error. However If ...
0
votes
0answers
3 views

Woocommerce order change to on-hold does't trigger email and stock reduction

This is a local payment gateway called fawry. Its scenario how it works: click on place order button at checkout gives a pop up window then i enter the visa details to complete the order and click pay ...
0
votes
1answer
7 views

How to have a dynamic slug and rendering the archive-{post_type}.php?

So I have a Custom Post Type named network and Custom Taxonomy name company_category. Everything is all good until I can't render http://localhost/digitalhxstaging/company. Both Company Category and ...
0
votes
0answers
4 views

Wordpress Customizer not allowing menu options

I am having trouble with the Wordpress Customizer. I am trying to add a page to my menu and I am unable to select anything. I am using the Avada theme and the issue remains even when using the ...
0
votes
0answers
6 views

Title to go into Google PageMap in Head

anyone help me adapt .... </PageMap>--> to go on every of every page? What I specifically need help doing is getting the The Biomechanics of a Badminton Smash to reflect the title of the page or ...
0
votes
0answers
14 views

How to display category image instead of text on product archive and single

How can I display category as an image rather than text? For example, if category is "Adidas", I would like to display logo of said brand. The category images would be displayed on product archives ...
0
votes
0answers
16 views

Scripts and stylesheets failing to load in Chrome IOS (and only Chrome IOS)

My script and stylesheet files have been failing to load in Chrome IOS, and only Chrome IOS. I changing the value of $ver in wp_register_script from a string with a value ("1.0.17") to an empty string,...
-1
votes
0answers
13 views

How to set up a cron via WordPress only

I need to get the following to fire every hour: wget -q -O - https://someurl.com/wp-cron.php Any idea how I might do this, via WordPress only?
1
vote
1answer
15 views

What's the “?P<tag>” register rest api construct, what is for and where to find official docs?

I noticed that often in register_rest_routes, are used regexp like ?P<lang>, ?P<category_id>\d+ and so on, but I guess it's not standard regexp syntax. What exactly does it do?
0
votes
0answers
15 views

Custom WordPress Rest API for CPT

I am currently building a headless Wordpress site using the WP Rest API. With Custom Post Types I am currently using the following endpoint: localhost/wp-json/wp/v2/cpt_operator Can I modify / ...
0
votes
1answer
29 views

How to call a PHP function in WordPress when you click on a button?

How to process the textarea field with the standard WordPress function wpautop() when clicking the button? Here's the form: <textarea id="my_ta">Lorem ipsum!</textarea> <button id="...
0
votes
0answers
17 views

Multiple plugins linked to same settings page

I have several custom plugins that do very different things but I use on each of them (or almost) the Jenkins and Mantis Rest APIs. For the moment, the API settings (as URL or tokens) are hard coded ...
0
votes
0answers
10 views

Access WP files on “server 1”, from “server 2” - using wp-load on an external website

My setup consists of a "members area" which is set aside from my Wordpress install. This members area is written in PHP. Until now, ive been using the following code in a PHP file to pull in the WP ...
-1
votes
0answers
21 views

wp_mail() not working, where as mail() is working

wp_mail() not working, where as mail() is working, then when the order is placed the order confirmation mail is not received it always shows Request Timeout This request takes too long to process, it ...
-1
votes
0answers
12 views

Why to use django? [on hold]

0 Ajax submitting a form works, but I'm unable to stop the page reload. I've tried several variations of event listening by id. On the form, the button, tried using inline onclick, onsubmit, tried ...
-1
votes
0answers
8 views

How to add plus minus button on Input Quantity box Woocommerce?

I want ot add + and - button after and before the quantity input on single product page? how is this possible to add using standard method lets say using hooks and fitler?
0
votes
0answers
13 views

List of product attribute values

I've variable products and would like to list all the values of specific product attribute (Texture) in single page. Product can have even 50+ textures and it's impossible to select from them on ...
0
votes
0answers
15 views

Creating a product attribute in woocommerce with php without preventing previous ones

I'm trying to add product attributes in WooCommerce with a plugin that I'm creating. For example, when admin creates a new product with an attribute size, a second attribute called color needs to be ...
1
vote
2answers
98 views

is_page() function doesnt working

I'm trying to add these custom CSS and JS (written inside a custom plugin) only add to a specific page. this is my code <?php function randomAlphaNumeric($length) { $pool = array_merge(...
0
votes
1answer
24 views

How to copy data from a custom field to the post_content?

i used ACF to store post data in custom fields. i'd like to copy the data from a wysiwyg field to post_content into wp_posts table. How can i do this? Roughly: data is on wp_postmeta table, where ...
0
votes
0answers
18 views

show custom post count of a custom taxonomy and exclude posts that also attached to another custom taxonmy

i have a custom taxonomy list with post count and it is sorted by post count. But some of these posts also is attached to another custom taxonomy list and i want to exclude these post from taxonomy ...
-4
votes
0answers
19 views

which are the plugins needed in Wordpress? [on hold]

people who use wordpress extensively, I wanted to know which are functionalities needed for wordpress as a plugin but not yet available. Thank
-1
votes
0answers
11 views

Save input type text via setting api

I need a bit of help here. So all of this worked a couple days ago but now it doesn't anymore and i'm clueless. I save a title and a description in my own plugin admin page via a input field. It ...
-1
votes
0answers
22 views

Multiple image upload shows error “Specified file failed upload test”

I have been trying for hours to get this working. WP image upload works fine for single image without using multiple tag. But when tried to to upload multiple images after changing the php code for ...
-2
votes
0answers
12 views

Failed to load image: the server responded with a status of 409 conflict [on hold]

The server responded with a status of 409 (Conflict) in contact page of Wordpress.The contact.jpg not loaded
2
votes
3answers
31 views

Hide admin bar on all pages except homepage

I am trying to hide WordPress admin bar from all pages except the home page. I added the following CODE in the theme's functions.php file, but it hides the admin bar on all pages: if ( ! is_single() ...
-1
votes
1answer
16 views

How to get the id dynamically to store cookies

Right now I'm getting the id statically in my output "1778a1778" because of array_push(), but I have to send ID dynamically and get the same output.
-1
votes
0answers
12 views

How may I add prefix on Woocommerce user ID?

Is it possible to add some sort of prefix, so that Woocommerce users get the ID on registration like 00001,
-1
votes
0answers
11 views

why the website speed is very slow even cdn and cache plugins are installed? [on hold]

am used both the cdn and cache plugins but still now the website speed is very slow and also i reduce the slow queries also but my website speed is very very slow. Most commonly the search and filter ...
0
votes
0answers
13 views

Wordpress Logged and not [on hold]

I have a problem. When i'm logged as administrator, my website works well. If not, the website dont work. I tryed to see the cache and permalinks, and is not working. Please help
0
votes
0answers
16 views

How to make a block similar to another block

My immediate goal is to add a block type that's the same as an existing block type, except for the name. Then I can use CSS to style it appropriately. This would be used (via the block editor) by non-...
0
votes
0answers
8 views

save position on back pressed using infinite scroll [on hold]

I recently added (catch infinite scroll) plugin to my website and it's works fine but when you click on some article then press back all items you were scrolling are not there and you need to scroll ...
0
votes
1answer
22 views

Array ids post to function have_post

I get as result of a main sql an array of post IDs, now what I need that Array of ids post to obtain the information and be presented in the following way: <?php $ids = [1,2,3,4,5]; // ...
0
votes
2answers
21 views

Acf automatic age display from specific field dob

I'm trying to display Differnet Age from Advanced Custom Field. But, it's displaying total age by splitting Days, years, months etc. Actually, I want to Calculate Separately. DOB input is (12/09/1988) ...
0
votes
0answers
6 views

Admin keeps showing pending translation update

WP shows that I have a pending update In /wp-admin/update-core.php, I see it's a translation update I press the update translation button The update warning disappears ... and after a few moments of ...
0
votes
1answer
22 views

How to remove the sub-category from Woocommerce product URL

In permalinks settings the 'Shop Base with Category' /shop/%product_cat%/ permalink setting puts all the hierarchical categories in the url, for example: http:// mystore.com/shop/parent-category/...
-1
votes
0answers
30 views

How to know the article visitor read today

I want a code or plugin which help me know the article that the visitor read a post today in WordPress. I want to know this so I know the article/post that the visitor read in one day so I can change ...
0
votes
0answers
12 views

WordPress with Web3Js

I am coming from a Node.Js environment and recently tried WordPress for fun. I have been able to create dAPPS with Node.Js by using ethereum's Web3.js and by connecting to an INFURA node. I am able ...
0
votes
0answers
19 views

Change layout of product attributes for variations in WooCommerce single product pages

I have this layout in Woocommerce single product pages for product attributes for variations (on variable products): <div class="custom__radio-btn"> <input type="radio" name="lines" value=...
0
votes
1answer
13 views

load CSS only for administrators on backend

I am trying to load a custom styles sheet but only for administrators My code works fine by itself: function admin_style() { wp_enqueue_style('admin-styles', get_template_directory_uri().'/admin....
0
votes
0answers
13 views

“upload_mimes” filter not working. Need to allow WOFF and WOFF2

I'm working on a theme settings page and I need to allow uploading WOFF and WOFF2 files. Getting the Sorry, this file type is not permitted for security reasons. message at this time. My code: ...
0
votes
0answers
41 views

Rewrite CPT slug with two taxonomy slug instead of one

I have a post type location with 2 taxonomies in it - service & sector. Now, normally wordpress would show the permalink like - site_url/location/post_name I've made it work to show - site_url/...
0
votes
0answers
17 views

How to improve WP-Rest atrocious response time?

I'm going to be very straight forward here. I have a headless WP install and made my front-end in Vue.JS Since I've started this project, the load times for the API requests were high but I think we ...
0
votes
1answer
21 views

Avoid duplicates in foreach tag

I'm trying to add custom content at the end of the blog posts in my wordpress site depending the used tag(s). First, I look for a specific string in the tags ("ods") and after that I add more specific ...
0
votes
1answer
18 views

Displaying all pages which comes under a category id

Actually, I try to make a carousel and I want to get the featured image of all the page which comes under category ID 4. There are problems the below code fetches all the pages added and not ...

15 30 50 per page