Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #392794

    Hello, I am trying to put the following code: <?php if(function_exists("transposh_widget")) { transposh_widget(array(), array('title' => 'Translation', 'widget_file' => 'flags/tpw_flags.php')); }?> in the title container at the place where breadcrumbs would normally be (I swiched them off). I’ve desperately searched through all the php files for the right location but I can’t seem to find it.

    #393158

    Hi basdemos!

    Thank you for coming back.

    The breadcrumbs are inserted at:

    enfold\functions-enfold.php line 311 you find:

    
    if($breadcrumb) $additions .= avia_breadcrumbs(array('separator' => '/', 'richsnippet' => true));
    

    and the function is located in:

    enfold\framework\php\class-breadcrumb.php line 173

    Hope, this will help you.

    Regards,
    Günter

    #393221

    Hello Günter, thanks for the quick reply, I tried to put the code in multiple places near the breadcrumbs insertion part but it didn’t show up. It’s two language flags I want to appear in the place where the breadcrumbs would normally be. I’m a complete PHP noob so that’s not helping either. I know this is probably beyond the scope of support but if you can help me having it show up in the page title area that would be a great step forward, then I can probably move it around with CSS myself.

    I got it to show up in the header earlier but that wasn’t a good place after all. Page title area would be much better.

    Thanks,
    Bas

    #393561

    Hey!

    Try this on functions.php:

    add_filter( 'avf_title_args', 'avf_product_titleee', 0, 2 );
    function avf_product_titleee( $args, $id ) {
    	$transposh =  transposh_widget(array(), array('title' => 'Translation', 'widget_file' => 'flags/tpw_flags.php'));
    	$args['html'] = "<div class='{class} title_container'><div class='container'><{heading} class='main-title entry-title'>{title}</{heading}>{additions}</div>{$transposh}</div>";
    	return $args;
    }
    

    Regards,
    Ismael

    #393637

    Thanks for the help! Now another problem arises, when I copy functions.php to the child theme folder my website goes blank, even with nothing modified. I then tried to do what’s stated on the top of functions.php (setting the global var to ‘true’) but that resulted in a blank page too.

    Regards,
    Bas

    #393659

    Hi!

    Thank you for coming back.

    When using a chld theme, you must not copy functions.php from Enfiold.

    functions.php from the child theme is loaded before functions.php of the parent theme.

    Only your added functions have to be copied to the child theme and be deleted from the parent theme.

    DO NOT SET THE GLOBAL VARIABLE TO TRUE !!! This will avoid loading the parent functions.php.

    Come back, when you have problems.

    Best regards,
    Günter

    #393700

    Thanks for the quick help, it worked and I managed to make it float right with css! One last thing, the flags have their own ‘bar’ now, I’d really like to have it in the same area as the page title.

    See http://atlantikwallmuseum.nl/

    Regards,
    Bas

    #394562

    Hey!

    you can to hide the border line using this code:

    .container_wrap {
    border-top-width: 0px;
    }
    

    Regards,
    Andy

    #394812

    Thanks a lot Andy, another step forward! Hopefully now really the last question: I tried to give the background the same color as the rest of the page, but because I made it float right, the background color only applies to that little area and the rest is filled with the #main background color. I guess I need to wrap the flag widget div inside a new div somehow?

    #395063

    Hey!

    Add this to the Quick CSS field:

    .transposh_flags {
    float: right;
    padding-right: 5px;
    width: 100%;
    text-align: right;
    background: red;
    }

    Change the background color.

    Best regards,
    Ismael

    #395217

    Thanks Ismael and the rest, everything is sorted now. You’re a bunch of heroes ;)

    Regards,
    Bas

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Add code in page title container’ is closed to new replies.