Showing Section On Different way

 

In theme-options.php–

array(
‘id’ => ‘portfolio_layout’,
‘label’ => ‘» Choose portfolio layout ꜜ’,
‘type’ => ‘radio-image’,
‘section’ => ‘portSel’,
‘choices’ => array(
array(
‘value’ => ‘playout1’,
‘label’ => ‘Two column layout showing’,
‘src’ => get_template_directory_uri().’/p-layout/1.jpg’,
),
array(
‘value’ => ‘playout2’,
‘label’ => ‘Three column layout showing’,
‘src’ => get_template_directory_uri().’/p-layout/2.jpg’,
),
array(
‘value’ => ‘playout3’,
‘label’ => ‘Four column layout showing’,
‘src’ => get_template_directory_uri().’/p-layout/3.jpg’,
),
)
),

In Front-end–

<?php
if( ot_get_option(‘portfolio_layout’) == ‘playout1’){
get_template_part(‘p-layout/playout1’);
}elseif( ot_get_option(‘portfolio_layout’) == ‘playout2’ ){
get_template_part(‘p-layout/playout2’);
}else{
get_template_part(‘p-layout/playout3’);
}
?>

In plaout1 —

<?php get_template_part(‘p-layout/template/p-heading’) ?>

<?php get_template_part(‘p-layout/template/p-2c’) ?>

Advertisements

Published by

oudarya

I am a developer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s