-
AuthorPosts
-
January 12, 2023 at 7:29 pm #1378469
Hallo,
i have search for hours but found nothing. I am building a regular page and use the blog as news section.
For the news page i have used a full width section including an image in the middle and below the breadcrumb. This woorks fine also for read / news detail pages but not for the category overview pages which are generated / selectable by year.So i have two options:
1) add an code snipped to function.php that includes me the area section from e.g. newspage into category page, is that possible?
2) Add code into the archive.php with the same solution. I have used some code from the page.php, the area was set but also content.Any ideas about this?
January 13, 2023 at 8:17 am #1378529Hey Sebastian,
Thank you for the inquiry.
You will have to directly add the shortcode of the full width section in the archive.php template or use this hook in the functions.php file.
add_action("ava_after_main_title", function() { $post_id = get_the_ID(); if(get_post_type( $post_id ) == "post" || is_archive()) { $thumbnail = get_the_post_thumbnail_url ( $post_id ); echo do_shortcode("[av_section min_height='50' min_height_pc='25' min_height_px='500px' shadow='no-border-styling' bottom_border='no-border-styling' bottom_border_diagonal_color='#333333' bottom_border_diagonal_direction='' bottom_border_style='' padding='default' custom_margin='0px' custom_margin_sync='true' av-desktop-custom_margin='' av-desktop-custom_margin_sync='true' av-medium-custom_margin='' av-medium-custom_margin_sync='true' av-small-custom_margin='' av-small-custom_margin_sync='true' av-mini-custom_margin='' av-mini-custom_margin_sync='true' svg_div_top='' svg_div_top_color='#333333' svg_div_top_width='100' svg_div_top_height='50' svg_div_top_max_height='none' svg_div_top_opacity='' svg_div_bottom='' svg_div_bottom_color='#333333' svg_div_bottom_width='100' svg_div_bottom_height='50' svg_div_bottom_max_height='none' svg_div_bottom_opacity='' color='main_color' background='bg_color' custom_bg='' background_gradient_direction='vertical' background_gradient_color1='#000000' background_gradient_color2='#ffffff' background_gradient_color3='' src='" . $thumbnail . "' attachment='31' attachment_size='full' attach='scroll' position='center center' repeat='stretch' video='' video_ratio='16:9' overlay_opacity='0.5' overlay_color='' overlay_pattern='' overlay_custom_pattern='' custom_arrow_bg='' css_position_z_index='' av-desktop-css_position_z_index='' av-medium-css_position_z_index='' av-small-css_position_z_index='' av-mini-css_position_z_index='' id='' custom_class='' template_class='' aria_label='' av_element_hidden_in_editor='0' av_uid='av-lck8sod6' sc_version='1.0'][/av_section]"); } }, 10, 1);
Replace the value of the $thumbnail with the URL of the image that you would like to display as background.
Best regards,
IsmaelJanuary 19, 2023 at 12:26 am #1394012This reply has been marked as private.January 19, 2023 at 8:16 am #1394036Hi,
Thank you for the info.
The snippet didn’t work because the ava_after_main_title hook in the archive.php was commented out. We reverted it back and replace the color section with the full width slider shortcode.
Best regards,
IsmaelJanuary 19, 2023 at 10:21 am #1394315Cool that works fine but the header should be transparent as other pages and the side bar is broken, it is below the content now.
- This reply was modified 1 year, 8 months ago by xeovision.
January 20, 2023 at 10:08 am #1394486This reply has been marked as private.January 20, 2023 at 12:12 pm #1394500Hi,
To make the header transparent on category pages, you can add this filter in the functions.php file.
add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1); function avf_header_setting_filter_mod($header) { if( is_archive() ) { $header['header_transparency'] = 'header_transparency'; } return $header; }
And to fix the sidebar, please add this code in the Quick CSS field.
body .unit.alpha.sidebar, body .units.alpha.sidebar { width: 22%; clear: none !important; }
Best regards,
IsmaelJanuary 23, 2023 at 4:17 pm #1394795This settings worked, now, i was adding the breadcrum below like this: https://pastebin.com/bQ6admCq
Breadcrum was added but the content is broken of that, sidebar has jumped into the content place like before.
Any idea?January 24, 2023 at 2:46 am #1394854Hi,
Did you add the css code that we suggested above? This should adjust the width of the sidebar and allow the main container to float beside the sidebar. Please make sure to toggle or temporarily disable the Enfold > Performance > File Compression settings after adding the css.
Best regards,
IsmaelJanuary 24, 2023 at 11:47 am #1394900Yes, the code is still there.
I found the bug, as i wanted to place the breadcrumb below:[av_section min_height_pc='25' min_height_px='40px' padding='small' av-small-custom_margin_sync='true' color='main_color' background='bg_color' custom_bg='#a5dbe5' av_uid='av-6lto8p' sc_version='1.0'] [av_textblock ][av_breadcrumbs][/av_textblock] [/av_section]
…it brakes the sub page.
I have fixed all issues now. Just one open topic, how can i add breadcrumb to the category pages on the archive pages?
All addings to function.php breakes the page- This reply was modified 1 year, 8 months ago by xeovision.
January 26, 2023 at 7:46 am #1395317Hi,
The breadcrumb should automatically display in the archive page as long as it is enabled in the theme options. Please check the archive.php file and make sure that this line is not commented out.
$showheader = true; if(avia_get_option('frontpage') && $blogpage_id = avia_get_option('blogpage')) { if(get_post_meta($blogpage_id, 'header', true) == 'no') $showheader = false; } if($showheader) { echo avia_title(array('title' => avia_which_archive())); }
Best regards,
IsmaelJanuary 26, 2023 at 10:12 am #1395332Hallo,
yes, noe, the regualr breadcrumb appers but in the basic style ..any possibility to redesign it?
There are no specific styles addedJanuary 28, 2023 at 3:22 pm #1395718Hi,
Thanks for your patience, this thread seems to cover a couple of topics and it seems now you are asking about the breadcrumbs on the page /category/aktuelles-aus-2023/ , you are asking about changing the style, yes you could use css to change it but I don’t know how you want to change it.
Perhaps you could open a new thread and explain how you want to style it perhaps with some screenshots.
This would help us keep the threads on topic and easier to follow, thanks for your understanding.Best regards,
Mike -
AuthorPosts
- The topic ‘Area section into blog categories’ is closed to new replies.