Questions tagged [wordpress]

35797 questions
1

votes
1

answer
748

Views

Add text for specific product category in Woocommerce [duplicate]

This question already has an answer here: Targeting product terms from a custom taxonomy in WooCommerce 1 answer I'm trying to add some text only on the specific products of determinate category in woocommerce, I tried to add this code in plugins/woocommerce/single-product/meta.php but don't work:...
delfinoweb
1

votes
1

answer
80

Views

Remain constant Woocommerce prices regardless of tax rate - B2C

Note - im new, so please be kind. If anything isnt clear please tell me, so i can improve my questioning! As a person who lives in europe and sells products to end-consumers, the following problem is very ipmortant and in my opinion heavily under-prioritised. There are a lot of conversation regardin...
evavienna
9

votes
1

answer
20k

Views

Get in WooCommerce cart the product ID of a cart item

$cart_item = $woocommerce->cart->get_cart(); I have the above code. if I run print_r on cart_item I get a multi dimensional array: Array( [a6292668b36ef412fa3c4102d1311a62] => Array ( [product_id] => 6803 How do I get the product_id only? I tried $test = $cart_item['data']; pr...
Kevin.a
1

votes
0

answer
117

Views

Woocommerce Bookings Product Available Between Two Timestamps

I'm trying to see if a woocommerce booking timeslot is available bewteen two times. For example, I have a bookable product that is available 9:00am - 9:15am 12/27/17, when passing the unix timestamp for 9:00am 12/27/17 and 9:15am 12/27/17 i should receive true, else false. I've tried wc_bookings_ge...
Viking Mann
1

votes
1

answer
439

Views

How to get the value of the number of posts per page in the function.php file?

From Wordpress I get data on the number of posts per page $posts_per_page global $wp_query; $args = array( 'post_type' => 'post', 'category_name' => $categories, 'posts_per_page' => $posts_per_page, ); $posts = new WP_Query( $args ); How now to get this number in functions.php? wp_register_script( '...
wasterel
1

votes
0

answer
504

Views

WooCommerce. How to add a wrapping div around single pages product descriptions?

I am looking for a filter/hook to wrap some extra div around my woocommerce single pages product descriptions included to the tabs. Right now i have Product Title My Product Description Text And thats what i would like to achieve instead Product Title My Product Description Text So the container j...
romu
1

votes
0

answer
17

Views

change the sequence of custom plugin in wordpress

I have created 4 custom plugins in wordpress for social media login. If more than one is activated then it should always ask for option which one to choose for login with? 1) login with facebook 2) login with google 3) login with linkedin 4) login with 0365 as individual they all works fine means wh...
vaibhav
1

votes
0

answer
30

Views

WP - External links not working on iPhones

I'm trying to help out a friend but haven't had much luck so far. She had a website for an event developed but only just noticed that all external links don't work on iPhones. I've been hoping to google the issue but haven't had any luck so far :/ They built the website on WP/Genesis theme. It's ju...
Jasmin
1

votes
0

answer
32

Views

how do I remove http to https redirects cent OS wordpress LAMP stack

I have a website that has redirects when I moved to https. I have since removed some of those pages but the redirects are still there an giving me 404 error. I have checked the .htaccess file and the redirects are not there. Where are these redirects kept? the answered provided in the post is on how...
Michael
1

votes
0

answer
293

Views

The requested URL … was not found on this server

The home page of my wordpress website seems to be wroking correctly but if you click through to any of the other pages I get the following error message: The requested URL /about was not found on this server. There is following htaccess code in the permalink setting: RewriteEngine On RewriteBase / R...
Sanjeev Thakur
1

votes
1

answer
502

Views

form checkout template file in avada theme

I’d like to edit the 'checkout' default WooCommerce form (fields like : billing address, first name, second name...etc.), but woocommerce template file form-checkout.php is not present in Avada Theme; other template files in woocommerce/checkout folder does not contain code for checkout form gener...
Ala Dyn
1

votes
1

answer
269

Views

wrapping parent and child pages in separate ul in wp nav menu

I need the nav menu structure like the following. Parent Page 1 Traditional Braces Lingual Braces Invisalign Temporary Anchorage Devices Surgical Orthodontics TMJ Treatment All About Retainers Emergency Treatment Paent Page 2 Early Treatment/Prevention Two-Phase Treatment Hometown Smiles Gallery Whi...
Shyam V
1

votes
0

answer
153

Views

Woocommerce Sold Individually Redirect to cart

So I need your help. I am trying to use the following code in my function php: add_filter('woocommerce_add_to_cart_sold_individually_found_in_cart', 'sold_one'); function sold_one() { if ( $found_in_cart ) { $url='/my.domain/cart'; return $url; }} The idea was to have a product sold individually by...
Wildzhen
1

votes
1

answer
28

Views

