This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h3>Genesis e-commerce Theme</h3> | |
<h4>Start earning money by selling your products online</h4> | |
<a href class="button">Purchase Theme</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p><i class="fa fa-shopping-bag" aria-hidden="true"></i></p> | |
<h3>Sell Your Products</h3> | |
<p>Start earning money by selling your products with the Seasons theme.</p> | |
<a href class="button">Buy theme</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[recent_products per_page="5" columns="5"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Display field value on the order edition page | |
add_action( 'woocommerce_admin_order_data_after_billing_address', 'wps_select_checkout_field_display_admin_order_meta', 10, 1 ); | |
function wps_select_checkout_field_display_admin_order_meta($order){ | |
echo '<p><strong>'.__('Delivery option').':</strong> ' . get_post_meta( $order->id, 'daypart', true ) . '</p>'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Update the order meta with field value | |
add_action('woocommerce_checkout_update_order_meta', 'wps_select_checkout_field_update_order_meta'); | |
function wps_select_checkout_field_update_order_meta( $order_id ) { | |
if ($_POST['daypart']) update_post_meta( $order_id, 'daypart', esc_attr($_POST['daypart'])); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Process the checkout | |
add_action('woocommerce_checkout_process', 'wps_select_checkout_field_process'); | |
function wps_select_checkout_field_process() { | |
global $woocommerce; | |
// Check if set, if its not set add an error. | |
if ($_POST['daypart'] == "blank") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Add select field to the checkout page | |
add_action('woocommerce_before_order_notes', 'wps_add_select_checkout_field'); | |
function wps_add_select_checkout_field( $checkout ) { | |
echo '<h2>'.__('Next Day Delivery').'</h2>'; | |
woocommerce_form_field( 'daypart', array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Modify the Genesis content read more link | |
add_filter( 'get_the_content_more_link', 'wps_read_more_link' ); | |
add_filter( 'the_content_more_link', 'wps_read_more_link' ); | |
function wps_read_more_link($more) { | |
$read_more_title = sprintf( '<span class="screen-reader-text">%s %s</span>', __( 'about ', 'seasons' ), get_the_title() ); | |
return sprintf( ' ... <a href="%s" class="more-link">%s %s</a>', get_permalink(), __( 'Continue Reading', 'seasons' ), $read_more_title ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Add Accessibility support | |
add_theme_support( 'genesis-accessibility', array( '404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links' ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="https://www.wpstud.io/post-examples class="more-link">[Read more...] <span class="screen-reader-text">about Post examples</span></a> |