-
AuthorPosts
-
June 18, 2014 at 9:41 am #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 divbis dann, marco.
June 18, 2014 at 11:24 pm #280847Hey Marco!
Can you share us your ‘old code’?
Best regards,
JosueJune 23, 2014 at 3:05 pm #282487grrr…
nothing found. did not used childtheme.bis dann, marco.
June 23, 2014 at 4:36 pm #282549o.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.
June 24, 2014 at 9:35 am #282885Hey!
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!
IsmaelJune 24, 2014 at 10:12 am #282898thanks for your help.
i try to list a series of articles with title, excerpt and a custom field
loop-serie.php:
http://pastebin.com/Ewpjk2gWtemplate-serie.php:
http://pastebin.com/icPSenW1bis dann, marco.
June 26, 2014 at 7:07 am #283918Hey!
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,
PeterJuly 1, 2014 at 5:13 pm #285797This reply has been marked as private.July 1, 2014 at 5:18 pm #285800July 1, 2014 at 5:21 pm #285803This reply has been marked as private.July 3, 2014 at 4:52 pm #286738Hi!
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!
PeterJuly 3, 2014 at 9:07 pm #286869This reply has been marked as private.July 6, 2014 at 8:11 am #287652Hey!
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 -
AuthorPosts
- You must be logged in to reply to this topic.