gesatzs
Forum Replies Created
-
Forum: Plugins
In reply to: [Mini Loops] some code not accepted in widget item format ?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
In reply to: Aperture and WordPressyou got an solution to publish from aperture directly to WordPress ?
thanks for sharing
CheersForum: Fixing WordPress
In reply to: Hierarchical custom post type – can't specify parentHi, great stuff, but…
can somebody explain this to me, how to implement that @jszkut code… 🙁
http://janina.tumblr.com/post/3588081423/post-parent-different-type
I’m lost! I’m trying to put that in functions.php …
thanksok, my bad, I’m messing with other things…
Well, What can I say… It seemed logical… but…
it does not work !
I don’t get it !!! 🙁Thank you, that’s great !
Forum: Plugins
In reply to: Widget : Current category posts list… And the lost cat variable !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
In reply to: Widget : Current category posts list… And the lost cat variable !Looks great ! Let me work on that and try to understand it all 🙂
THANKS A LOTForum: Plugins
In reply to: Widget : Current category posts list… And the lost cat variable !correct !
Forum: Plugins
In reply to: Widget : Current category posts list… And the lost cat variable !yes. The sidebar should be consistent from the category-entry page, to the post page… and I’m stuck on that 🙂
Forum: Plugins
In reply to: Widget : Current category posts list… And the lost cat variable !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
In reply to: New plugin has stopped access to wp-adminHow ?