-
AuthorPosts
-
February 8, 2015 at 10:15 pm #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.February 9, 2015 at 5:22 pm #393158Hi 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ünterFebruary 9, 2015 at 6:56 pm #393221Hello 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,
BasFebruary 10, 2015 at 9:28 am #393561Hey!
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,
IsmaelFebruary 10, 2015 at 12:39 pm #393637Thanks 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,
BasFebruary 10, 2015 at 1:23 pm #393659Hi!
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ünterFebruary 10, 2015 at 2:53 pm #393700Thanks 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,
BasFebruary 11, 2015 at 6:25 pm #394562Hey!
you can to hide the border line using this code:
.container_wrap { border-top-width: 0px; }
Regards,
AndyFebruary 12, 2015 at 3:06 am #394812Thanks 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?
February 12, 2015 at 3:24 pm #395063Hey!
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,
IsmaelFebruary 12, 2015 at 6:26 pm #395217Thanks Ismael and the rest, everything is sorted now. You’re a bunch of heroes ;)
Regards,
Bas -
AuthorPosts
- The topic ‘Add code in page title container’ is closed to new replies.