Title: gesatzs's Replies | WordPress.org

---

# gesatzs

  [  ](https://wordpress.org/support/users/gesatzs/)

 *   [Profile](https://wordpress.org/support/users/gesatzs/)
 *   [Topics Started](https://wordpress.org/support/users/gesatzs/topics/)
 *   [Replies Created](https://wordpress.org/support/users/gesatzs/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/gesatzs/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/gesatzs/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/gesatzs/engagements/)
 *   [Favorites](https://wordpress.org/support/users/gesatzs/favorites/)

 Search replies:

## Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mini Loops] some code not accepted in widget item format ?](https://wordpress.org/support/topic/some-code-not-accepted-in-widget-item-format/)
 *  Thread Starter [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/some-code-not-accepted-in-widget-item-format/#post-8357872)
 * I tried also this way :
 *     ```
       [miniloop post_type=formations number_posts=1]<H2> {title}
       </h2> {content}
       <iframe width="560" height="315" src="https://www.youtube.com/embed/3UKSKukiKfY" frameborder="0" allowfullscreen></iframe> link: {ml_field name=videointro}[/miniloop]
       ```
   
 * The Iframe is GONE, not showing at all.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Aperture and WordPress](https://wordpress.org/support/topic/aperture-and-wordpress/)
 *  [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/aperture-and-wordpress/#post-2366413)
 * you got an solution to publish from aperture directly to WordPress ?
    thanks 
   for sharing Cheers
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Hierarchical custom post type – can't specify parent](https://wordpress.org/support/topic/hierarchical-custom-post-type-cant-specify-parent/)
 *  [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/hierarchical-custom-post-type-cant-specify-parent/#post-1825492)
 * Hi, great stuff, but…
    can somebody explain this to me, how to implement that
   [@jszkut](https://wordpress.org/support/users/jszkut/) code… 🙁 [http://janina.tumblr.com/post/3588081423/post-parent-different-type](http://janina.tumblr.com/post/3588081423/post-parent-different-type)
   I’m lost! I’m trying to put that in functions.php … thanks
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [why ‘get_post_meta’ is not working outside when placed in functions.php](https://wordpress.org/support/topic/why-get_post_meta-is-not-working-outside-when-placed-in-functionsphp/)
 *  Thread Starter [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/why-get_post_meta-is-not-working-outside-when-placed-in-functionsphp/#post-1409043)
 * ok, my bad, I’m messing with other things…
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [why ‘get_post_meta’ is not working outside when placed in functions.php](https://wordpress.org/support/topic/why-get_post_meta-is-not-working-outside-when-placed-in-functionsphp/)
 *  Thread Starter [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/why-get_post_meta-is-not-working-outside-when-placed-in-functionsphp/#post-1409042)
 * Well, What can I say… It seemed logical… but…
    it does not work ! I don’t get
   it !!! 🙁
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [why ‘get_post_meta’ is not working outside when placed in functions.php](https://wordpress.org/support/topic/why-get_post_meta-is-not-working-outside-when-placed-in-functionsphp/)
 *  Thread Starter [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/why-get_post_meta-is-not-working-outside-when-placed-in-functionsphp/#post-1408986)
 * Thank you, that’s great !
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Widget : Current category posts list… And the lost cat variable !](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/)
 *  Thread Starter [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/#post-1403507)
 * Here is what I wanted, thanks to you !
    Not tested in all situations, but so 
   far so good! Note I’m using a cat variable in each page, this variable the same
   as the relative category id.
 * I guess It could use optimisation but it’s a good start for me… 🙂
    THANKS AGAIN
 *     ```
       <?php  //// CREATING NEW WIDGET (template)
       function widget_myuniquewidget($args) {
           extract($args);
       ?>
               <?php echo $before_widget; ?>
                   <?php echo $before_title
                       . $after_title; ?>
          <?php
       // FOR POST PAGE ONLY : SHOWS LIST OF ALL BUT CURRENT POST - POSTS WITHIN SAME CAT -->
       	if ( is_single() ) {
       		  $categories = get_the_category();
       		  if ($categories) {
       			foreach ($categories as $category) {
       			  // echo "<pre>"; print_r($category); echo "</pre>";
       			  $cat = $category->cat_ID;
       			  $args=array(
       				'cat' => $cat,
       				'post__not_in' => array($post->ID),
       				'posts_per_page'=>5,
       				'caller_get_posts'=>1
       			  );
       			  $my_query = null;
       			  $my_query = new WP_Query($args);
       			  if( $my_query->have_posts() ) {
       				echo '<li><h4>IF_SINGLE LOOP<br /> '. $category->name . '</h4></li><ul>';
       				while ($my_query->have_posts()) : $my_query->the_post(); ?>
       				  <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
       				 <?php
       				endwhile;
       				echo '</ul>';
       			  } //if ($my_query)
       			} //foreach ($categories
       		  } //if ($categories)
       		  wp_reset_query();  // Restore global post data stomped by the_post().
       		} //if (is_single())
         // END //  FOR POST PAGE ONLY : SHOWS LIST OF ALL BUT CURRENT POST - POSTS WITHIN SAME CAT -->
         // START //   FOR ALL CATEGORY PAGE : SHOWS LIST OF ALL POSTS WITHIN SAME CURRENT CAT  -->
       if ( is_category() )  {
         $cat = get_query_var('cat');
         $category = get_term_by('id',$cat, 'category');
         if ($category) {
           $args=array(
             'category__in' => array($category->term_id),
             'post_type' => 'post',
             'post_status' => 'publish',
             'showposts' => -1,
             'caller_get_posts'=> 1
             );
           $my_query = null;
           $my_query = new WP_Query($args);
           if( $my_query->have_posts() ) {
             echo '<li><h4>IF_CATEGORY LOOP<br /> '.$category->name.'</h4></li><ul>';
             while ($my_query->have_posts()) : $my_query->the_post(); ?>
               <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
              <?php
             endwhile;
       	    echo '</ul>';
           } //  fin  $categories
         wp_reset_query();  // Restore global post data stomped by the_post().
         }// Fin if is_category
       }
       if ( is_page() ) {
   
       		// PERSONAL SIDEBAR : CURRENTCATEGORY POST LIST
       		 //my_categoryposttitleloop($catpost);
   
       		$mykey_values = get_post_custom_values('cat');
       		  foreach ( $mykey_values as $key => $value ) {
       		   $catpost = $value;
       		   $category = get_term_by('id',$catpost, 'category');
   
       		  }
   
       		query_posts('cat='.$value );
       		    echo '<li><h4>IF_PAGE LOOP<br /> '.$category->name.'</h4></li><ul>';
       			 while (have_posts()) : the_post(); ?>
       			 <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
       			 <?php endwhile;
   
       		 ?>
       		 <?php
   
       		////////////////
   
       			 }
   
       ?>
               <?php echo $after_widget; ?>
       <?php
       }
       register_sidebar_widget('My Unique Widget','widget_myuniquewidget');
       ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Widget : Current category posts list… And the lost cat variable !](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/)
 *  Thread Starter [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/#post-1403431)
 * Looks great ! Let me work on that and try to understand it all 🙂
    THANKS A LOT
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Widget : Current category posts list… And the lost cat variable !](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/)
 *  Thread Starter [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/#post-1403402)
 * correct !
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Widget : Current category posts list… And the lost cat variable !](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/)
 *  Thread Starter [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/#post-1403397)
 * yes. The sidebar should be consistent from the category-entry page, to the post
   page… and I’m stuck on that 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Widget : Current category posts list… And the lost cat variable !](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/)
 *  Thread Starter [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/widget-current-category-posts-list-and-the-lost-cat-variable/#post-1403392)
 * Thanks.
 * I’ll don’t yet get it, but it’s the same problem with you code : It does no give
   anything when viewing a post page. is it normal ? I’ll go through the code and
   try to understand the differences anyway thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [New plugin has stopped access to wp-admin](https://wordpress.org/support/topic/new-plugin-has-stopped-access-to-wp-admin/)
 *  [gesatzs](https://wordpress.org/support/users/gesatzs/)
 * (@gesatzs)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-plugin-has-stopped-access-to-wp-admin/#post-1403329)
 * How ?

Viewing 12 replies - 1 through 12 (of 12 total)