Example #1
0
        <?php 
wp_head();
?>
    </head>

    <body <?php 
body_class();
?>
>

        <?php 
$farmtoyou_options = get_option('farmtoyou_options');
$fb_url = isset($farmtoyou_options['fb_url']) ? farmtoyou_escape_attr($farmtoyou_options['fb_url']) : '';
$tw_url = isset($farmtoyou_options['tw_url']) ? farmtoyou_escape_attr($farmtoyou_options['tw_url']) : '';
$pt_url = isset($farmtoyou_options['pt_url']) ? farmtoyou_escape_attr($farmtoyou_options['pt_url']) : '';
$insta_url = isset($farmtoyou_options['insta_url']) ? farmtoyou_escape_attr($farmtoyou_options['insta_url']) : '';
?>

        <div class="top-section orange-bg">
            <div class="container">
                <div class="col-md-6 top-left">
                    <?php 
if (!empty($fb_url) || !empty($tw_url) || !empty($pt_url) || !empty($insta_url)) {
    ?>
                        <ul>
                            <?php 
    if (!empty($fb_url)) {
        ?>
                                <li><a href="<?php 
        echo $fb_url;
        ?>
Example #2
0
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
global $post;
$prefix = FARMTOYOU_META_PREFIX;
$post_id = $post->ID;
$link = get_post_meta($post_id, $prefix . 'link', true);
$link = !empty($link) ? farmtoyou_escape_attr($link) : '';
?>
<table class="form-table farmtoyou-form-table">
    
    <tr>
        <td>
            <label for="<?php 
echo $prefix;
?>
link"><?php 
_e('Read More Link', 'farmtoyou');
?>
</label>
        </td>
        <td>
            <input type="text" name="<?php