Exemple #1
0
<div class="post-content"><?php 
    clm_the_post_excerpt($excerpt_length = 15);
    ?>
</div></a>

<div class="post-date"><?php 
    the_time('j F G:i');
    ?>
</div>
</div>
<?php 
    if (clm_get_option('ads_120_600_post', '') != '') {
        ?>
<div style="float:left; margin-top:10px;">
<?php 
        echo clm_get_option('ads_120_600_post');
        ?>
</div>
<?php 
    }
}
wp_reset_postdata();
?>
</div>
<div id="post-entry">
<?php 
$current_page = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('post__not_in' => get_option('sticky_posts'), 'paged' => $current_page);
$query2 = new WP_Query($args);
while ($query2->have_posts()) {
    $query2->the_post();
Exemple #2
0
function clm_general_options_page()
{
    global $_POST, $clm_favicon_url;
    if (isset($_POST['update_options']) && $_POST['update_options'] == 'true') {
    }
    ?>
	
	    <div class="wrap">
		<div id="icon-options-general" class="icon32"><br /></div>
      		<h2><?php 
    _e('Columnist General Options', 'columnist');
    ?>
</h2>

        <form method="post" action="options.php">
		<?php 
    wp_nonce_field('update-options');
    settings_fields('clm_general_options_page');
    ?>
			
            <table class="form-table">

 <tr valign="top">
                    <th scope="row"><label for="clm_favicon_url"><?php 
    _e('Favicon:', 'columnist');
    ?>
</label></th>
                    <td><input type="text" name="clm_favicon_url" size="95" 
					  value="<?php 
    echo sanitize_text_field(clm_get_option('clm_favicon_url'));
    ?>
"/>
					<br/>
					<span class="description"> 
					<?php 
    printf(__('<a href="%s" target="_blank">Upload your favicon</a> using WordPress Media Library and insert its URL here', 'columnist'), home_url() . '/wp-admin/media-new.php');
    ?>
					</span><br/><br/>
					<img src="<?php 
    echo sanitize_text_field(clm_get_option('clm_favicon_url'));
    ?>
" alt=""/>
					</td>
                </tr>	  		
			    										
				<tr valign="top">
                    <th scope="row"><label for="ads_120_600_post"><?php 
    _e('120x600 adsense code for sticky post:', 'columnist');
    ?>
</label></th>
                    <td><textarea style="width:100%" name="ads_120_600_post"><?php 
    echo esc_textarea(clm_get_option('ads_120_600_post'));
    ?>
</textarea></td>
                </tr>

<tr valign="top">
					<th scope="row"><label for="clm_show_bottom"><?php 
    _e('Show bottom entries', 'columnist');
    ?>
</label></th>
				    <td><input name="clm_show_bottom" type="checkbox" id="clm_show_bottom" value="1" <?php 
    checked('1', get_option('clm_show_bottom'));
    ?>
 />
					<?php 
    _e('Show', 'columnist');
    ?>
					</td>
                </tr> 					
	
            </table>
	<input type="hidden" name="action" value="update" />
	<input type="hidden" name="page_options" value="clm_favicon_url, ads_120_600_post, clm_show_bottom" />
	<p><a href="https://twitter.com/wpmole" class="twitter-follow-button" data-show-count="false">Follow @wpmole</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> <a href="http://www.facebook.com/pages/WPMole/142454599181539" target="_blank"><img src="<?php 
    echo get_template_directory_uri();
    ?>
/images/facebook.png" /></a>  <a href="http://wpmole.com" target="_blank">WPMole</a></p>	
     			<p><?php 
    submit_button();
    ?>
</p>
        </form>
		
    </div>
	<?php 
    if (!empty($_POST) && check_admin_referer('update-options')) {
    }
}