-
AuthorPosts
-
October 10, 2015 at 9:27 pm #516871
Pages where they are shown the latest articles ( news ) http://misteradamello.it/ultime-notizie/
show the items in the ” grid ” as set in all the other pages with the editor Avia .
But if I open the page Latest news I find a layout unlike any altre.Non you can edit this page in the editor because this appears completely empty .All other pages appear with this: http : //misteradamello.it/scialpinismo-3/
4 columns and 4 rows for 16 articoli.Invece page Breaking News are arranged in columns 3 and 4 rows 10 items
How do I edit these pages ?October 11, 2015 at 3:27 pm #516964Hey misteradamello!
I’m not really sure I understand. Can you take a screenshot and highlight what your trying to do? I viewed your link but you must have some kind of plugin activated as the screen has a transparent layer over it and I cannot scroll at all.
Best regards,
ElliottOctober 11, 2015 at 7:32 pm #517008Link 1 ‘s what the page ” categories ”
http://s20.postimg.org/nn7yq5bh9/foto_1.png
Link 2 ‘s what the page ” Archive ”
http://s20.postimg.org/4ypx2tkkd/foto_2.png
Link 3 ‘s what the page I created with the articles prepared as I want
http://s20.postimg.org/5tcgousf1/foto_3.pngMy question is : how do I change the way in which the articles are presented in these pages ? ( news and Categories ) . I think I understand that these are not really the pages like the ones I made .
- This reply was modified 9 years, 2 months ago by misteradamello.
October 12, 2015 at 9:22 pm #517707Hi!
Well you cannot edit the archives like your other pages. The archives are displayed with the archive.php template file. You can change the style of the archives in Dashboard > Enfold > Blog Layout though. The blog style you set will be used for the archives as well.
Best regards,
ElliottOctober 13, 2015 at 2:51 pm #518109OK thanks. I modified the file archive.php and managed to get 4 columns . How do I get the number of posts to be displayed ?
<?php
global $avia_config, $more;/*
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
*/
get_header();$showheader = true;
if(avia_get_option(‘frontpage’) && $blogpage_id = avia_get_option(‘blogpage’))
{
if(get_post_meta($blogpage_id, ‘header’, true) == ‘no’) $showheader = true;
}if($showheader)
{
echo avia_title(array(‘title’ => avia_which_archive()));
}do_action( ‘ava_after_main_title’ );
?><div class=’container_wrap container_wrap_first main_color <?php avia_layout_class( ‘main’ ); ?>’>
<div class=’container template-blog ‘>
<main class=’content <?php avia_layout_class( ‘content’ ); ?> units’ <?php avia_markup_helper(array(‘context’ => ‘content’,’post_type’=>’post’));?>>
<div class=”category-term-description”>
<?php echo term_description(); ?>
</div><?php
$avia_config[‘blog_style’] = apply_filters(‘avf_blog_style’, avia_get_option(‘blog_style’,’multi-big’), ‘archive’);
if($avia_config[‘blog_style’] == ‘blog-grid’)
{
global $posts;
$post_ids = array();
foreach($posts as $post) $post_ids[] = $post->ID;if(!empty($post_ids))
{
$atts = array(
‘type’ => ‘grid’,
‘items’ => get_option(‘post-for-page’),
‘columns’ => 4,
‘class’ => ‘avia-builder-el-no-sibling’,
‘paginate’ => ‘yes’,
‘use_main_query_pagination’ => ‘yes’,
‘custom_query’ => array( ‘post__in’=>$post_ids, ‘post_type’=>get_post_types() )
);$blog = new avia_post_slider($atts);
$blog->query_entries();
echo “<div class=’entry-content-wrapper’>”.$blog->html().”</div>”;
}
else
{
get_template_part( ‘includes/loop’, ‘index’ );
}
}
else
{
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/$more = 0;
get_template_part( ‘includes/loop’, ‘index’ );
}
?><!–end content–>
</main><?php
//get the sidebar
$avia_config[‘currently_viewing’] = ‘blog’;
get_sidebar();?>
</div><!–end container–>
</div><!– close default .container_wrap element –>
<?php get_footer(); ?>
October 14, 2015 at 8:19 pm #518906Hey!
You can set that in Dashboard > Settings > Reading.
Regards,
ElliottNovember 2, 2015 at 10:21 pm #528845Hi,
Well you cannot edit the archives like your other pages. The archives are displayed with the archive.php template file. You can change the style of the archives in Dashboard > Enfold > Blog Layout though. The blog style you set will be used for the archives as well.
How can I create an archive template for each different blog post category?
Also, how can I create a template to be used for single posts within X category automatically?
I have multiple
usersauthors and I’d like everything to be automatic:userauthor writes post and selects post category, and the presentation/template of the single post is automatically assigned according to category.Thanks, Teena
- This reply was modified 9 years, 1 month ago by wwdetmb.
November 3, 2015 at 9:33 am #529057Hi Teena,
Please refer to this for creating category templates: https://codex.wordpress.org/Category_Templates
Regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.