Friday, September 5, 2014

Theam Options in Wordpress

// Make Changes in Theame Options.php file




//****=============================================================================****//
//****-----------This code is used for Box one Settings----------****//
//****=============================================================================****//

$options[] = array( "name" => "Home page",
"type" => "heading");

$options[] = array( "name" => "Box One Image",
"desc" => "Home page First Image",
"id" => "box_one_image",
"std" => "",
"type" => "upload");

$options[] = array( "name" => "Box One Heading",
"desc" => "Home page First Heading",
"id" => "box_one_heading",
"std" => "",
"type" => "text");

$options[] = array( "name" => "Box One Description",
"desc" => "Home page First Per",
"id" => "box_one_text",
"std" => "",
"type" => "textarea");


$options[] = array( "name" => "Box One  Read more Link",
"desc" => "Home page First Link",
"id" => "box_one_link",
"std" => "",
"type" => "text");

$options[] = array( "name" => "Box One  Read more Text",
"desc" => "Home page First Link Text",
"id" => "box_one_link_text",
"std" => "",
"type" => "text");







$options[] = array( "name" => "Box Two Image",
"desc" => "Home page First Image",
"id" => "box_two_image",
"std" => "",
"type" => "upload");

$options[] = array( "name" => "Box Two Heading",
"desc" => "Home page First Heading",
"id" => "box_two_heading",
"std" => "",
"type" => "text");

$options[] = array( "name" => "Box Two Description",
"desc" => "Home page First Per",
"id" => "box_two_text",
"std" => "",
"type" => "textarea");


$options[] = array( "name" => "Box Two Read more Link",
"desc" => "Home page First Link",
"id" => "box_two_link",
"std" => "",
"type" => "text");

$options[] = array( "name" => "Box Two Read more Text",
"desc" => "Home page First Link Text",
"id" => "box_two_link_text",
"std" => "",
"type" => "text");







$options[] = array( "name" => "social icon",
"type" => "heading");

$options[] = array( "name" => "icon-1",
"desc" => "facebook icon",
"id" => "icon-fb",
"std" => "",
"type" => "upload");


$options[] = array( "name" => "icon-2",
"desc" => "facebook google",
"id" => "icon-google",
"std" => "",
"type" => "upload");


















// Make this file in front-page.php



<div class="large-12 columns margin">
     
     
     
       <div class="large-4 medium-4 columns ">
<div class="box-border">
               
                 <?php if ( get_option('box_one_image') !='' ) { ?>
                 <img src="<?php echo get_option('box_one_image'); ?>" class="boximage" />
                        <?php } else { ?>
                   
                        <?php } ?>
                       

<div class="text">
                          <?php if ( get_option('box_one_heading') !='' ) { ?>
                <h5><?php echo get_option('box_one_heading'); ?></h5>
                        <?php } else { ?>
                 
                        <?php } ?>
                       
                       
<?php if ( get_option('box_one_text') !='' ) { ?>
                <p><?php echo get_option('box_one_text'); ?></p>
                        <?php } else { ?>
                 
                        <?php } ?>


<?php if ( get_option('box_one_link_text') !='' ) { ?>
               <a href="<?php echo get_option('box_one_link'); ?>" class="right"><?php echo get_option('box_one_link_text'); ?></a>
                        <?php } else { ?>
                 
                        <?php } ?>




</div>
</div>
    </div>
 
       <div class="large-4 medium-4 columns ">
<div class="box-border">

   <?php if ( get_option('box_two_image') !='' ) { ?>
                 <img src="<?php echo get_option('box_two_image'); ?>" class="boximage" />
                        <?php } else { ?>
                   
                        <?php } ?>
                       

<div class="text">
                          <?php if ( get_option('box_two_heading') !='' ) { ?>
                <h5><?php echo get_option('box_two_heading'); ?></h5>
                        <?php } else { ?>
                 
                        <?php } ?>
                       
                       
<?php if ( get_option('box_two_text') !='' ) { ?>
                <p><?php echo get_option('box_two_text'); ?></p>
                        <?php } else { ?>
                 
                        <?php } ?>


<?php if ( get_option('box_two_link_text') !='' ) { ?>
               <a href="<?php echo get_option('box_two_link'); ?>" class="right"><?php echo get_option('box_two_link_text'); ?></a>
                        <?php } else { ?>
                 
                        <?php } ?>




</div>
</div>
    </div>
</div>



No comments: