Skip to content

Instantly share code, notes, and snippets.

<?php
//Loading CSS
function ultimate_hover_effects_style() {
wp_enqueue_script('jquery');
wp_enqueue_style('uhe_default', plugins_url( '/css/default.css' , __FILE__ ) );
wp_enqueue_style('uhe_component', plugins_url( '/css/component.css' , __FILE__ ) );
wp_enqueue_script('uhe_modernizr_js', plugins_url( '/js/modernizr.custom.js' , __FILE__ ) );
wp_enqueue_script('uhe_toucheffects_js', plugins_url( '/js/toucheffects.js' , __FILE__ ) );
<?php
// Registering Custom Post
add_action( 'init', 'ultimate_hover_effects_custom_post' );
function ultimate_hover_effects_custom_post() {
register_post_type( 'ultimate-effects',
array(
'labels' => array(
'name' => __( 'U Hover Effects' ),
'singular_name' => __( 'Hover Item' ),
<?php
/**
* Enqueue scripts and styles.
*/
function tunu_scripts() {
/*
$font = esc_html(get_theme_mod('font'));
@themebon
themebon / elements-to-center.css
Created December 27, 2016 10:25
Elements to Center
Another way (not mentioned here yet) is with Flexbox.
Just add the following code to the container element:
display: flex;
justify-content: center; /* align horizontal */
align-items: center; /* align vertical */