There is a link right under the checkout header on Woocommerce that says "Click here to enter your code". When you click it, a javascript slides the billing details box down to show the coupon code box and "apply coupon" button.
I am trying to make this show automatically on the page load.
The other option is to change the javascript from a click action to a page load action.
Write in your custom CSS:
.checkout_coupon {
display: block !important;
}
.woocommerce-info {
display:none;
}
Related
So I have been searching for a good plugin but was unable to find any - On the homepage of the WP website that I am working on, I want to hide half the page and want to add a button and in middle of the page at the end of the first half that would say "Show More" - When the visitor clicks that button, the rest of the page should show. The button would then go to the end of the page saying "Show Less". The page is static and is just some text and images, nothing complex.
You can do this putting a html block and writing:
<!--nextpage-->
you can read more about this on:
https://codex.wordpress.org/Styling_Page-Links
and to get other solutions you can try:
https://es.wordpress.org/plugins/automatically-paginate-posts/
https://es.wordpress.org/plugins/sgr-nextpage-titles/
https://es.wordpress.org/plugins/page-links-single-page-option/
I hope this will help you to get what you want.
You must create a div with css display none. And then in your html code put an element with a jquery behaviour to display the previously div created. It will be something like:
$(document).ready(function(){
$('#show_content_button').click(function(){
$(this).hide();
$('#content_hide_on_home').show();
});
$('#hide_content_button').click(function(){
$('#show_content_button').show();
$('#content_hide_on_home').hide();
});
});
#content_hide_on_home { display:none; }
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<p>Text on home</p>
Show content
<div id="content_hide_on_home">
Your extra content on home
Hide content
</div>
I hope this is what you're searching.
I have created menu from admin panel, now I have to add onclick event in li tag of each menu item like below:
<li>Track Suits</li>
For this I have installed https://wordpress.org/plugins/jin-menu/ plugin follow the steps as described in this documentation but onclick event not appearing.Below is the screen shot :
Try the following code. Add this code a file which loads on each page or your header.php in themes
jQuery('a[href="#m-track-suite"]').click(function(){
//...do something..;
});
My site is built on drupal using ubercart.
I have two 'add to cart links' on my page but for some reason the second one is hidden. It only shows if i delete the first one.
You can see them both in view source of the page. (The second button should be next to 'contact us' button)
My site is https://www.thepetwiki.com/mg-testsite.com/ubercart/painting/kaluga-dock
any idea why?
You hide it in css.
http://www.thepetwiki.com/mg-testsite.com/ubercart/sites/all/themes/NaiveArtOnlineColorful/style.css
line 2819
#edit-actions--2 {
display: none;
}
Drupal automatically changes the id if you have multiple form items with the same id.
How can I properly style the form submit button, specifically an "add to cart"?
The class is .form-submit, and the id is #edit-submit.
When I style it with the id, #edit-submit, the style lasts until ajax updates the form. The Submit button then looks the same as the rest of Drupal's buttons.
If I use the class to style, then for some reason it only accepts the height of the button, and ignores the rest of the styling.
Any advice?
may be you have some conflicts in CSS.Will this work?
!important;
Example
.your_css_class
{
height:500px !important;
}
I have created a layout in Wordpress with a plug-in called builder. I then have a page that uses this layout. The layout contains a area with tabs.
When the user clicks on a link in my main menu he is taken to this page with the first tab open. Can I change the link to take him to the second tab instead?
Actually the menu looks like this
About us
-Overview
-History
-Contact
If the user clicks on about us or overview I want him to go to the first tab.
I guess you must create something with an HTML anchor OR
$(document).ready(function() {
$('#tabs #2nditemid').click();
});
OR
$(document).ready(function() {
$('#tabs li').hide();
$('#tabs li.2nditemid').show();
});
This may vary a bit but may lead you somewhere
this must be specific only to where you have the tabs... so best is to create a page theme only for this specific page to avoid extra jquery in all pages