Esempio n. 1
0
function snowball_add_custom_code()
{
    if (get_post_type(get_the_id()) == 'snowball') {
        $article = snowball_get_article(get_the_id(), 0);
        $output = $article['head_html'];
        echo $output;
    }
}
Esempio n. 2
0
<?php

global $article;
global $post;
global $option;
setup_postdata($post);
$snowball = array('adminUrl' => admin_url(), 'author' => get_the_author(), 'blogname' => get_bloginfo(), 'blogurl' => get_site_url(), 'date' => get_the_date(), 'excerpt' => get_the_excerpt(), 'includesUrl' => includes_url(), 'pluginsUrl' => plugins_url('', __FILE__), 'title' => get_the_title(), 'url' => get_permalink());
$article = snowball_get_article($post->ID, $preview);
$option = $article["theme_option"];
?>

<?php 
if ($option == 1) {
    ?>
  <?php 
    get_header();
} else {
    ?>
  <!DOCTYPE html>
    <html 
    <?php 
    language_attributes();
    ?>
     class="no-js">
    <head>
    <meta charset="<?php 
    bloginfo('charset');
    ?>
">
    <meta name="viewport" content="width=device-width">
    <title>