Semantic UI dropdown selected item on page load - semantic-ui

I'm trying to get Semantic UI's drop down to have a pre-selected option when the page loads in php as so but can't get it to be pre-selected any ideas?
<div class="ui fluid search selection dropdown">
<input type="hidden" name="status">
<i class="dropdown icon"></i>
<div class="default text">Select status</div>
<div class="menu">
<div class="<?php if ($profile['APPROVED']=="0") { echo "active ";} ?>item" data-value="0">XXXX</div>
<div class="<?php if ($profile['APPROVED']=="1") { echo "active ";} ?>item" data-value="1">YYYY</div>
<div class="<?php if ($profile['APPROVED']=="2") { echo "active ";} ?>item" data-value="2">ZZZZ</div>
<div class="<?php if ($profile['APPROVED']=="3") { echo "active ";} ?>item" data-value="3">QQQQ</div>
<div class="<?php if ($profile['APPROVED']=="4") { echo "active ";} ?>item" data-value="4">RRRRR</div>
<div class="<?php if ($profile['APPROVED']=="5") { echo "active ";} ?>item" data-value="5">EEEEE</div>
<div class="<?php if ($profile['APPROVED']=="6") { echo "active ";} ?>item" data-value="6">DDDDD</div>
</div>
</div>

OK needs to be initialised on document.ready :
$(document).ready(function () {
$('.approved.dropdown')
<?php if ($profile['APPROVED']=="0") { echo " .dropdown('set text', 'Pending'); .dropdown('set value', '0'); ";}
if ($profile['APPROVED']=="1") { echo " .dropdown('set text', 'Registered'); .dropdown('set value', '1'); ";}
if ($profile['APPROVED']=="2") { echo " .dropdown('set text', 'Documents Submitted'); .dropdown('set value', '2'); ";}
if ($profile['APPROVED']=="3") { echo " .dropdown('set text', 'Processing'); .dropdown('set value', '3'); ";}
if ($profile['APPROVED']=="4") { echo " .dropdown('set text', 'Approved'); .dropdown('set value', '4'); ";}
if ($profile['APPROVED']=="5") { echo " .dropdown('set text', 'Approved - Photo Uploaded'); .dropdown('set value', '5'); ";}
if ($profile['APPROVED']=="6") { echo " .dropdown('set text', 'Completed'); .dropdown('set value', '6'); ";} ?>
});

Related

Masonry + Infintine scroll implementation problems

I managed to implement infinite scroll with masonry in WordPress and it's working but I have a couple of bugs:
The posts are supposed to be opened in ajax, but it's not working for the added items now, only for the first few ones.
After all the posts are displayed the console outputs the error:
GET http://www.jcvergara.com/working/page/3/?_=1431138637809 404 (Not Found).
I'm not sure what it is related to. I would appreciate any ideas how to fix it.
Here is my code:
<div class="main">
<div id="content" class="container">
<div class="right-line"></div>
<!-- List of categories, only on the first page -->
<?php
$cur_url = $_SERVER['REQUEST_URI'];
if ($cur_url == '/working/') {
echo '<div class="item tags">';
echo '<div class="item-title">';
echo '<span class="tag">Tags</span>';
echo '<ul><li>All</li>';
wp_list_categories('orderby=term_group&title_li=');
echo '</ul></div></div>';
}
?>
<!-- Posts -->
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php $category = get_the_category(); ?>
<div class="item <?php echo $category[0]->slug; ?>">
<a class="mask post-link" rel="<?php the_ID(); ?>" href="<?php the_permalink(); ?>"></a>
<div class="item-title">
<span class="tag">
<?php echo $category[0]->cat_name; ?>
</span>
<h4><?php the_title(); ?></h4>
</div>
<div class="item-img">
<?php if (has_post_thumbnail( $post->ID ) ): ?>
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<div class="thumb" style="background-image: url('<?php echo $image[0]; ?>'); "></div>
<?php endif; ?>
</div>
<div class="item-text">
<?php the_excerpt(); ?>
<span class="more">Read more...</span>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<div class="clear"></div>
</div>
<?php the_posts_navigation(); ?>
</div>
The code for opening posts in ajax:
$(document).ready(function(){
$.ajaxSetup({cache:false});
$('.post-link').click(function(){
$('.openarticle').css('display', 'block');
var post_link = $(this).attr('href');
$('#openthis').html('<div class="title"><h2>Loading..</h2><div class="text"></div>');
$('#openthis').load(post_link);
$('<a></a>', {
text: 'Close',
class: 'close',
id: 'close',
href: '#'
})
.prependTo($('.openarticle .main'))
.click(function() {
$('.openarticle').css('display', 'none');
$('#close').remove();
});
return false;
});
});
Here is the link: http://www.jcvergara.com/working/
Thanks in advance.
You need to add the code for opening your posts in infinite-scroll's callback function. (BTW, You should actually include the specific code for infinite-scroll and your code to open the post in your question, not just give a link.)
Here is the part of the infinite-scroll code that should help:
function( newElements ) {
var $newElems = $( newElements );
$container.masonry( 'appended', $newElems );
//add this to your code
$('.post-link').click(function(){
$('.openarticle').css('display', 'block');
var post_link = $(this).attr('href');
$('#openthis').html('<div class="title"><h2>Loading..</h2><div class="text"></div>');
$('#openthis').load(post_link);
$('<a></a>', {
text: 'Close',
class: 'close',
id: 'close',
href: '#'
})
.prependTo($('.openarticle .main'))
.click(function() {
$('.openarticle').css('display', 'none');
$('#close').remove();
});
return false;
});
}
Your error message relates to there not being a page 3 to load by infinitescroll

