Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #280440

    hello,

    i need a special view of a bunch of articles. therefore i have wrote a template
    1:1 copy of page.php, include my own loop
    get_template_part( ‘includes/loop’, ‘serie’ );
    my old code does not work anymorea fter last update.
    would you please so kind and help me?

    take the category_id 217, only title and excerpt,
    the custom_field series_excerpt. list it in a div

    bis dann, marco.

    #280847

    Hey Marco!

    Can you share us your ‘old code’?

    Best regards,
    Josue

    #282487

    grrr…
    nothing found. did not used childtheme.

    bis dann, marco.

    #282549

    o.k. here is the actual snippet

    edit Mo. 23. Juni 2014 – 21-32

    ———item after content start———-

    <?php
    // WP_Query arguments
    $args = array (
    ‘post_type’ => ‘post’,
    ‘cat’ => ‘217’,
    ‘pagination’ => false,
    ‘order’ => ‘ASC’,
    ‘meta_query’ => array(
    array(
    ‘key’ => ‘series_excerpt’,
    ),
    ),
    );

    // The Query
    $series = new WP_Query( $args );

    // The Loop
    if ( $series->have_posts() ) {
    while ( $series->have_posts() ) {
    $series->the_post();
    // do something
    ?>

    <h2><?php the_title(); ?></h2>

    <?php
    }
    } else {
    // no posts found
    }

    // Restore original Post Data
    wp_reset_postdata();?>

    ———item after content stop———-

    • This reply was modified 10 years, 6 months ago by netztaucher.
    #282885

    Hey!

    Thank you for the info.

    Is this the code on page.php or the loop-serie.php. Please post both codes on pastebin.com. Create different paste for both files. Note that we don’t provide support for third party scripts but we’ll try if we can help you with this. What exactly does this modification suppose to do?

    Cheers!
    Ismael

    #282898

    thanks for your help.

    i try to list a series of articles with title, excerpt and a custom field

    loop-serie.php:
    http://pastebin.com/Ewpjk2gW

    template-serie.php:
    http://pastebin.com/icPSenW1

    bis dann, marco.

    #283918

    Hey!

    Please replace this line:

    
    $series = new WP_Query( $args );
    

    with

    
    $series = new WP_Query( $args );
    print_r($series);
    

    and check the output wordpress adds to the page which uses the template-serie.php template. Maybe you can create us an admin account?

    Regards,
    Peter

    #285797
    This reply has been marked as private.
    #285800

    Hey!

    You can use (Email address hidden if logged out)

    Best regards,
    Peter

    #285803
    This reply has been marked as private.
    #286738

    Hi!

    Ich kann leider nicht auf die Admin bzw Login Seite zugreifen, da sich ein Server-Authentifizierungsfenster öffnet und ich hierzu keine Login-Daten habe.

    Cheers!
    Peter

    #286869
    This reply has been marked as private.
    #287652

    Hey!

    Ok – the problem is that you try to combine a dynamic layout template with a wordpress template. Although this is not impossible it would require a lot of work to use both together and it’s something which is beyond the scope of our support forum. You can try to use the template to output the text though – in template-serie.php replace:

    
                        /* Run the loop to output the posts.
                        * If you want to overload this in a child theme then include a file
                        * called loop-page.php and that will be used instead.
                        */
    
                        $avia_config['size'] = avia_layout_class( 'main' , false) == 'entry_without_sidebar' ? '' : 'entry_with_sidebar';
    

    with

    
    		echo do_shortcode("[av_textblock]<h2>Wie ich die Dinge geregelt kriege</h2><br/><h2>Getting Things Done (GTD) - Artikelserie in 6 Teilen</h2>[/av_textblock]");
    
                        /* Run the loop to output the posts.
                        * If you want to overload this in a child theme then include a file
                        * called loop-page.php and that will be used instead.
                        */
    
                        $avia_config['size'] = avia_layout_class( 'main' , false) == 'entry_without_sidebar' ? '' : 'entry_with_sidebar';
    

    I couldn’t edit the php files (not writeable) but it should work…

    Regards,
    Peter

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.