Wordpress: I need every blog posts to appear under the Blog Page, AND the latest post to appear in a Category (code not working thus far)

I have been trying to have one specific page display all the posts, while having a Category display only the latest post. Both my Page and Category appear as part of the main menu. This piece of code in the functions.php will display a single post for both my Page and my Category. However, I need th...
user3298911
0

votes
1

answer
11

Views

How to create a pattern for multiple similar pages in Wordpress?

I am making a travel website and will therefore have to create several trip pages like this one : https://ready-japan.com/ninja-adventure/ I want to find a way to have a 'pattern page' for all trips, where I would just fill out the trip info from the admin panel for each trip. That would not only he...
Sowon
0

votes
0

answer
6

Views

Do files in the child theme have to be in the same folders as the parent theme to reflect on the website?

Certain changes in child folder don't appear to be reflecting on my website. In order to make changes to a file that's in a folder of the parent theme, do I need to make sure my child folder also has that folder or can I add it via FTP to the main folder? I broke my website via header.php but that i...
Troy
1

votes
0

answer
319

Views

adding product using woocommerce rest api too slow

I am trying to add a WooCommerce product from one Wordpress site to another using WooCommerce Rest API with NodeJS module. https://www.npmjs.com/package/woocommerce-api It takes more than 2 minutes to add only 10 products I need a solution for this I think it should take just 1,2 second at most to...
Abdelrhman Elgreatly
1

votes
2

answer
239

Views

Moving the Git Repository to a Child Folder

I'm using Github with my Wordpress website. Currently it tracks the parent Wordpress folder, which essentially tracks everything. I'd like it instead to have a git with only the theme, which is located at wp-content/themes/lighthouse Is there a simple way to have this repository only be the theme r...
James Mitchell
1

votes
1

answer
214

Views

unable to find $wpdb variable with AJAX call

I'm creating an application in PHP for Wordpress and at this point, I'm trying to fetch a value from a database through AJAX every 2 seconds, and I've created a new file with the function that should be fired.
Filippo Momentè
1

votes
0

answer
117

Views

Prettyphoto image gallery as custom post type in wordpress

I am in the process of converting an html template to wordpress. I want to add an html image gallery as custom post. In pretty photo, the visible image places between the link which will open as a popup when the image get clicked. I want to show the full image when the thumbnail image got clicked....
Shebas Khan
1

votes
1

answer
56

Views

Everything is okay in local drive but these code simply don't work in Wordpress

I tried to code the responsive menu in local drive and everything is working without error. However, the responsive menu simply doesn't work in Wordpress blankslate. Please help. I attach the comprehensive code in the jsfiddle. Thanks. My HTML snippet Title-1 Menu-A1 Menu-A2 Title-2 Menu-B1 Menu-B2...
TissuePaper
1

votes
0

answer
136

Views

JWT authentication and permission_callback

