-
AuthorPosts
-
November 10, 2021 at 12:48 pm #1328479
i did already the layout adjustments for it – but i guess i had to edit the loop index to show a featured image before the excerpt.
function change_blog_tag_style() { global $avia_config; if(is_tag()){ $avia_config['blog_content'] = "excerpt_read_more"; } } add_action('get_header', 'change_blog_tag_style'); add_filter('avf_post_slider_args', function($atts, $context){ global $posts; if($context == 'archive') { $atts['type'] = grid; $atts['columns'] = 1; } if($context == 'tag') { $atts['type'] = grid; $atts['columns'] = 1; } return $atts; }, 10, 2);
so – how to include the showing of the featured images here
i did not see any conditonal setting for blog_style = blog-grid in loop-index.phpNovember 10, 2021 at 1:31 pm #1328485Next: On my tag archive page the $label (tag.php line 83) there is ony “posts” showing ( on german Beiträge ) , why isn’t there the current tag nam instead?
Edit : change tag.php arround line 132 to:
if( isset( $post_type_obj[ $key ]->labels->name ) ) { $label = apply_filters('avf_tag_label_names', $post_type_obj[$key]->labels->name); $current_tag = single_tag_title("", false); echo "<{$heading} class='post-title tag-page-post-type-title'>". __( 'Tag', 'avia_framework' ) .": <span>".$current_tag."</span></{$heading}>"; }
or maybe better to have on top of that list : ” Tag Archive for: “
if( isset( $post_type_obj[ $key ]->labels->name ) ) { $label = apply_filters('avf_tag_label_names', $post_type_obj[$key]->labels->name); $current_tag = single_tag_title("", false); echo "<{$heading} class='post-title tag-page-post-type-title'>". __( 'Tag Archive for:', 'avia_framework' ) ." <span>".$current_tag."</span></{$heading}>"; }
and have now my own child-theme tag.php – but is there maybe a different way to get this via filter ?
November 15, 2021 at 4:01 pm #1329113Hi,
Sorry for the late reply.
To make it easier for me – do you have links to staging pages where I can see it (and if possible with backend access to see the settings).
Best regards,
GünterNovember 15, 2021 at 11:25 pm #1329139Ja Danke
November 16, 2021 at 1:01 pm #1329209November 19, 2021 at 11:19 am #1329644Hi,
Zunächst einmal Filter Lösung für ” Tag Archive for: “
Best regards,
GünterNovember 19, 2021 at 12:15 pm #1329659Hi,
Added at bottom of function.php:
add_filter('avf_blog_style', function($style, $context){ if( 'tag' == $context ) { return 'big'; } }, 10, 2 );
Ancestors Widget für single post hab ich einmal ins dev repo als feature aufgenommen.
Du meinst damit 2 Bereiche:
– Vorherige Posts
– nächste Postsjeweils in den Kategorien des aktuellen Posts.
Best regards,
GünterNovember 20, 2021 at 10:28 am #1329770yes thanks –
the options on that code is only big and small – Is there a way to choose the source of the image used for that? I see on loop-index.php – so i can have a child-theme loop-index.php:
$size = strpos( $blog_style, 'big' ) ? ( ( strpos( $current_post['post_layout'], 'sidebar' ) !== false ) ? 'entry_with_sidebar' : 'entry_without_sidebar' ) : 'square';
but it would be nicer to have a snippet solution.November 21, 2021 at 10:58 am #1329835Hi,
Thanks for feedback.
Will add a filter to select image size. Will inform you here.
Best regards,
GünterNovember 21, 2021 at 11:17 am #1329836Many many thanks. You did that for the widgets allready ( avf_newsbox_image_size ) in former times – and i guess that would be a nice idea here too!
November 22, 2021 at 1:47 pm #1329954Hi,
would be nicer to have a snippet solution.
Did you see filter ‘avf_post_featured_image_link’ around line 100 of loop-index.php?
Best regards,
GünterNovember 23, 2021 at 10:11 am #1330086ok – can be closed then. I did not found that filter – and it is in there @since 4.5.4.
Asche auf mein Haupt ;)Edit: Using that filter – will end in:
November 23, 2021 at 4:07 pm #1330147Hi,
Sorry, my fault. Added the snippet without testing.
Second parameter function to call was missing in add_filter.
Updated it on github, please check now.Best regards,
GünterNovember 23, 2021 at 4:26 pm #1330148Yes – thats it !
I should have seen it too. It was clear that it could not go like that.
Now close it.November 23, 2021 at 4:30 pm #1330151 -
AuthorPosts
- The topic ‘Archive (especially tag archive) in grid layout with featured image’ is closed to new replies.