This may be a strange question, but I want to use 2 of the same buttons on my mobile checkout page in woocommerce. I think this is much better for the user experience because the button to "place order" is pinned to the bottom of the mobile browser so as you can see in the image below.
In my screenshot i made a circle with 2 inside, its on the end of all fields. I think it would be great to create an extra button there.
Is that possible and can that work together? And in what file do I need to edit this?
Really thanks for any help or advise!
As you can see the code for the button is in the next template file
https://github.com/woocommerce/woocommerce/blob/163aaa029dc57b1b04f6ca583bc04c4c4e1b6767/templates/checkout/payment.php#L51
How to Edit Files
Edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme named /woocommerce keeping the same file structure but removing the /templates/ subdirectory.
Example: To override the admin order notification, copy: wp-content/plugins/woocommerce/templates/emails/admin-new-order.php to wp-content/themes/yourtheme/woocommerce/emails/admin-new-order.php
The copied file will now override the WooCommerce default template file.
Be aware that when moving, the button must still be between the <form></form> elements
Related
I am new in WordPress. In my WordPress application having one page named "Retail". I want to create new page named "Website" with the same content of "Retail" page. I copied content and paste in to new page editor and saved. But some CSS problem is there. I think css file is missing kind. How to resolve this problem?
We cannot find the problem without any real information. However you can check if any of the following issues occurs:
You use a theme which let you add custom CSS rules in specific page. You might have a settings button in the page where you add it. In that case, you need to copy that as well.
You need to check your CSS files and see if the styling rules are applied for a specific page. It could be like .page-id-662 or .pageid-662
The last you could check is the functions.php file in case you enqueue a styling CSS file on specific pages as well.
What did you do exactly?
Created a new page in the Wordpress backend and copied the contents of "Retail?
Or put on a whole new Wordpress website and copy the "Retail" page there?
And please give an example of what went wrong in the design. Can you possibly specify the HTML code of an element with a design error?
In my WordPress website from recently I am unable to edit any text in the widgets. Once I drag and drop a text widget it loads and just gets saved without allowing me to add any texts. Even the existing widgets are also disabled to edit.
Please help to sort out this issue as I need to add more additional information to the website.
I have attached an image of the issue:
Please check your developer console in browser. I believe that there is some Javascript error in back end.
Try to deactivate all plugins & switch to a default theme. Then activate plugins one by one.
We have a website developed in Wordpress by a third party. We need to add a java script function and onClick event to an individual page of our website.
The page has a div with some divs that mimic a button. They are just text with anchor tags, inside divs. We are particularly interested in one particular one. (i.e. $2.00 Off Coupon) which when clicked downloads a PDF document. We would also like it to call a function.
In Chrome, when I look at the code for that element, it looks like this (see red circled area):
With in the WordPress admin dashboard, the code for those buttons is not available, as it was custom made by the third-party developer.
e.g.
My Question is, is this code in a template, theme, or page code stored in database? How can I modify this anchor tag to include an onClick event to call the function I need?
Any help to guide me in the right direction would be much appreciated as I am a WordPress Novice.
I think this code located in Page Template file in your WordPress theme.
Try to find file with name page-home.php of something else.
This file should start from this code:
<?php
/*
Template Name: Home
*/
Or try a bad solution to the problem
$('.home-ctas').on('click', 'a[data-emalabel="$2.00 off coupon"]', function(){
// your function
});
I feel kind of stupid asking this but... I have three pages on my website. There is one of them I want to edit. How do I access the code of this page? I need to change the size of a Google Maps I have embedded on the page.
Go edit this page, in the right sidebar look for Template in page attributes box. This page should be using a template, go to your theme folder and look for a php file with the similar name, when you open, it should have the exact template name in the header, that's where you can edit the code of this page assuming that it use a template.
I managed to solve the problem by playing around with some divs in the css.
In Drupal 7 I created a views page, and I want users to have the option to view the results either as a list, or with thumbnails (like on a lot of websites). The only way I can think of doing that is creating one page with the results as a list, and having a link to another page with the results that have thumbnails.
But my question is, how do I add just a random link to the top of my block page that will direct users to the 'thumbnail' page?
I tried to use 'unfiltered text' in the header and put the html for a link in there, and when I went to the page it looked like a link, but I couldn't click it. Any suggestions?
For every view you can create set of templates to style it. When you edit you view open "Advanced options" and then at bottom click on "Theming options" (or suggestions...can't remember real text).
That way you'll get a very useful popup which displays all templates used by view...in specific theme. So if you want to change some template just click on it's original name, pick up it's original code (copy) and create a file. Save it at your theme templates directory, pick some of suggested names, add your link or what ever html you need and clear the cache.
Templating is a bit broad subject to discuss in details for you questions's answer - find some tutorial on net, but general idea is to use custom view template and store your html there.
BTW, I hope you have only one view and different displays for you different pages.