Visualizzazione dei risultati da 1 a 10 su 10

Hybrid View

  1. #1
    Moderatore di PHP L'avatar di Alhazred
    Registrato dal
    Oct 2003
    Messaggi
    12,505
    Non puoi avere 2 chiavi con lo stesso nome, devi trovare un sistema diverso per memorizzare il dato.

  2. #2
    Utente di HTML.it L'avatar di Lino80
    Registrato dal
    Oct 2005
    Messaggi
    1,560
    Grazie, questo è il codice:

    Codice PHP:
                    <?php
                    $args 
    = array(
                        
    'post_type' => $taxonomy_profile_url,
                        
    'meta_query' => array( array('key' => 'premium''value' => '0''compare' => '=''type' => 'NUMERIC') ),
                        
    'posts_per_page' => get_option("frontpageshownormalcols") * 5
                    
    );
                    
    $normal_profiles = new WP_Query$args );
                    
    $i "1";
                    if (
    $normal_profiles->have_posts()) :
                        while ( 
    $normal_profiles->have_posts() ) : $normal_profiles->the_post();
                            include (
    get_template_directory() . '/loop-show-profile.php');
                        endwhile;
                    else:
                        
    _de('No %s here yet',29,$taxonomy_profile_name_plural);
                    endif;
                    
    wp_reset_postdata();
                    
    ?>



    Ho provato così ma nulla:

    Codice PHP:
                    <?php
                    $args 
    = array(
                        
    'post_type' => $taxonomy_profile_url,
                        
    'meta_query' => array( array('key' => 'premium''value' => '0''compare' => '=''type' => 'NUMERIC') ),
                        
    'posts_per_page' => get_option("frontpageshownormalcols") * 5
                    
    ); 
                    
    $premium_args = array(
                        
    'post_type' => $taxonomy_profile_url,
                        
    'meta_query' => array( array('key' => 'premium''value' => '1''compare' => '=''type' => 'NUMERIC') ),
                        
    'posts_per_page' => get_option("frontpageshownormalcols") * 5
                    
    );
                    
    $normal_profiles = new WP_Query$args );                $normal_profiles = new WP_Query$premium_args );
                    
    $i "1";
                    if (
    $normal_profiles->have_posts()) :
                        while ( 
    $normal_profiles->have_posts() ) : $normal_profiles->the_post();
                            include (
    get_template_directory() . '/loop-show-profile.php');
                        endwhile;
                    else:
                        
    _de('No %s here yet',29,$taxonomy_profile_name_plural);
                    endif;
                    
    wp_reset_postdata();
                    
    ?>


    Cosa sbaglio?
    Ultima modifica di Lino80; 21-12-2019 a 11:11

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.