cosimo
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Fixing WordPress
In reply to: wp_query and paginationexcuse me in the previous post i write wrong code:
next_posts_link('Next posts', $my_query->max_num_pages); previous_posts_link('Previous posts', $my_query->max_num_pages);
this is the exact code for pagination:
next_posts_link('Next posts', $my_query->max_pages); previous_posts_link('Previous posts', $my_query->max_pages);
it was just a digitation error.
[ Please do not bump. It’s not permitted here. ]
Forum: Fixing WordPress
In reply to: Wrong multiple queries using get_postsHI, i use your code and now it works fine, thank you.
But I can not understand why the other code does not work, it seems to be correct.
I wish I could understand where the error is.Forum: Fixing WordPress
In reply to: Wrong multiple queries using get_postsNo one can help me? This is my loop
<div class="travel_box_container"> <h3>Viaggi e crociere in primo piano</h3> <?php $args = array( 'numberposts' => 6, 'category' => '7', 'order'=> 'ASC', 'orderby' => 'title' ); $postslist = get_posts( $args ); foreach ($postslist as $post) : setup_postdata($post); ?> <div class="travel_box"> <a href="<?php the_permalink() ?>" title="Vedi <?php the_title_attribute(); ?>"> <? the_post_thumbnail() ?></a> <h4><?php the_title(); ?></h4> <?php the_excerpt(); ?> <div class="details"><p><a href="<?php the_permalink() ?>" title="Vedi e prenota <?php the_title_attribute(); ?>">Vedi e prenota</a></p></div> <div class="travel_box_angle"> <p>A partire da <span><?php echo get_post_meta($post->ID, 'prezzo_base', true) ?></span></p> </div><!--chiusura di un angolo prezzo --> </div><!-- chiusura di un travel box --> <?php endforeach; ?> <?php wp_reset_query();?> <div style="clear:both;"></div> </div><!-- chiusura di travel box container con i viaggi in primo piano--> <div style="clear:both;"></div> <div class="bottom_wrapper"> <h3>Viaggi e crociere in offerta</h3> <div class="bottom_wrapper_scroller"> <?php $args2 = array( 'numberposts' => 4, 'category' => '5', 'order'=> 'ASC', 'orderby' => 'title' ); $postslist2 = get_posts( $args2 ); foreach ($postslist2 as $post2) : setup_postdata($post2); ?> <div class="bottom_box"> <a href="<?php the_permalink() ?>" title="Vedi <?php the_title_attribute(); ?>"> <? the_post_thumbnail(); ?></a> <h4><?php the_title(); ?></h4> <?php the_excerpt(); ?> <div class="details"><p><a href="<?php the_permalink(); ?>" title="Vedi e prenota <?php the_title_attribute(); ?>">Vedi e prenota</a></p></div> <div class="travel_box_angle"> <p>A partire da <span><?php echo get_post_meta($post->ID, 'prezzo_base', true) ?></span></p> </div><!--chiusura di un angolo prezzo --> </div><!-- chiusura di un bottom box --> <?php endforeach; ?> <?php wp_reset_query();?> <div class="bottom_box_clear"></div> </div><!-- chiusura di bottom wrapper scroller --> </div><!-- chiusura del bottom wrapper con i viaggi in offerta--> <div class="bottom_wrapper"> <h3>Viaggi e crociere <span class="red_title">last minute</span></h3> <div class="bottom_wrapper_scroller"> <?php $args3 = array( 'numberposts' => 4, 'category' => '6', 'order'=> 'ASC', 'orderby' => 'title' ); $postslist3 = get_posts( $args3 ); foreach ($postslist3 as $post3) : setup_postdata($post3); ?> <div class="bottom_box"> <a href="<?php the_permalink() ?>" title="Vedi <?php the_title_attribute(); ?>"> <? the_post_thumbnail() ?></a> <h4><?php the_title(); ?></h4> <?php the_excerpt(); ?> <div class="details"><p><a href="<?php the_permalink(); ?>" title="Vedi e prenota <?php the_title_attribute(); ?>">Vedi e prenota</a></p></div> <div class="travel_box_angle"> <p>A partire da <span><?php echo get_post_meta($post->ID, 'prezzo_base', true) ?></span></p> </div><!--chiusura di un angolo prezzo --> </div><!-- chiusura di un bottom box --> <?php endforeach; ?> <?php wp_reset_query();?> <div class="bottom_box_clear"></div> </div><!-- chiusura di bottom wrapper scroller --> </div><!-- chiusura del secondo bottom wrapper con i last minute-->
Seems there’s nothing wrong, but it dont’t work.
Forum: Fixing WordPress
In reply to: Wrong multiple queries using get_postsYes it’s the first thing i do, but not work.
Forum: Hacks
In reply to: meta box custom fields with images uploaderI solved with this:
jQuery(document).ready(function () { jQuery('#bottone_carica_anteprima').click(function () { formfield = jQuery('#carica_anteprima'); post_id = jQuery('#post_ID').val(); tb_show('', 'media-upload.php?post_id=' + post_id + '&type=image&TB_iframe=true'); return false; }); window.send_to_editor = function (html) { imgurl = jQuery('img', html).attr('src'); jQuery('#carica_anteprima').val(imgurl); tb_remove(); } jQuery('#bottone_carica_foto').click(function () { formfield = jQuery('#carica_foto'); post_id = jQuery('#post_ID').val(); window.send_to_editor = window.send_to_editor_clone; tb_show('', 'media-upload.php?post_id=' + post_id + '&type=image&TB_iframe=true'); return false; }); window.send_to_editor_clone = function (html) { imgurl = jQuery('img', html).attr('src'); jQuery('#carica_foto').val(imgurl); tb_remove(); } });
Found here
Viewing 5 replies - 1 through 5 (of 5 total)