-
AuthorPosts
-
October 23, 2015 at 11:34 pm #524149
Hi there,
I’d like to remove the title and breadcrumbs from the widget area, and instead add a custom widget area.I’ve already created the widget area, and just need to know where to include the php:
echo do_shortcode(“[av_sidebar widget_area='FeatureBox']“);If there is a better way to go about this, I’m open to suggestions.
Thank you kindly for your time.
October 24, 2015 at 6:03 pm #524264Hi LeJager!
Not really sure I understand. Are you trying to remove the title of a widget? If so then you would just need to leave the title setting blank.
If your talking about the title container where the title and breadcrumbs display then that is not a widget area. Can you send us a link to your page so we can take a look? You can set your reply as private if you wish.
Best regards,
ElliottOctober 24, 2015 at 8:32 pm #524282Hi Elliot,
Haha sorry, I can see how my question was confusing.I did mean the title container. I’d like to remove the title and breadcrumbs from the title container and instead display a custom widget area inside the title container. I’m pretty sure I can do this by adding the following php code:
<?php echo do_shortcode(“[av_sidebar widget_area='FeatureBox']“); ?>
I’d just like to know the best place to insert the code, and what I need to take out in order to remove the title and breadcrumbs.
I could insert the code in the single.php and page.php template files, but I’d prefer that the widget displays within the title box so that I can use the admin interface to hide the title container on a per page basis.Thank you for your kind assistance.
October 27, 2015 at 6:14 pm #525713Hey!
You can find that on line 330 in the /enfold/functions-enfold.php file.
'html' => "<div class='{class} title_container'><div class='container'><{heading} class='main-title entry-title'>{title}</{heading}>{additions}</div></div>",
You can either change it there or use the avf_title_args filter. Ismael posted a nice snippet here, https://kriesi.at/support/topic/adding-content-after-title-breadcrumbs-but-before-page-content/#post-334727.
Regards,
ElliottNovember 6, 2015 at 1:41 am #531300Hi Elliot,
I’ve tried the suggestions and while I’m able to add content to the title bar, it ends up breaking the page layout, specifically the right hand sidebar.For example:
http://dev-12mk.pantheon.io/vegan-birthday-cake-recipe/See below the code I’ve added to the enfold-child functions.php
Thank you,
Mattadd_filter('avf_title_args', 'avf_title_args_append', 1); function avf_title_args_append($args) { $appendcontent = "<div class='container_wrap append-content'>"; $appendcontent = "<div class='container'>"; $appendcontent .= do_shortcode("[av_sidebar widget_area='FeatureBox']"); $appendcontent .= "</div>"; $appendcontent .= "</div>"; $args['html'] = "<div class='{class} title_container'><div class='container'><{heading} class='main-title entry-title'>{title}</{heading}>{additions}</div></div>{$appendcontent}"; return $args; }
November 6, 2015 at 6:12 pm #531611Hey!
Try switching this line.
$args['html'] = "<div class='{class} title_container'><div class='container'><{heading} class='main-title entry-title'>{title}</{heading}>{additions}</div></div>{$appendcontent}";
To this.
$args['html'] = "<div class='{class} title_container'><div class='container'><{heading} class='main-title entry-title'>{title}</{heading}>{additions}{$appendcontent}</div></div>";
Cheers!
ElliottNovember 6, 2015 at 8:53 pm #531649Hi Elliot,
Thanks for the suggestion. It still breaks the page unfortunately. Please advise.November 8, 2015 at 6:07 am #531980Hey!
My bad. There’s a missing dot in the $appendcontent variable. Please replace the code with this:
add_filter('avf_title_args', 'avf_title_args_append', 1); function avf_title_args_append($args) { $appendcontent = "<div class='container_wrap append-content'>"; $appendcontent .= "<div class='container'>"; $appendcontent .= do_shortcode("[av_sidebar widget_area='FeatureBox']"); $appendcontent .= "</div>"; $appendcontent .= "</div>"; $args['html'] = "<div class='{class} title_container'><div class='container'><{heading} class='main-title entry-title'>{title}</{heading}>{additions}</div></div>{$appendcontent}"; return $args; }
Cheers!
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.