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',... Continue Reading →

Enable or Disable Section By Option Tree

in theme-options.php array( 'label'       => 'Enable slider', 'id'          => 'pp_slider_on', 'type'        => 'select', 'desc'        => 'Show slider on homepage', 'choices'     => array( array( 'label'       => 'Yes', 'value'       => 'yes' ), array( 'label'       => 'No', 'value'       => 'no' ) ), 'std'         => 'yes', 'rows'        => '', 'post_type'   => '', 'taxonomy'    => '', 'class'       => '', 'section'    ... Continue Reading →

Showing Meta Box Gallery Image As Slider

<?php $slides = get_post_meta($post->ID,'pf_gal',false ); $slides = explode(',',$slides[0]); foreach( $slides as $ids ) { $big_img_src = wp_get_attachment_image_src( $ids, 'full' ); ?> <li> <a href="<?php echo $big_img_src[0]; ?>" class="single-image" title="<?php the_title(); ?>" rel="single-project"> <img src="<?php echo $big_img_src[0]; ?>" alt="Altered"> </a> </li> <?php } ?>

Showing Gallery Image From Option Tree

<?php $images = explode( ',', ot_get_option('shop_1') ); if ( ! empty( $images ) ) { foreach( $images as $id ) { if ( ! empty( $id ) ) { $full_img_src = wp_get_attachment_image_src($id, 'full'); //print_r($full_img_src); //$thumb_img_src = wp_get_attachment_image_src( $id); echo '<li><a href="#"><img src="' . $full_img_src[0] . '" alt="image"></a></li>'; } } } ?>

Adding Meta Box Value Structure Format

Adding -- meta-boxes.php in functions.php <?php add_action( 'admin_init', 'custom_meta_boxes' ); function custom_meta_boxes() { $page_meta_box = array( 'id'        => 'page_meta_box', 'title'     => 'Page Extra Fields', 'desc'      => '', 'pages'     => array( 'page' ), 'context'   => 'normal', 'priority'  => 'high', 'fields'    => array( array( 'id'          => 'page_banner_image', 'label'       => 'Upload page header image', 'desc'        => '', 'std'        ... Continue Reading →

Adding Theme Option

In theme-options.php -- <?php add_action('admin_init', 'custom_theme_options', 1 ); function custom_theme_options() { $saved_settings = get_option('option_tree_settings', array() ); $custom_settings = array( 'sections' => array( array( 'id' => 'member', 'title' => 'Member' ), array( 'id' => 'contact', 'title' => 'Contact' ) ), 'settings' => array( array( 'id' => 's_a1', 'label' => 'Twitter :', 'type' => 'tab', 'section' =>... Continue Reading →

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: