Viewing 30 posts - 1 through 30 (of 33 total)
  • Author
    Posts
  • #903444

    Hi,

    I am looking to reposition the Title Bar to below the first page element. I had achieved this before with php but lost it with a theme update because I didn’t set up a child theme, and can’t seem to find it again :)

    What would be the best way of going about this? See here the the title bar is showing at the top, where it should be below the image, which is put in as the first element.

    Thanks in advance

    #903454

    Hey kona123,

    I’m having a little trouble understanding exactly what you need. Can you provide a screenshot or be a little more clear on where you need things positioned? Also, if possible in the private section please provide admin and ftp info so we can loo into this further.

    Best regards,
    Jordan Shannon

    #903556

    Hi Jordan,

    Here is a screenshot of how it looked before.
    http://www.tvsrbsa.org/wp-content/uploads/2017/10/Screen-Shot-2017-10-25-at-5.57.32-PM.png

    vs how the same page is now

    Essentially, I would like a featured image to be displayed as a banner on the page. But this does not hold true for every page, as on the homepage I have a video. So I achieved this last time by inserting some code that positioned the Title Bar after the first page builder element.

    Thanks!

    • This reply was modified 6 years, 11 months ago by kona123.
    #904014

    Hi kona123,

    Can you please give us the htpassword as well?
    https://cl.ly/0K0C1i3N0O2r and remove this code form you Quick css

    Best regards,
    Victoria

    • This reply was modified 6 years, 11 months ago by Victoria.
    #904317

    Hi Victoria,

    Removing that breaks the intended design of moving the page body up to create the floating heading, though it’s very likely there’s better way of doing what I have done. You can see this on the Home Page which has the title bar disabled and in the screenshot linked above.

    Whatever it was that was done was done using PHP to insert the Title Bar after the first Avia page builder element/section.

    Thanks!

    • This reply was modified 6 years, 10 months ago by kona123.
    #904841

    Hi kona123,

    I understand, it’s just that at least the page does not look broken without that code.
    Here is how to insert title and breadcrumbs as a shortcode

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #905181

    Hi Victoria,

    That isn’t how I had done it before, but I tried it anyway, it would take some more css to make it look right, so I am wondering if you know of a way to do this in functions.php? I believe that is how the user I found did it. What I’m looking for essentially is a way to insert the title bar after the first Avia Section (I said element before), on any page that has Breadcrumbs enabled. As you can see, all of my pages have a color section with a background image, title, and two spacers. The title bar was automatically inserted below this for every post and page.

    I have been scouring the site to find what on earth I did last time, it was so simple it must’ve been that forgettable.. I suppose this is what I get for not keeping track of things as I do them.

    Thanks again for your time

    #906015

    Hi,

    The title bar will not be rendered if the page has a transparent header. You have to use the shortcode above. We’ll provide the css modification if necessary.

    Best regards,
    Ismael

    #906483

    Hi Ismael,

    Thanks for your response. I am not currently using the transparent header option, I’ve used custom css to create the look. As you can see from the screenshot I linked, I am looking for the method I used prior which was very simple and clean.

    http://www.tvsrbsa.org/wp-content/uploads/2017/10/Screen-Shot-2017-10-25-at-5.57.32-PM.png
    Edit – For clarity, the large photo on top of the page is the background of an Avia Colorblock.

    Do you know of a way, to automatically, likely through functions, insert the title bar after the first Avia Section (I said element before), on any page that has Breadcrumbs enabled?

    • This reply was modified 6 years, 10 months ago by kona123.
    #907385

    Hi kona123,

    Here is how to do it

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #907389

    by the way – a little off-topic – i see that breadcrumps title gets a h1 – this is on my opinion a bit to much.
    If i want to set a h1 on that page – we got more than one h1 – not a good practice.

    #907426

    Choose to show breadcrumb on those pages you like to show!

    you can try to change position of av_section_1 and the title container via functions.php of your child-theme:

    function change_position(){
    ?>
    <script>
    (function($){
    	$('#av_section_1').each(function () {
    	        $(this).insertBefore($(this).prev('#main .title_container'));
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'change_position');

    if you have transparency option – in this case the breadcrumb can be displayed – but i have to look in code where the breadcrumb output is prevented in this case.

    Edit: on functions-enfold.php on line 824ff (Enfold 4.2.2) ( if you got older Enfold Versions – search for that)
    to comment it out:

    //deactivate title bar if header is transparent
    if(!empty($transparency)) $header['header_title_bar'] = 'hidden_title_bar';

    so there is:

    //deactivate title bar if header is transparent
    //if(!empty($transparency)) $header['header_title_bar'] = 'hidden_title_bar';

    has the solution – if we could do this via child-theme ? i don’t know (now) how-to

    see here in action (with transparency option): https://webers-testseite.de/breadcrump-under-first-color-section/

    • This reply was modified 6 years, 10 months ago by Guenni007.
    #907454

    well to have it on sliders and on first-color-section too take instead:

    function change_position(){
    ?>
    <script>
    (function($){
    	$('div.avia-builder-el-first').each(function () {
    	        $(this).insertBefore($(this).prev('#main .title_container'));
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'change_position');

    https://webers-testseite.de/breadcrumb-under-sliders/
    or here with your kind of header and logo: https://webers-testseite.de/weber/service/

    • This reply was modified 6 years, 10 months ago by Guenni007.
    #907565

    by the way – i was wondering about performance ou your site : your images on top ( f.e. on http://www.tvsrbsa.org/early-bird-pre-order-sale/) are too big ! (think of loading time)
    12MB as jpg ( opend it is nearly 70MB)
    this here has 117kb (on full resolution – the image hoster shrinks it to 1200px width) and i think that is with its blur more than enought. your second on my testpage link in slider has 144kb.

    or here with your kind of header and logo and your background: https://webers-testseite.de/weber/service/

    #907799

    By the way – dear Mods – how could a shortcode solve that problem.
    I first tried to do it this way. but if the option of a breadcrumb isn’t set in editor for the page/post the shortcode does not work.
    How to insert a shortcode via child-theme. Append it does not work – or do you know a way to do it?

    The way on top is a clean way – because it uses the existing breadcrumb – and only changes position!

    #907937

    Hi Guenni007,

    What do you mean it does not work as shortcode? The option to show title and breadcrumbs might be not set in theme options. Have you checked that?

    Best regards,
    Victoria

    #907969

    Thank you so much Guenni007! That’s awesome and I’ve got it in place now.

    Thank you also for taking the time to try it out on your own site, I appreciate it a lot. Also thanks for pointing out the image sizes, I will look into compressing them. Definitely an oversight on my part putting this site together quickly.

    I did first try the short code method, but like I mentioned above, it does not look right without even more custom css than I am already using – this is very clean.

    Thanks all for your time, very much enjoying the theme and great support.

    #907978

    Hi,

    @Guenni007
    thanks for sharing your solution, well done.

    Best regards,
    Mike

    #909168

    so i can destroy the test-page with your images!

    If you haven’t transparency headers – everything is ok on updating the parent theme – but with transparency header option
    think of commenting that line out in Parent-theme will get lost on update. So you have to do it again in this case.
    I don’t know how to do it via child-theme

    #909243

    is it possible to get rid of that transparency test via avf_header_setting_filter ?

    it was possible to activate the secondary menu without having elements in it via:

    add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);
    function avf_header_setting_filter_mod($header) {
      $header['header_secondary_menu'] = 'extra_header_active';
      return $header;
    }

    so there must be a filter look like this to have output of breadcrumb even vor transparency headers ?

    #910071

    Hi,

    Please try to set the “header_title_bar” settings to “title_bar_breadcrumb”. For transparency, set the “header_transparency” to “header_transparent”.

    Best regards,
    Ismael

    #910579

    Thanks – thats it – but i want transparency option is set on page/post editor
    So this will be enough:

    add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);
    function avf_header_setting_filter_mod($header) {
      $header['header_title_bar'] = 'title_bar_breadcrumb';
      return $header;
    }
    #910601

    no – to early

    it should be not set globaly

    i want to get rid of that check via child-theme
    the transparency does not allow breadcrump because:

    //deactivate title bar if header is transparent
    if(!empty($transparency)) $header['header_title_bar'] = 'hidden_title_bar';

    header_title_bar should get the selected value even for transparency is set.
    but i think there must be a child-theme solution to uncomment this

    #910723

    yes i know that i can totaly copy the function to child-theme functions.php – but there must be a more elegant way to avoid that transparency check.

    #911073

    Hi,

    You can check for the current value of the “header_transparency” settings. If it is filled or has value, set the header_title_bar to something else.

    Best regards,
    Ismael

    #911251

    yes – but i want to have the opportunity to have the choice on page/post editior to set it to be hidden.
    (Thats is the following when i uncomment that transparency check on functions-enfold.php)
    the following will cause every header to have titlebar.

    https://kriesi.at/support/topic/position-title-bar-below-first-element/#post-910579

    the following does not overwrite:

    
    //deactivate title bar if header is transparent
    if(!empty($transparency)) $header['header_title_bar'] = 'hidden_title_bar';

    but even if it does : I want to preserve the choice on page/post editor to set it to be hidden
    if that code here would overwrite the transparency check every transparency header will have forced title-bar

    add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);
    function avf_header_setting_filter_mod($header) {
      if(!empty($transparency)) $header['header_title_bar'] = 'title_bar_breadcrumb';
      return $header;
    }

    so i thought if a rule would be more specific than the transparency check could overwrite the parent check.
    Something like if transparency setting is not empty && header_title_bar is not hidden_title_bar than $header header_title_bar should be the value what is set in meta.
    But i can not reach it.

    • This reply was modified 6 years, 10 months ago by Guenni007.
    #912005

    Hi,

    Did you check the value of the “header_transparency” settings? Check if it’s empty or if it has a particular string in it. You may need to use the strpos function.

    // http://php.net/manual/en/function.strpos.php

    Example:

    
    //check if header transparency is set to true
    $transparency = get_post_meta(get_the_ID(), 'header_transparency', true);
    
    if (!empty($transparency)) {
        $header['header_title_bar'] = 'title_bar_breadcrumb';
    }
    return $header;

    Best regards,
    Ismael

    #912451

    We talk past each other – I do not want to change that globally, but have the opportunity to have the choice even on transparent headers to set the titlebar – even to be hidden.
    But i want to have the choice even for transparency header to have title bar !
    In other words : I do not want to be patronized if I want one or not
    or : as if the check from line 824/825 wasn’t there:

    		//deactivate title bar if header is transparent
    		if(!empty($transparency)) $header['header_title_bar'] = 'hidden_title_bar';

    Test your code – create a page with transparency and choose hidden title-bar. Now the title bar is there.
    on all tranparencies now – there is a title-bar.
    Without your code and show title-bar and transparency – titlebar is not there.

    is there a method to get rid of these two lines 824/825 with a filter via child-theme
    or is the only way to have that by copy the whole function to child-theme:

    if(!function_exists('avia_header_setting'))
    {
    	function avia_header_setting($single_val = false)
    	{ …
    #913065

    Hi,

    I apologize for the confusion and I didn’t mean to sound patronizing. Yes, you can copy the whole “avia_header_setting” function in the child theme without the function_exists check. Or maybe, create a new option, example by Josue here.

    // https://kriesi.at/support/topic/ability-to-select-header-position-on-page-overwrite-theme-settings/#post-518990

    Best regards,
    Ismael

    #913248

    sorry ismael – i don’t adress this to you but to the code of enfold.
    i guess it will be much easier to change the mark on meta-box ( to have hidden title_bar ) than trying to get rid of that transparency check.
    What is the worst case could happen : A user set the transparency option and has perhaps on Enfold global options : show title bar.
    When he looks to his page – he will check the mismatch – goes to editor again an set the whole thing to hidden_title bar.
    So maybe it would be a better idea to not have the transparency check at all.

    _____________

    But on that topic here i remembered the change position code ! i i tried to position the header completely to the bottom:

    function change_position(){
    ?>
    <script>
    (function($){
    	$('#main').each(function () {
    	        $(this).insertBefore($(this).prev('#header'));
    	});
    	$('#header_main').each(function () {
    	        $(this).insertBefore($(this).prev('#header_meta'));
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'change_position');

    https://webers-testseite.de/weber/
    nice and even the hamburger and “drop-down” menu will go on working :lol
    on ipad and an old iphone4s it works –
    only the chrome browser has a little time shift on loading the page.

    • This reply was modified 6 years, 10 months ago by Guenni007.
Viewing 30 posts - 1 through 30 (of 33 total)
  • The topic ‘Position Title Bar below first element’ is closed to new replies.