How to use CSS to make block center or take up full width

I have a lot of small sections generate via php. They are different sizes. I want though that there is a text button on the bottom that will take up the full width.
I first had
display: block;
float: left;
But it was to much to the left, I then tried:
display: inline-block
But it was too small and there was extra space on either side. Here is a screenshot of it with the extra space. Any suggestions? I am working on the buy now button.
PHP Generate code
global $wpdb;
$cat= $_POST['cat'];
if($cat=='All')
{
$items = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'afp_items ORDER BY item_id ASC');
}else
{
$items = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'afp_items WHERE item_category="'.$cat.'" ORDER BY item_id ASC');
}
$output='';
$k = 1;
foreach ($items as $item ){
$output.='<div class="afp-single-item">
<img alt="" class="img-link-initial" src="' . $item->item_thumbnail . '">
<div class="item-overlay" style="display: none;">
<img src="' . $item->item_thumbnail . '" width="101%">
<div class="wishlist-details">';
if($item->item_title != null) { $output.='<h2>' . $item->item_title . '</h2>'; }
$output.='
<span>Share This</span>
</div>
';
if($item->item_link != null) { $output.='<a target="_blank" class="buynow" href="' . $item->item_link . '">Buy Now</a>
'; }
$output.='
</div>
</div>';
$k++;
}
$output.='</div><div class="afp-clear"></div>';
echo $output;
Template code:
<?php
/**
* Template Name: Shop Page Template
*
*/
get_header(); ?>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=54330784694";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<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>
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
<link rel='stylesheet' type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/isotop.css" />
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/jquery.isotope.js" type="text/javascript"></script>
<div id="show_wrap">
<div class="section-header" >
<h2>SHOP</h2>
</div>
<?php
global $wpdb;
//Get The Plugin Options
$afpOptions = get_option('afpOptions');
//SQL Queries
switch( $afpOptions['sort_items'] ){
case 'title':
$orderby = 'item_title ASC';
break;
case 'date':
$orderby = 'item_date DESC';
break;
case 'client':
$orderby = 'item_title ASC';
break;
case 'id':
$orderby = 'item_id ASC';
break;
}
$items = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'afp_items ORDER BY ' . $orderby);
if( $afpOptions['sort_cat'] == 'on' ){
$orderby = ' ORDER BY cat_name';
} else {
$orderby = '';
}
$cats = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'afp_categories' . $orderby);
?>
<div class="clear"></div>
<div class="portfolioFilter">
<?php
//AFP Main Container
echo 'All';
foreach ( $cats as $cat ){
echo '' . $cat->cat_name . '';
}
?>
</div>
<div class="portfolioContainer" style="padding-bottom:250px;">
<?php foreach ($items as $item ){ ?>
<div class="<?php echo ereg_replace("[^A-Za-z0-9]", "", $item->item_category); ?>">
<img alt="" class="img-link-initial" src="<?php echo $item->item_thumbnail; ?>">
<div class="item-overlay" style="display: none;">
<img src="<?php echo $item->item_thumbnail; ?>" width="101%">
<div class="wishlist-details">
<?php if($item->item_title != null) {?>
<h2><?php echo $item->item_title; ?></h2>
<?php } ?>
<p class="share_this">Share This</p>
<div class="shop_bottom_border_0ld"> </div>
<p class="social_share_box">
<div class="share_icon_only fleft"><div class="fb-share-button" data-href="<?php echo $item->item_link; ?>" data-type="button"></div></div>
<div class="share_icon_only fleft"><a target="_blank" href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $item->item_link; ?>" data-count="none">Tweet</a></div>
<div class="share_icon_only fleft" style="width:40px;">
<a target="_blank" href="http://www.pinterest.com/pin/create/button/?url='<?php echo $item->item_link;?>&media=<?php echo $item->item_thumbnail; ?>&description=<?php echo $item->item_title; ?>"
data-pin-do="buttonPin"
data-pin-config="above">
<img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" />
</a>
</div>
<div class="clear"></div>
</p><br />
<?php if($item->item_link != null) { ?>
<p><a target="_blank" class="buynow" href="<?php echo $item->item_link; ?>">Buy Now</a></p>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
</div>
<div class="afp-clear clear20"></div>
</div>
<script type="text/javascript">
$(window).load(function(){
var $container = $('.portfolioContainer');
$container.isotope({
filter: '*',
animationOptions: {
duration: 750,
easing: 'linear',
queue: false
}
});
$('.portfolioFilter a').click(function(){
$('.portfolioFilter .current').removeClass('current');
$(this).addClass('current');
var selector = $(this).attr('data-filter');
$container.isotope({
filter: selector,
animationOptions: {
duration: 750,
easing: 'linear',
queue: false
}
});
return false;
});
});
</script>
<?php get_footer(); ?>
And the CSS
.buynow {
background-color: #F5D2D5;
color: #FFFFFF;
display: block;
float: left;
font-size: 12px;
font-weight: 400;
height: 42px;
letter-spacing: 0.3em;
line-height: 42px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
width: 230px;
}
.shop_bottom_border{
border-bottom:1px solid #CCC;
margin-bottom:5px;
}

jQuery tools overlay only opening 1 element

So I am running in to an issue where I have a page in Wordpress querying a custom post type. It pull in the name and featured image. When you click the featured image it opens a popup with the content and some other info. Here is the link: http://pegasusemergencygrp.com.s164407.gridserver.com/who-we-are/meet-our-team/
This is the call in my page.php file:
<?php
query_posts(array('post_type' => 'doctors'));
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<aside class="doctor">
<span class="photo">
<?php the_post_thumbnail('full', array('data-rel' => "#$post->ID")); ?>
</span>
<ul>
<li><?php if(get_field('linkedin')) { echo '<span><a class="linkedin" target="_blank" href='. get_field('linkedin') .'>' . get_field('linkedin') . '</a></span>'; } ?></li>
<li><a title="<?php $values = get_field('type_of_doctor'); if($values) { foreach($values as $value) { echo '<span class='. $value .'>' . $value . '</span>'; } }?>"><?php $values = get_field('type_of_doctor'); if($values) { foreach($values as $value) { echo '<span class='. $value .'>' . $value . '</span>'; } }?></a></li>
<li><?php if(get_field('email_address')) { echo '<span class="email">' . get_field('email_address') . '</span>'; } ?></li>
<li><a title="<?php echo get_field('phone'); ?>"><?php if(get_field('phone')) { echo '<span class="phone">' . get_field('phone') . '</span>'; } ?></a></li>
</ul>
<p class="title"><?php the_title(''); ?> <?php if(get_field('location')) { echo '<span>' . get_field('location') . '</span>'; } ?></p>
<article class="simple_overlay" id="<?php the_id(); ?>">
<?php the_post_thumbnail('full'); ?>
<ul>
<li><?php if(get_field('linkedin')) { echo '<span><a class="linkedin" target="_blank" href='. get_field('linkedin') .'>' . get_field('linkedin') . '</a></span>'; } ?></li>
<li><a title="<?php $values = get_field('type_of_doctor'); if($values) { foreach($values as $value) { echo '<span class='. $value .'>' . $value . '</span>'; } }?>"><?php $values = get_field('type_of_doctor'); if($values) { foreach($values as $value) { echo '<span class='. $value .'>' . $value . '</span>'; } }?></a></li>
<li><?php if(get_field('email_address')) { echo '<span class="email">' . get_field('email_address') . '</span>'; } ?></li>
<li><a title="<?php echo get_field('phone'); ?>"><?php if(get_field('phone')) { echo '<span class="phone">' . get_field('phone') . '</span>'; } ?></a></li>
</ul>
<p class="title"><?php the_title(''); ?> <?php if(get_field('location')) { echo '<span>' . get_field('location') . '</span>'; } ?></p>
<div class="clear"></div>
<hr>
<p><?php the_content(); ?></p>
</article><!--end of .simple_overlay-->
</aside><!--end of .doctor-->
<?php endwhile; endif; wp_reset_query(); ?>
Here is my JS:
jQuery(document).ready(function() {
var imgatt = jQuery("span.photo a img").attr('data-rel');
jQuery("span.photo a img").overlay({
target: imgatt,
}); });
The script is semi working, when I click on the picture it pops open the info but if I click on the 2nd picture it pops open the first items info as well. They are both generating unique ID's on the data-rel tag with the post id and the overlay article class has the matching ID.
Source: http://jquerytools.org/demos/overlay/index.html
Solved the issue. Anyone who may stumble on this it appears jQuery Tools overlay has a hard time with the data-rel attribute on the featured image. Instead I re-configured the jQuery to find the rel tag on the anchor before the featured image and call the post id on the rel tag.
WP Code:
<a rel="#<?php the_id(); ?>" href="#<?php the_id(); ?>" class="bio"><?php the_post_thumbnail('full'); ?></a>
jQuery:
// Team Bios Overlay
jQuery(document).ready(function() {
jQuery('a.bio[rel]').overlay({
mask: '#000',
effect: 'apple'
});
});
Hope this helps someone else with a similar scenario

Changing Style Module

I need to format the display module from the current state to the second state in the photo below is another image transfer.
The last line displays the image in a standard module, I need to display the image on the primary line.
pic 1 :
pic 2 :
module template code :
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<table border="0" width="100%">
<?php
if($list[1]->disposition=="h")
echo "<tr>";
$i=0;
foreach ($list as $item) :
$order=explode("-",$item->ordering);
$cntorder=count($order);
if($i < $item->count_pic) {
if($list[1]->disposition=="v"||!$list[1]->disposition)
print "<tr>";
?>
<td valign="top" class="thumbsup-image latestnews<?php echo $item->css?>">
<?php
if($item->front) {
if($item->show_thumb) {
if($item->link_thumb)
echo "<a target='_blank' href=\"".$item->link."\">";
echo $item->imgbig;
if($item->link_thumb)
echo "</a>";
}
for($j=0;$j<$cntorder;$j++){
if($order[$j]=="t"&&$item->show_title) {
if($item->link_title)
echo "<a target='_blank' href=\"".$item->link."\" class=\"newsmod".$item->css."\">";
echo "<H1>";
echo "<li class=\"newsmod".$item->css."\">".$item->title."</li>";
echo "</H1>";
if($item->link_title)
echo "</a>";
}
if($order[$j]=="i"&&$item->show_intro){
if($item->link_intro)
echo "<a href=\"".$item->link."\" class=\"thumbsup-intro".$item->css."\">";
echo $item->introtext;
if($item->link_intro)
echo "</a>";
if($item->show_readmore){
echo "<a href=\"".$item->link."\">";
echo JText::_('more');
echo "</a>";
}
}
if($order[$j]=="d"&&$item->show_date) {
echo "<div class=\"thumbsup-date".$item->css."\">".JHTML::_('date', $item->created, $item->date_f)."</div>";
}
if($order[$j]=="a"&&$item->show_author) {
echo "<div class=\"thumbsup-author".$item->css."\">";
JText::printf('Written by',$item->author);
echo "</div>";
}
if($order[$j]=="h"&&$item->show_hits) {
echo "<div class=\"thumbsup-hits".$item->css."\">";
JText::printf('Hits',$item->hits);
echo " ".$item->hits;
echo "</div>";
}
}
} else {
if($item->show_thumb){
if($item->link_thumb)
echo "<a target='_blank' href=\"".$item->link."\" class=\"thumbsup-thumb".$item->css."\">";
echo $item->imgsmall." ";
if($item->link_thumb)
echo "</a>";
}
if($item->imgcolumn)
print "</ul><td valign=\"top\" class=\"latestnews".$item->css."\">";
for($j=0;$j<$cntorder;$j++){
if($order[$j]=="t"&&$item->show_title) {
echo "<li class=\"newsmod".$item->css."\">";
if($item->link_title)
echo "<a target='_blank' href=\"".$item->link."\" class=\"newsmod".$item->css."\">";
echo $item->title;
if($item->link_title)
echo "</a>";
echo "</li>";
}
if($order[$j]=="i"&&$item->show_intro){
echo "<div class=\"thumbsup-intro".$item->css."\">";
if($item->link_intro)
echo "<a href=\"".$item->link."\" class=\"thumbsup-intro".$item->css."\">";
echo $item->introtext;
if($item->link_intro)
echo "</a>";
if($item->show_readmore) {
echo "<a href=\"".$item->link."\">";
echo JText::_('more');
echo "</a>";
}
echo "</div>";
}
if($order[$j]=="d"&&$item->show_date) {
echo "<div class=\"thumbsup-date".$item->css."\">".JHTML::_('date', $item->created, $item->date_f)."</div>";
}
if($order[$j]=="a"&&$item->show_author) {
echo "<div class=\"thumbsup-author".$item->css."\">";
JText::printf('Written by',$item->author);
echo "</div>";
}
if($order[$j]=="h"&&$item->show_hits) {
echo "<div class=\"thumbsup-hits".$item->css."\">";
JText::printf('Hits',$item->hits);
echo " ".$item->hits;
echo "</div>";
}
}
} ?>
</ul>
<?php if($list[1]->disposition=="v"||!$list[1]->disposition)
print "</tr>";
?>
<?php } else {
if($list[1]->disposition=="v"||!$list[1]->disposition)
print "<tr>";
?>
<ul valign="top" class="latestnews<?php echo $item->css?>">
<?php
for($j=0;$j<$cntorder;$j++){
if($order[$j]=="t"&&$item->show_title) {
echo "<li class=\"newsmod".$item->css."\">";
if($item->link_title)
echo "<a target='_blank' href=\"".$item->link."\" class=\"newsmod".$item->css."\">";
if($item->front) echo "<H1>";
echo $item->title;
if($item->front) echo "</H1>";
if($item->link_title)
echo "</a>";
echo "</li>";
}
if($order[$j]=="i"&&$item->show_intro){
echo "<div class=\"thumbsup-intro".$item->css."\">";
if($item->link_intro)
echo "<a href=\"".$item->link."\" class=\"thumbsup-intro".$item->css."\">";
echo $item->introtext;
if($item->link_intro)
echo "</a>";
if($item->show_readmore) echo JText::_('more');
echo "</div>";
}
if($order[$j]=="d"&&$item->show_date) {
echo "<div class=\"thumbsup-date".$item->css."\">".JHTML::_('date', $item->created, $item->date_f)."</div>";
}
if($order[$j]=="a"&&$item->show_author) {
echo "<div class=\"thumbsup-author".$item->css."\">";
JText::printf('Written by',$item->author);
echo "</div>";
}
if($order[$j]=="h"&&$item->show_hits) {
echo "<div class=\"thumbsup-hits".$item->css."\">";
JText::printf('Hits',$item->hits);
echo " ".$item->hits;
echo "</div>";
}
}
?>
</ul>
<?php if($list[1]->disposition=="v"||!$list[1]->disposition)
print "</tr>";
?>
<?php } ?>
<?php $i++; endforeach;
if($list[1]->disposition=="h")
print "</tr>";
?>
</table>

Wordpress - single post template - display all posts

i've make a custom template (for single post), but it display all the posts, not the one i've been clicking on before.
here is my template :
<?php
query_posts( 'post_type=catalogue');
if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div class="header">
<h1><?php echo get_the_term_list($post->ID, 'theme', '', '', ''); ?></h1>
</div>
<div class="main">
<div class="categorie-title"><?php echo get_the_term_list($post->ID, 'theme', '', '', ''); ?></div>
<div id="article-header">
<h2><?php the_title(); ?></h2>
<h3><?php echo get_the_term_list($post->ID, 'realisation', 'Un documentaire réalisé par ', ', ', '.'); ?></h3>
<div class="duree"><?php echo get_post_meta($post->ID, 'Duree', true); ?></div>
</div>
<div class="gallerie-couvertures">
<?php /*
$uploads = wp_upload_dir();
echo '<ul>';
if ($dir = opendir($uploads['basedir'].'/images-produits')) {
$images = array();
while (false !== ($file = readdir($dir))) {
if ($file != "." && $file != "..") {
echo '<li><img src="';
echo $uploads['baseurl'].'/images-produits/'.$file;
echo '" alt="" /></li>
';
}
}
closedir($dir);
}
echo '</ul>';
*/?>
</div>
<div class="section">
<h2><?php the_title(); ?></h2>
<h3><?php echo get_the_term_list($post->ID, 'realisation', 'Un documentaire réalisé par ', ', ', '.'); ?></h3>
<div class="content">
<?php the_content(); ?>
</div>
<ul id="film-description">
<li><span>Genre: </span><?php echo get_the_term_list($post->ID, 'genre', ' ',',', '.'); ?></li>
<li><span>Réalisation: </span><ul><?php echo get_the_term_list($post->ID, 'realisation', '<li>', '</li><li>', '</li>'); ?></ul></li>
<li><span>Co-production: </span><ul><?php echo get_the_term_list($post->ID, 'co-production', '<li>', '</li><li>', '</li>'); ?></ul></li>
<li><span>Année: </span><?php echo get_the_term_list($post->ID, 'date-de-sortie'); ?></li>
<li><span>Couleurs: </span><?php echo get_the_term_list($post->ID, 'couleurs', '', ' - ', ''); ?></li>
<li><span>Distribution: </span><?php echo get_the_term_list($post->ID, 'distribution', '', ', ', ''); ?></li>
</ul>
</div>
<div class="section">
<h3 class="uppercase">Extrait</h3>
<?php echo get_the_term_list($post->ID, 'extrait'); ?>
<div class="movie-preview-description">
<h3><span><?php the_title(); ?></span> (trailer)</h3>
<p><?php echo get_the_term_list($post->ID, 'realisation', 'Un documentaire réalisé par ', ', ', ''); ?> - <?php echo get_post_meta($post->ID, 'Duree', true); ?> </p>
<p><?php echo get_the_term_list($post->ID, 'date-de-sortie'); ?> - <?php echo get_the_term_list($post->ID, 'distribution', '', ', ', ''); ?></p>
</div>
<div class="social-links">
<h4>Partagez</h4>
<ul>
<?php $args = array(
'orderby' => 'id',
'order' => 'ASC',
'category_name' => 'Social') ?>
<?php $socials = get_bookmarks($args);
foreach ($socials as $value) {
echo '<li>'.$value->link_name.'</li>';
}
?>
</ul>
</div>
<div class="voir-vodeo">
<h4>Regarder sur VODEO</h4>
<a href="<?php echo get_post_meta($post->ID, 'VODEO', TRUE);?>" class="vodeo" target="_blank" >Vodeo</a>
</div>
</div>
</div>
<?php endwhile;// End the loop. Whew. ?>
<?php wp_reset_query();?>
I think, i've miss something with the loop, any ideas?
Well, i find the problem... I don't need to specify what post_type is, because i click on it. I don't need any query, i ve just delete this : query_posts( 'post_type=catalogue');.

Resources