Skip to content

Instantly share code, notes, and snippets.

Authors Guide: Article Template

Please submit your article including all of the information below. You can include this as a seperate file if you like - but please complete each section. Please use an online service to write your article, for example Dropbox Paper, Draft.in, Google Docs. For more help, see the editorial guide

Article Title

Ideally under 67 characters, what problem does this article solve?

Quick Summary

@woogists
woogists / wc-show-cart-contents-total.php
Last active October 26, 2021 20:29
[Theming Snippets] Show cart contents / total
// Use in conjunction with https://gist.github.com/woogists/c0a86397015b88f4ca722782a724ff6c
<a class="cart-customlocation" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf ( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a>
@andreasonny83
andreasonny83 / .gitignore
Last active November 7, 2025 08:45
Gitignore template for JavaScript projects
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Runtime data
pids
*.pid
This CA certificate is for verifying HTTPS connection to;
- https://rubygems.org/ (obtained by RubyGems team)
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=SE, O=AddTrust AB, OU=AddTrust External TTP Network, CN=AddTrust External CA Root
Validity
@bentasm1
bentasm1 / product-edit.php
Last active January 12, 2017 16:42
WC Vendors Pro - Adding a custom field to your add/edit product page
---- The code below goes in your product-edit.php template as outline in the KnowledgeBase Article ----
<?php
WCVendors_Pro_Form_Helper::textarea( array(
'post_id' => $object_id,
'id' => 'wcv_custom_product_ingredients',
'label' => __( 'Ingredients', 'wcvendors-pro' ),
'placeholder' => __( 'Ingredients', 'wcvendors-pro' ),
'desc_tip' => 'true',
'description' => __( 'The product ingredients', 'wcvendors-pro' ),
) );
@generatepress
generatepress / gist:bb195b0ecd8f833f9845
Last active February 15, 2024 18:10
Initiate mobile menu at a smaller width than 768px. Replace the 600px with whatever you like.
@media (max-width: 769px) {
.menu-toggle,
.main-navigation.toggled .main-nav > ul {
display: none;
}
.main-navigation ul li.sfHover > ul {
display: block;
}
@generatepress
generatepress / gist:c23aef2d05807c39bb32
Last active January 14, 2019 22:35
Initiate the mobile menu at your desired width
@media (max-width: 768px) {
.main-navigation .menu-toggle,
.main-navigation .mobile-bar-items,
.sidebar-nav-mobile:not(#sticky-placeholder) {
display: block;
}
.main-navigation ul,
.gen-sidebar-nav {
display: none;
@hofmannsven
hofmannsven / README.md
Last active December 8, 2025 16:31
Git CLI Cheatsheet