Skip to main content

Posts

Showing posts from December, 2018

Get Custom Taxonomy terms list in wordpress

<?php $wcatTerms = get_terms('intro_category', array('hide_empty' => 0, 'parent' =>0));    foreach($wcatTerms as $wcatTerm) :    ?> <ul>    <li>       <a href="<?php echo get_term_link( $wcatTerm->slug, $wcatTerm->taxonomy ); ?>"><?php echo $wcatTerm->name; ?></a>       <ul class="megaSubCat">          <?php             $wsubargs = array(                'hierarchical' => 1,                'show_option_none' => '',                'hide_empty' => 0,                'parent' => $wcatTerm->term_id,                'taxonomy' => 'intro_category'             ...

Add Custom Sections and panel in wordpress customize r

add_action( 'customize_register', 'customizer_test' ); function customizer_test($wp_customize){ $wp_customize->add_panel('some_panel',array(     'title'=>'Panel1',     'description'=> 'This is panel Description',     'priority'=> 10, )); $wp_customize->add_section('section',array(     'title'=>'section',     'priority'=>10,     'panel'=>'some_panel', )); $wp_customize->add_setting('setting_demo',array(     'defaule'=>'a', )); $wp_customize->add_control('contrl_demo',array(     'label'=>'Text',     'type'=>'text',     'section'=>'section',     'settings'=>'setting_demo', ));}

Stickey header

<style type="text/css"> .sticky {   position: sticky;   font-size: 32px;   top: 0;   width: 100%;   height: 100px;   padding: 1em 0;   background: #34495e;   color: white;   text-align: center;  transition: .32s; } .fixed {   font-size: 24px;   position: fixed;   height: 20px;   transition: .25s; } .top {   text-align: center;   background: #2980b9;   color: #fff; } .bottom {   padding: 5em 0;   background: #2980b9;   color: white;   text-align: center; } body {   margin: 0; } :root {   height: 1000%;   font-family: sans-serif; } </style> <div class="top">Scroll \/</div> <div class="sticky">Animated header</div> <div class="bottom">Content</div> <div class="bottom">Content</div> <div class="bottom">By: Felipe Martinin</div> <script type="text/...