Allows to resize a file input image before upload to the server. The resized image will be attached to original file input. Then you can submit your form without ajax or handle it as you need.
<form>
<label>Select image</label>
<?php | |
//* Do NOT include the opening php tag | |
//* ALL EXAMPLES ON THIS PAGE USE THE NEW HTML5 METHOD | |
//* Remove page titles site wide (posts & pages) (requires HTML5 theme support) | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="robots" content="noodp, noydir" /> | |
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com"> | |
<link rel="canonical" href="http://mysite.com/" /> | |
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" /> |
<?php //* mind this opening php tag | |
/** | |
* Display Last Updated date if a post has been updated (Genesis Framework) | |
*/ | |
add_filter( 'genesis_post_info', 'rv_post_info_filter' ); | |
function rv_post_info_filter( $post_info ) { | |
global $post; |
<?php | |
/** | |
* Remove Post Title from Breadcrumb. | |
* | |
* Takes a substring of crumb, starting at 0, with a length of up to the last occurrence of the | |
* (start of the) separator string. | |
*/ | |
function be_remove_title_from_single_crumb( $crumb, $args ) { | |
return substr( $crumb, 0, strrpos( $crumb, $args['sep'] ) ); |
<?php | |
/* | |
* Add to WordPress a widget to select the categories to be displayed in a sidebar. | |
* The links are ordered by the number of posts of each category. | |
* Author: Tatiane Pires | |
* Author URI: http://tatianepires.com.br/ | |
* Version: 1.0 | |
*/ | |
/* |
$wp_customize->add_setting( 'themeslug_text_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'default' => 'Lorem Ipsum', | |
'sanitize_callback' => 'sanitize_text_field', | |
) ); | |
$wp_customize->add_control( 'themeslug_text_setting_id', array( | |
'type' => 'text', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Text' ), |