$post = $suggestion;
            ?>
	<div class="entry search-entry main-large">
		<?php 
            echo $this->grabPostThumbIfAny(get_the_ID(), 'mediateca-thumb');
            ?>
		<div class="results-text-box">
		<h4 class="search-result-entry-title"><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h4>
		<p class="postmetadata">Pubblicato in <?php 
            echo dito_printObjectTermsInNiceFormat(get_the_ID(), array(), array('eta'));
            ?>
</p>
		<?php 
            if (function_exists('the_advanced_excerpt')) {
                echo pippin_excerpt_by_id($suggestion, 55);
            } else {
                the_content();
            }
            ?>
		</div>		
	</div>
<?php 
        }
    }
    $this->paginationLinks();
Ejemplo n.º 2
0
 private function printMetaBoxesContent($start = 0, $depth = 1)
 {
     global $post;
     $id = $post->ID;
     $tmp = array();
     $boxes = Mediateca_Admin::$meta_boxes[0];
     foreach ($boxes as $box) {
         if (in_array($post->post_type, $box['pages'])) {
             array_push($tmp, $box);
         }
     }
     $output = '';
     $a = '';
     $link = '';
     for ($i = $start; $i < $depth; $i++) {
         if (isset($tmp[$i])) {
             $control_terms = $this->postHasTerm($post->ID, 'sezione-libri', 'libri-sulla-disabilita');
             if ('Accessibilit&agrave; del volume' == $tmp[$i]['title'] && $control_terms) {
                 $tmp[$i]['title'] = 'Tipo di disabilit&agrave;';
             }
             $output .= '<li class="title-boxes position_' . $start . '">' . $tmp[$i]['title'] . '</li>';
             foreach ($tmp[$i]['fields'] as $field) {
                 if ($field['name'] === 'Featured Image') {
                     continue;
                 }
                 if ($field['name'] === 'Link editore/produttore') {
                     $link = get_post_meta($id, $field['id'], true);
                     continue;
                 }
                 if (array_key_exists('taxonomy', $field)) {
                     if ($control_terms && $field['name'] == 'Accessibilit&agrave; primaria') {
                         $field['name'] = 'Si parla di';
                     } elseif ($field['name'] == 'Accessibilit&agrave; primaria') {
                         $field['name'] = 'Pensato per';
                     }
                     if ($control_terms && $field['name'] == 'Accessibilit&agrave; secondaria') {
                         $field['name'] = 'Utile anche in caso di';
                     } elseif ($field['name'] == 'Accessibilit&agrave; secondaria') {
                         $field['name'] = 'Utile anche in caso di';
                     }
                     $term = dito_printObjectTermsInNiceFormat($id, array($field['taxonomy']));
                     $output .= $term ? '<li><strong>' . $field['name'] . ':</strong> ' . $term . '</li>' : '';
                 } elseif ($field['name'] === 'Editore/distributore') {
                     $field['name'] = $post->post_type == HARDWARE_TYPE ? 'Produttore' : $field['name'];
                     $meta = get_post_meta($id, $field['id'], true);
                     $output .= $meta ? '<li><strong>' . $field['name'] . ':</strong> <a href="' . $link . '">' . $meta . '</a></li>' : '';
                 } else {
                     if (strpos($field['type'], 'dio') && count($field['options']) == 2) {
                         $output .= $this->manageBooleanMetas($field['id'], $field['name'], $id, '');
                     } else {
                         $meta = get_post_meta($id, $field['id'], true);
                         $meta = $field['name'] == 'Prezzo' ? $meta . '&euro;' : $meta;
                         $meta = $field['type'] == 'select' && is_numeric($meta) && count($field['options']) > 2 ? $meta . ' su ' . (count($field['options']) - 1) : $meta;
                         $output .= $meta ? '<li><strong>' . $field['name'] . ':</strong> ' . $meta . '</li>' : '';
                     }
                 }
             }
         }
     }
     if ($output) {
         $a = '<ul class="mediateca-meta-below-title">' . $output . '</ul>';
     }
     return $a;
 }
Ejemplo n.º 3
0
" class="post-title"><a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="Permanent Link to <?php 
        the_title_attribute();
        ?>
"><?php 
        the_title();
        ?>
</a></h4>
				<!-- <small class="postmetadata"><?php 
        the_time('l, j F, Y');
        ?>
</small>-->
				<p class="postmetadata">Pubblicato in <?php 
        echo dito_printObjectTermsInNiceFormat($post->ID);
        ?>
</p>
					<?php 
        if (function_exists('the_advanced_excerpt')) {
            the_advanced_excerpt('length=150&use_words=0&no_custom=1&ellipsis=%26hellip;&exclude_tags=img');
        } else {
            echo "Attivare la plugin Advanced Excerpt";
        }
        ?>
			<p class="postmetadata"><?php 
        edit_post_link('Edit', '', ' | ');
        ?>
  <?php 
        comments_popup_link('Nessun Commento &#187;', '1 Commento &#187;', '% Commenti &#187;');
        ?>