function listerfav() { global $wpdb; $precedent = $_SERVER['REQUEST_URI']; $user = get_current_user_id(); if ($user == 0) { $_SESSION['context'] = $precedent; Redirect_('login'); die; } else { $choisis = avoir_favoris(); ?> <div id="primary"> <?php if ($choisis) { // $my_query = new WP_Query(array( 'post__in' => $choisis)); //var_dump ($my_query); $ids = join("','", $choisis); $sql = "SELECT ID, post_title, post_name FROM {$wpdb->posts}\n\t WHERE ID IN ('{$ids}') AND post_type = 'projet'"; $my_queries = $wpdb->get_results($sql); ?> <div id="content" role="main"> <table style="width: 100%"> <th><h5>Titre</h5></th> <?php //while ($my_query->have_posts()) : //$my_query->the_post(); //var_dump($ids); foreach ($my_queries as $my_query) { ?> <tr> <td> <a href="<?php get_permalink($my_query->ID); ?> " rel="bookmark" title="Permanent Link to <?php get_the_title($my_query->ID); ?> "> <?php if (get_the_title($my_query->ID)) { $title = $my_query->post_title; echo $title; } else { _e('Sans titre'); } ?> </a> </td> <td align="center"> <?php contacter(); ?> </td> </tr> <?php } // end of the loop. ?> </table> </div><!-- #content --> <?php } else { ?> <div>Vous n'avez pas de favoris actuellement</div> <?php } ?> <?php } ?> <a href="javascript:history.back()">Retour</a> </div><!-- #primary --> <?php }
the_title(); ?> "> <?php if (get_the_title()) { $title = the_title('', '', false); echo $title; } else { _e('Sans titre'); } ?> </a> </td> <td align="center"> <?php contacter(); ?> </td> </tr> <?php } // end of the loop. ?> </table> <?php } else { ?> <div>Vous n'avez pas de favoris actuellement</div> <?php } ?>
function postuler($strContent) { //Only show at a single post / page the extended (if configurated) view if (is_single()) { $rtour = ""; return button_postuler() . $strContent . contacter(); } else { if (is_home()) { return $strContent . contacter(); //return evltruncate($strContent, 500, ' <a href="'.get_permalink().'">...</a>').contacter(); } else { return $strContent; } } }