Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter adrientou

    (@adrientou)

    thanks a lot, i didn’t know much about php and that helped a lot. Everything is working now, perfectly.

    I have done like you said, with reset postdata too.

    Wonderful help, and plugin!

    Thread Starter adrientou

    (@adrientou)

    Thanks a lot!
    It’s probably something i’m not doing right in the php file (wich i did not create myself actually, i work on a website created by someone else)

    i’ve tried with

    <?php echo do_shortcode(‘[note]This is the footnote content.[/note]’); ?>

    but sill not working, on this page for example; http://www.lyber-eclat.net/lyber/terresdesvilles-4-les-toits-potentiels-fabules/#easy-footnote-bottom-1-5154

    The template code is:

    <?php
    /**
     * @package WordPress
     * @subpackage Smartbox
     */
    get_header(); 
    		global $smartbox_reading_option; $smartbox_reading_option = get_option(DESIGNARE_SHORTNAME.'_blog_reading_type');
    		
    		global $smartbox_more;
    			$smartbox_more = 0;
    
    		?>
    		<div class="fullwidth-container" style="	    	
    	    	<?php 
    		    	global $smartbox_custom, $smartbox_styleColor;	    		
    	    		$type = des_get_value(DESIGNARE_SHORTNAME."_header_type");
    	    		if (empty($type)) $type = des_get_value(DESIGNARE_SHORTNAME."_header_type option:selected");
    				$color = des_get_value(DESIGNARE_SHORTNAME."_header_color"); 
    				$image = des_get_value(DESIGNARE_SHORTNAME."_header_image"); 
    				$pattern = DESIGNARE_PATTERNS_URL.des_get_value(DESIGNARE_SHORTNAME."_header_pattern"); 
    				$height = des_get_value(DESIGNARE_SHORTNAME."_header_height"); 
    				$margintop = des_get_value(DESIGNARE_SHORTNAME."_header_text_margin_top");	
    				$banner = des_get_value(DESIGNARE_SHORTNAME."_banner_slider");
    				if (empty($banner)) $banner = des_get_value(DESIGNARE_SHORTNAME."_banner_slider option:selected");
    		 		if ($height != "") echo "height: ". $height . ";";
    				if($type == "none") echo "background: none;"; 
    				if($type == "color") echo "background: #" . $color . ";";
    				if($type == "image") echo "background: url(" . $image . ") no-repeat; background-size: 100% auto";  
    	 			if($type == "pattern") echo "background: url('" . $pattern . "') 0 0 repeat;";
    	 			if($type == "border") echo "background: white;";
    	    	?>">
    			
    			<?php
    		    	if ($type === "banner"){
    			    	?>
    			    	<div class="revBanner"> <?php putRevSlider(substr($banner, 10)); ?> </div>
    			    	<?php
    		    	} else {
    	    	?>
    
    					
    					<div class="container index-container">
    							<div class="pageTitle sixteen columns" <?php if ($margintop != "") echo " style='margin-bottom: ".$margintop.";margin-top: ".$margintop.";'"; ?>>
    				    			<h1 class="page_title" style="<?php 
    				    	
    							$tcolor = des_get_value(DESIGNARE_SHORTNAME."_header_text_color"); //get_post_meta($post->ID, 'headerTextColor_value', true);
    							$tsize = des_get_value(DESIGNARE_SHORTNAME."_header_text_size"); //get_post_meta($post->ID, 'headerTextSize_value', true);
    							
    							echo "color: #$tcolor; font-size: $tsize";
    				    	
    			    	?>"><?php echo get_option(DESIGNARE_SHORTNAME."_index_primary_title"); ?></h1>
    			    	
    			    			<?php
    						    	if (get_option(DESIGNARE_SHORTNAME."_index_secondary_title") != ""){	?>
    							    <h2 class="secondaryTitle" style="<?php
    						    		
    								    $stcolor = des_get_value(DESIGNARE_SHORTNAME.'_secondary_title_text_color');
    									$stsize = str_replace(" ", "", des_get_value(DESIGNARE_SHORTNAME.'_secondary_title_text_size'));
    									
    									echo "color: #$stcolor; font-size: $stsize; line-height: $stsize;";
    						    		
    					    		?>" ><?php echo get_option(DESIGNARE_SHORTNAME."_index_secondary_title"); ?></h2>
    					    		<?php
    					    		}	
    				    		?>
    						</div>
    					</div>
    				</div>
    			<?php } ?>
    	
    	
    			
    			<div class="container">
    		   	<?php if (have_posts()): ?>
    				
    				<?php
    
    				    while ( have_posts() ) : 
    							
    				    	the_post();	 
    				    	$prefix = '_lyber_';
    				    	$bookID = get_post_meta($post->ID, $prefix.'book', true);
    				    	$ID = get_the_ID();
    
    				    	// $pbook = get_post( $book );
    		
    				    	$title = get_the_title( $bookID );
    
    				    	$prefix = '_book_';
    				    	$sauthor = get_post_meta( $bookID, $prefix.'sauthor', true);
    				    	$authorpre = get_post_meta( $bookID, $prefix.'authorpre', true); // préface auteur
    				    	$stitle = get_post_meta( $bookID, $prefix.'stitle', true);
    				    	// $gbook = get_post_meta( $bookID, $prefix.'gbook', true);
    				    	$libraires = get_post_meta( $bookID, $prefix.'libraires', true);
    				    	$lekti = get_post_meta( $bookID, $prefix.'lekti', true);
    				    	$guid = get_permalink( $bookID );
    				    	$auteurs = wp_get_post_terms( $bookID, 'auteur');
    				    	$content = get_the_content();
    				    	$lyberTitle = get_the_title();
    				    	wp_reset_postdata();
    
    				    	
    						$args = array(
    							'post_type' => 'lyber',
    							'orderby' => 'menu_order',
    						   	'order' => 'ASC',
    						   	'meta_query' => array(
    						       array(
    						           'key' => '_lyber_book',
    						           'value' => $bookID
    						       )
    						   )
    						 
    						);
    						$the_lyber = new WP_Query( $args );
    						if ( $the_lyber->have_posts() ){
    						    $lyberUl = '<ul>';
    							$first = true;
    							while ( $the_lyber->have_posts() ){
    								$the_lyber->the_post();
    								if ($first)
    									$firstLyber = '<a href="'. get_the_permalink().'">';
    								else
    									$first = false;
    								$lyberUl .= '<li>';
    								if ($ID != get_the_ID()){
    									$lyberUl .= '<a href="'. get_the_permalink().'">';
    								}
    									$lyberUl .= get_the_title();
    
    								if ($ID != get_the_ID()){
    									$lyberUl .= '</a>';
    								}
    								$lyberUl .= '</li>';
    							}
    						    $lyberUl .= '</ul>';
    						}
    						else{
    						 	$lyberUl = '';
    						}
    				    ?>
    				    	
    						    <div class="gg16 cc topcc">
    						    	<?php foreach ($auteurs as $auteur): ?>
    									<a href="<?php echo get_site_url().'/auteurs/'.$auteur->slug; ?>"><h3><?= $auteur->name; ?></h3></a>
    					    		<?php endforeach; ?>
    
    					    		<a href="<?= $guid; ?>"><h1><?= $title; ?></h1></a>
    								<?php if (!empty($stitle)): ?>
    				    				<h2><?= $stitle; ?></h2>
    				    			<?php endif; ?>
    
    				    			<?php if (!empty($sauthor)): ?>
    				    				<h3><?= $sauthor; ?> (sous la direction de)</h3>
    				    			<?php endif; ?>
    
    				    			<?php if (!empty($authorpre)): ?>
    				    				<h4><?= $authorpre; ?></h4>
    				    			<?php endif; ?>
    					    		<div class="lyber-head-title">
    					    			<h1 class="lybertitle"><?= $lyberTitle; ?></h1>
    					    			<?= $firstLyber; ?><img src="<?php bloginfo('template_directory'); ?>/img/lyber.png" alt="Lyber" id="lyber"></a>
    					    		</div>
    						    </div>
    						    <div class="gg9 cc">
    						    	
    
    						    	<div class="gg9px cc">
    						    		<?= $content; ?> 
    						    		<?php echo do_shortcode('[note]This is the footnote content.[/note]'); ?>					
    
    						    	</div>
    					    	</div>
    				    		
    					    	<!-- <div class="gg2 cc"></div> -->
    					    	<div class="gg4pre3 cc">
    					    		
    									<div class="book_thumb">
    										<a href="<?= $guid; ?>"><?php  echo get_the_post_thumbnail( $bookID, 'large' ); ?></a>
    									</div>
    									<div class="encart">
    							    		<a href="<?= $guid; ?>"><span class="consult">RETOUR A LA FICHE DU LIVRE</span></a>
    							    	</div>
    							    	<div class="encart">
    							    		<span class="consult">CONSULTER LE LYBER</span>
    							    		<div class="lyberbook"></div>
    							    		<?php if (! empty($lyberUl) ):?>
    											<?= $lyberUl; ?>
    										<?php endif; ?>
    								    </div>
    								    
    								    <?php if (!empty($libraires) || !empty($lekti)): ?>
    								    	<div class="buyview">
    											<span>ACHETER LE LIVRE</span>
    											<?php if (!empty($libraires)): ?>
    												<div id="buylink">
    													<a href="<?= $libraires; ?>" target="_blank"><div class="buy"></div></a>
    													<a href="<?= $libraires; ?>" target="_blank"><span>Places des libraires</span></a>
    												</div>
    											<?php endif; ?>
    											<?php if (!empty($lekti)): ?>
    												<div id="buylink">
    													<a href="<?= $lekti; ?>" target="_blank"><div class="buy"></div></a>
    													<a href="<?= $lekti; ?>" target="_blank"><span>Ombres Blanches</span></a>
    												</div>
    											<?php endif; ?>
    										</div>
    								    <?php endif; ?>
    								    
    								    <?php if (!empty($gbook)): ?>
    								    	<div id="gbookview">
    											<a href="<?= $gbook; ?>" target="_blank"><div class="gbook"></div></a>
    											<a href="<?= $gbook; ?>" target="_blank"><span>Consulter le livre</span></a>
    										</div>
    								    <?php endif; ?>
    					    	</div>
    					    	
    					    	<div class="gg5pre2 cc">&nbsp;</div>
    					    	<div class="gg16 cc bottomcc"></div>
    				    <?php endwhile; ?>
    	
    				<div class="navigation">
    					<?php
    						
    						global $smartbox_reading_option;
    						if ($smartbox_reading_option != "paged"){ ?>
    							<div class="next-posts"><?php  next_posts_link('&laquo; ' . __(get_option(DESIGNARE_SHORTNAME."_previous_text"), "smartbox"), $wp_query->max_num_pages);  ?></div>
    								<div class="prev-posts"><?php  previous_posts_link(__(get_option(DESIGNARE_SHORTNAME."_next_text"), "smartbox") . ' &raquo;', $wp_query->max_num_pages); ?></div>		
    						<?php
    						} else { 
    							wp_pagenavi();
    						}
    					?>
    					
    				</div>
    						
    			<?php endif; ?>
    		</div>
    	</div>
    			
    	
    
    	<div class="clear"></div>
    	
    	
    <?php get_footer(); ?>
    • This reply was modified 7 years, 7 months ago by adrientou.
Viewing 2 replies - 1 through 2 (of 2 total)