Genesis Framework Hook zat dingdan

Genesis Framework kichi Studio Press in a bawl ahi a, WordPress site bawlnuam te ading in a guhgel chih ding ahi. Tulel in Framework zat theih ding tampi aom a, huaite lak a Genesis Framework minthangpen leh akizang tampen ahi.

Genesis Hook zat ding dan hiai dan ahi...

Visual Hook Guide / Genesis Simple Hooks Plugin

1. Static Page a widget area koih dingdan

Genesis a 'page.php' file copy inla na child theme folder ah koih in. Na chiamteh theih nadin a file min kheng in eg. 'custom-page.php'.

'custom-page.php' file hong (open) inla hiai ahuai a code paste in.


 /** Before Header **/
add_action( 'genesis_before_header', 'genesis_before_header_area' );
function genesis_before_header_area() {
genesis_widget_area( 'welcome-text-before-header', array(
'before' => '<div class="genesis_before_header_css widget-area">',
'after' => '</div>',
) );
}

* Template min chiamteh na dingin Template Name atunglam ah koih in ' * Template Name: Custom Page'

Tu'n 'functions.php' file hong inla, hiai anuai a code paste in


/** Before Header */
genesis_register_sidebar( array(
'id' => 'welcome-text-before-header',
'name' => __( 'Before Header', 'genesis' ),
'description' => __( 'This is widget area.', 'customtheme' ),
) );

Tu'n Page thak na create ching in Template option hiai 'Custom Page' select in.

* Hiai a tung a process omzia bel hiai page aki choose/select chiang a 'Before Header' widget ki display di, page dangte a hiai widget ki display lou di.

2. Function.php file zang a widget area create dingdan.

Hiai 'function.php' zang a widget na create leh na webpage tengteng a hiai widget dawk vek ding ahi

'function.php' file hong inla hiai a nuai a code paste in


/** Before Header */
genesis_register_sidebar( array(
'id' => 'welcome-text-before-header',
'name' => __( 'Before Header', 'genesis' ),
'description' => __( 'This is widget area.', 'customtheme' ),
) );

 /** --------- **/
add_action( 'genesis_before_header', 'genesis_before_header_area' );
function genesis_before_header_area() {
genesis_widget_area( 'welcome-text-before-header', array(
'before' => '<div class="genesis_before_header_css widget-area">',
'after' => '</div>',
) );
}

* Hiai a tung a style nazat leh na webpage tengteng a widget dawk ding ahihman in, page khenkhat a na hide nop leh hiai anuai a code na hide nopna page a koih in


//* Before Header
remove_action( 'genesis_before_header', 'genesis_before_header_area' );

Hiai a tunga No 1 leh 2 ki batlouhna ahih leh, No 1 pen ah widget area dawkdia i deih nateng a page a va call, a call louhna page a dawklou di himai. No 2 ah ahihleh 'function.php' tungtawn a widget area va call in, huaiziak a widget area page tengteng a dawk di, adawklou dia i deihna page a 'remove_action' zang a hide di himai, page 3 bang a dawklou di i deihleh a page teng a 'remove_action' vakoih ding himai.

3. CSS styling

Atung a widget area na bawl style na piaknop leh hiai dan in na style.css ah gelh in


.genesis_before_header_css      {
background:#f6f6f6;
padding: 30px;
}

Copyright © 2024 Siam Naulak.
magnifiercrossmenu