I wanted to create Additional WooCommerce Custom Fields that I can display on my Archive Page and Single Product Page.
So I followed this Tutorial— ( https://www.cloudways.com/blog/add-custom-product-fields-woocommerce) — and this— https://www.youtube.com/watch?v=yTDE6pJjOKs —– and this —- (https://wpsimplehacks.com/how-to-create-custom-fields-in-wordpress)
But these Tutorials are too complex. I have been able to follow them and get my Custom Field on my Backend as you can see here— (https://prnt.sc/VzBQDq-jp0PY)
The challenge I’m facing now is that I’ve not been able to translate that Data to show on the Frontend. I’ve been struggling with it for 6 Days now.
The thing is that I did get the Data to show on the Frontend through this (https://www.youtube.com/watch?v=yTDE6pJjOKs) —– and this —- (https://wpsimplehacks.com/how-to-create-custom-fields-in-wordpress) ——- but it scattered the entire Page Layout.
Now, I couldn’t tell what part of the code is causing that conflict.
What I am asking for now, is someone that can help me make sense of the Codes here-- (https://www.cloudways.com/blog/add-custom-product-fields-woocommerce/)
Then create it for only Text Field, and show how to output it on the frontend, on the Single Product Page to look like this-- https://prnt.sc/6W_S1w1BQlRc
Regards.
Related
I am trying to integrate the exVat incVat auto Suffix from the Cart Page to the single product page..
Currently if you go to checkout the prices will show exVat incVAT depending on how taxes are set up within woocoomerce when change the country they change automatically to display correctly. However on the single product page it either shows nothing or you can force it to say one in the settings. Would be much nicer if it could display either suffix.
Screenshots of example from shop page:
incVat
exVat
Is there a solution to make the single product page do this?
(I have spent 5+hrs trying options from custom code and editing the templates but with little success so would appreciate some help :D)
I have tried a mash of other codes and my own experience into fucntions.php with fatal errors or not really touching what I am looking for.
I have also tried unsuccessfully editing WooCommerce template files.
Any help much appreciated.
I am trying to display certain text on a website I am working on that is donations based. It uses WooCommerce and WordPress to handle the donations.
I am trying to display the text "Raised so far: $xx" dynamically so it shows the amount raised but I am struggling to find anything on Google/Stackoverflow that would give me the solution to this problem.
Does anyone know of a plugin that exists for this or some code that could make this possible? Thank you in advance.
Edit: See updated solution here
I just wrote a plugin that creates a database, populates and edits rows from the backend, now what I need to show a list view of those rows with teir respective link to a detail viewo of each one. The shortcode approach, I have already done it, but that does not get the purpose of my plugin, as I want it to be available in the Menus configuration, just like Woocommerce endpoints are. How can I do that? Has someone here done something alike?
Edit, I just realized that woocommerce just creates pages with the correspondent shortcode embedded in them. This just makes that more difficult.
I'm quite new to Wordpress and currently working on a custom plugin.
I know how to create a new admin menu point via plugin, now I'm trying to figure out how to add a functionality, when entering the site the user shall be able to specify the number of shown posts via input field - the amount of posts shall be saved in a way that you receive a shortcode for the amount.
Hope that was clear. Thanks in advance!
I know there are a lot of Wordpress php codesnippets and shortcuts to use, but I'm uncertain which the ones are I need.
I want my users to be able to mark posts as favorite. I tried the wp-favorite-posts plugin, but it doesn't work. I mark posts as favorites and after refreshing the page it's all gone. Furthermore, if I put {{wp-favorite-posts}} to a page, it just shows the text.
So I want to create my own solution, but don't really know how. I have never edited the WP database, but I have plenty of PHP mySQL experience.
Can anyone please point me in the right direction ?
You can use post_meta. You can store the "favourite" aspect as a custom field attached to each post. You don't need to manually edit the database (i.e. via mySQL).
When you want to show the favourited posts, run a custom query that only shows posts with the specific custom field that you've specified.