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
<select name="id_estados" id="id_estados"> | |
<option value="">UF</option> | |
<option value="AC">AC</option> | |
<option value="AL">AL</option> | |
<option value="AP">AP</option> | |
<option value="AM">AM</option> | |
<option value="BA">BA</option> | |
<option value="CE">CE</option> | |
<option value="DF">DF</option> | |
<option value="ES">ES</option> |
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 | |
// REGISTER THE COLUMN | |
add_filter('manage_contatos_posts_columns', 'posts_columns'); | |
function posts_columns($defaults){ | |
unset($defaults['post_date']); | |
$defaults['email'] = 'E-mail'; | |
return $defaults; | |
} | |
// RENDER THE COLUMN |
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 | |
add_action('admin_menu','add_new_page'); | |
function add_new_page(){ | |
function add_new_page_content(){ | |
include('inc-admin-new-page.php'); | |
} | |
add_menu_page('New Page', 'New Page', 'publish_posts', 'new-page','add_new_page_content',''); | |
} | |
// Google Presentation |
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 | |
add_action( 'login_head', 'custom_login_logo' ); | |
function custom_login_logo() { | |
echo ' | |
<style type="text/css"> | |
h1 a { background-image: url('.get_template_directory_uri().'/img/new-logo.png) !important; } | |
</style> | |
'; | |
} |
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 | |
add_action('wp_dashboard_setup', 'add_dashboard_widgets' ); | |
function add_dashboard_widgets() { | |
wp_add_dashboard_widget('dashboard_widget', 'Title', function($post, $callback_args){ | |
echo 'Hello world'; | |
}); | |
} |
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 | |
the_posts_pagination(array( | |
'mid_size' => 3, | |
'screen_reader_text' => ' ' | |
)); |
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 | |
add_action('init','register_new_post_type'); | |
function register_new_post_type(){ | |
$args = array( | |
'label' => 'New Type', | |
'show_ui' => true, | |
'supports' => array( 'title', 'editor', 'thumbnail' ), | |
'public' => true, | |
'hierarchical' => true, | |
'has_archive' => true |
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 | |
add_action( 'init', 'theme_widgets_init' ); | |
function theme_widgets_init() { | |
register_sidebar( array ( | |
'name' => 'Widget', | |
'id' => 'primary_widget_area', | |
'before_widget' => '<div id="%1$s" class="widget-container %2$s">', | |
'after_widget' => "</div>", | |
'before_title' => '<h3 class="widget-title">', | |
'after_title' => '</h3>', |
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 | |
function get_image_gallery_src( $post_id ) { | |
$gallery = get_post_gallery( $post_id, false ); | |
$gallery_id = explode( ',', $gallery['ids'] ); | |
$result = array(); | |
foreach ( $gallery_id as $key => $value ) { | |
$img = wp_get_attachment_image_src( $value, 'full' ); | |
array_push( $result, array( | |
'title' => get_the_title( $value ), | |
'src' => $img[0] |
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 | |
add_action( 'after_setup_theme', 'add_theme_supports' ); | |
function add_theme_supports() { | |
add_theme_support( 'title-tag' ); | |
add_theme_support( 'post-thumbnails' ); | |
add_theme_support( 'html5' ); | |
add_theme_support( 'custom-logo' ); | |
add_theme_support( 'woocommerce' ); | |
} |
OlderNewer