In angular, I have following to get the JWT token for wordpress. import { HttpClient, HttpHeaders} from '@angular/common/http'; ... logIn(){ let loginInfo ={ username: 'admin', password: 'password.' }; let headers = new HttpHeaders(); headers.set('Content-Type', 'application/json'); this.http.pos...
steve Kim
1

votes
1

answer
310

Views

Gravity form chosen for select not working on mobile device

I have used gravity form on my WordPress site. I have selected dropdown for state and postcode. I have also checked the Enhanced user interface checkbox but, It was not enabling chosen on my dropdown field for a mobile device. screensoot of drop-down field Is there any options on chosen or gravity f...
1

votes
1

answer
122

Views

How to Include the Parent and Child Category in the Permalink if the Post is Added to Both

If I add a post to a parent and child category, I know that only the parent category will be shown in the permalink. For example, if the parent category was 'Clothing' and the child category was 'Pants', the permalink would look like 'mysite.com/clothing/post' instead of 'mysite.com/clothing/pants/p...
user22939
1

votes
3

answer
396

Views

Is it “okay” to host a small wordpress blog on one AWS EC2 Instance without load balancers/beanstalk?

This is a very simple question for those with the knowledge, but I'm a newbie. In essence, I just need to know if it would be considered okay to run a small, approx. 700 visitors/day bitnami wordpress blog on just one t2.medium EC2 instance (without any auto-scaling, beanstalk). Am at risk of it cra...
Scotchnowplease
1

votes
0

answer
461

Views

Setup apache multiple virtual hosts with fpm and docker

Hi guys here is the issue, i'd like to have 2 virtual hosts on Apache: one pointing to www.mysite.com (php-fpm container) and the other pointing to www.mysite.com/blog (wordpress fpm container). I'm using Docker with compose, the actual file is something like this server: build: ./docker/apache imag...
Alessandro Lucarini
1

votes
1

answer
40

Views

Wordpress get Custom Post by Custom Taxonomy

I created a custom post and Custom Taxonomy I need to search post using taxonomy used this code but result is null $properties = new WP_Query( array( 'posts_per_page' => 10, 'orderby' => 'ID', 'order' => 'DESC', 'post_type' => 'real-property', 'post_status' => 'publish', 'tax_query' => array( arr...
raj kumar
1

votes
0

answer
200

Views

Ionic 2 component use a variable in a function

I'm developing a map with google maps for multiple markers. My first step is to display one marker. The marker is also displayed in the center of the map. Now I would like to display the shop name in the marker info box. I get the list of the vendors from my woocommerce api, but I have trouble displ...
Lorenzo Varano
1

votes
0

answer
54

Views

Woocommerce 3.2.6 jQuery Not Loading After Update

I am currently running Wordpress 4.9.1 My Woocommerce has been updated to the latest version (3.2.6), and now my website is broken. All images fail to load, buttons don't work. I can see the problem in my Console is that jQuery is no longer loading. If I look at the page source, I can see that the U...
Jethro Hazelhurst
1

votes
0

answer
56

Views

wordpress date_query with after array return 0 result

Please check my query below $args = array( 'post_type' => 'properties', 'post_status' => 'publish', 'date_query' => array( array( 'before' => array( 'year' => $ed[0], 'month' => $ed[1], 'day' => $ed[2], ), 'after' => array( 'year' => $st[0], 'month' => $st[1], 'day' => $st[2], ), 'inclusive' => true...
FDI
1

votes
0

answer
148

Views

Geolite2 files taking up space on disk

Checking the disk use of my hosting account I have discovered a section called 'Another use' with more than 500MB (my plan has 2GB). I have contacted to them about that and they said me this: 'It looks like you have any plugin using geolite, which has generated files like these in the Tmp directory:...
Antonio
1

votes
0

answer
270

Views

Woocommerce Shipping Calculator not showing country drop down on cart page

I don't know if the issue is because of the theme I'm using. The problem is that the 'calculate shipping' option on my cart page doesn't allow users to select or type in a country - it only shows county or postcode. This doesn't matter for people who are ordering items for themselves, but if they wa...
Clare Bonthrone
1

votes
2

answer
146

Views

Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column

Im trying to order a wp_query by meta_value Im using the following arguments array( 'post_type' =>'event', 'posts_per_page' => -1, 'meta_query' => array( 'dates_query' => array( 'key' => 'dates', 'value' => date(time()), 'compare' => '>=' ) ), 'orderby' => 'dates_query', 'order'...
lior r
1

votes
1

answer
54

Views

How to avoid empty search using jquery in wordpress

I have a search function in wordpress and there are two search boxes. One is a simple textbox in searchform.php which has a jquery validation with the following code: function title_validate() { var e = 0; return e = jQuery('.search-box').val().length, 3 > e ? (alert('Search text should not be blank...
Rony Samuel
1

votes
1

answer
263

Views

Wordpress plugin using wp.media to crop images

Im using this function in my new Wordpress plugin development, this works ok, using Wordpress Media Uploader for image upload, but I need to use a predefined crop functionality to crop the image after upload and I don't know how do it. function wilson_newsletter_media_library(big_parent){ var frame_...
Wilson PHP
1

votes
0

answer
64

Views

WooCommerce : Create specific cart for specific product

I'm working on the woocommerce cart. I need to create a few type of cart for specific product category. For example, a donation product category will added to Donation Cart while gifts product category will added to Gift Cart. Each cart will have difference layout. I have do some research and got th...
Mukhlis Ismail
1

votes
1

answer
29

Views

How to assign serial no in WordPress Post summary Page?

I am trying to assign serial no in my WordPress Post Category summary Page. For this I have written following code. It is working fine but problem is in the case of paging. When I am going to 2nd page or 3rd page it assigns the no from 1 again. Currently I am showing 5 posts/per page. Then in 2nd pa...
Mithu
1

votes
1

answer
146

Views

Notice: Undefined variable - WordPress / Parse Server Plugin - PHP Error

So I'm putting together a WordPress plugin for a client based on this Github project, which would allow you to pull in posts from WordPress. Basically I pulled down the project and I had several errors. I've been tackling them one at a time. I had posted a question here before in relation to the fir...
L. King
1

votes
0

answer
537

Views

NGINX SSL Too Many Redirects?

Environment Ubuntu 16.04 NGINX Light WordPress Configuration Domain name has been changed to example.com for this question. If I bypass port 443, I get the default NGINX landing page and not my WordPress site. # SSL configuration server { # Ports to listen on, uncomment one. listen 443 ssl http2; li...
DevByMike
1

votes
1

answer
23

Views

cannot see fluent chat option in wp-admin

I have recently installed fluent chat plugin for one of my customer. I can only see chat icon on front site, but there is no any option visible in wp-admin for configuring fluent chat plugin.
Shahbaz Ali Khan

View additional questions