Looking at the code in the file page-pagebuilder-title.php, I don’t see how the page builder detection is working, since once the variable is set, it’s never tested:
...
/**
* detect the page builder
*/
$td_use_page_builder = false;
if (method_exists('WPBMap', 'getShortCodes')) {
$td_page_builder_short_codes = array_keys(WPBMap::getShortCodes());
if (td_util::strpos_array($post->post_content, $td_page_builder_short_codes) === true) {
$td_use_page_builder = true;
}
}
//no page builder detected, we load a default page template with sidebar / no sidebar
?>
<div class="td-container">
<div class="td-container-border">
<div class="td-pb-row">
<?php
switch ($loop_sidebar_position) {
...
Hi
On page-builder+title post template is no need to detect the page-builder as the page structure is different. The indicated code remained there from previous versions of the theme but no have no usage with the current implementation and can be removed with no problems.
Thanks!
-
This reply was modified 10 years by
Andrei L..
Hi,
I don’t mean to drag this on, but I just want to clarify one point. I’m not bothered about what’s in the code, but rather what it says in the UI when editing a page. It says, “Note: The settings from this box only work if you do not use visual composer on this template. The template detects if visual composer is used and it removes the title and sidebars if that’s the case.”
However, that didn’t seem to be the case, which is what sent me to go looking in the code. As I said, for a person who’s just starting out, I think there’s enough stuff to figure out without the confusion over this.
