The way the options used to work (can’t say for sure which version it worked in last as it’s been a while), you had to actually use VC for the page title to stop showing up. Now in 7.1.1 I put in a CF7 shortcode on a page and the sidebar and page title disappears.
I know the theme supports CF7 as a VC element but one does not equal the other!
Now I can’t have a page with a shortcode from an entirely separate plugin in it without also loading VC css/js, which I don’t want.
Tested with an all text page by inserting and removing the shortcode for the default CF7 form [contact-form-7 id="1295" title="Contact form 1"] at the end of the page body. When the shortcode is there, I get no page title or sidebar (in spite of Page Settings), and when it’s not there, the page has a title and sidebar. I also tested on my production site and a fresh install with nothing but Newspaper and VC installed, same issue.
Need a fix please.
Obviously, if the use of VC triggers page title and sidebar inclusion, then it shouldn’t be checking for any shortcode, it should be checking the beginning of a VC row and ONLY that shortcode. If it’s there, change stuff, if not, stop breaking stuff.
Hi Bryson,
Have you also tested this on a different page template? Please check the pagebuilder + page title, not the default template. the default will only sow title and sidebar if no shortcode is detected. For the default page template you can find the title and sidebars cases here (pagebuilder or no pagebuilder) http://screencast.com/t/RUMOx3jcm
If you want to change this behavior, edit the file and remove the conditions for the pagebuilder.
I hope this helps.
Thanks.
Everything else works as expected.
Problem is, on a fresh WP install with any other theme, the use of ANY shortcode in a page maintains the basic elements of a page template (title, body). Searching for ANY shortcode to decide whether or not VC is being used is a bug. To go by your own documentation:

If VC is used, the page title will not show. I didn’t use VC and the page title didn’t show. You see where I’m going with this?
Whatever conditional is being used to check for a shortcode is not limited to a regex for VC only shortcodes and is tripping on any and every shortcode available. It essentially ruins the shortcode feature of the whole page system in WP. It modifies core behavior in a round about way that doesn’t actually change core code.
I can edit this myself, sure, and I can even keep maintaining it across updates, but that’s just a band aid for the bigger problem. This isn’t a localized issued. Also not a difficult fix… ** correction. It’s not a difficult fix for you because you know the VC methods used and how they cross with NP methods. Looking at the code, it looks like you’re depending on VC’s own internal array of shortcodes and then not filtering through them at all aside from adding the leading bracket to the shortcode names. Literally checking if it’s empty or not and nothing else…
`
if (is_array($td_page_builder_short_codes) && !empty($td_page_builder_short_codes)) {
foreach ($td_page_builder_short_codes as $short_code_name){
// we have to add [ before the shortcode name, else it may target simple words that match with the shortcode name
$short_codes_buffer[] = ‘[‘ . $short_code_name;
}
}
if (!empty($short_codes_buffer) && td_util::strpos_array($post->post_content, $short_codes_buffer) === true) {
$td_use_page_builder = true;
}
`
If it’s not going to be fixed, then the above screenshot shows text that must be changed, because ALL I’m wanting is for the software to do what it says there; if VC is used, no title, if VC is not used, page title. Simple.
Thanks.
-
This reply was modified 10 years by
Bryson T.
if (is_array($td_page_builder_short_codes) && !empty($td_page_builder_short_codes)) {
foreach ($td_page_builder_short_codes as $short_code_name){
// we have to add [ before the shortcode name, else it may target simple words that match with the shortcode name
$short_codes_buffer[] = ‘[‘ . $short_code_name;
}
}
if (!empty($short_codes_buffer) && td_util::strpos_array($post->post_content, $short_codes_buffer) === true) {
$td_use_page_builder = true;
}
Found the answer to the real problem, and it was simple.
I added lines 44 and 46 in that file.
While building the array of shortcodes used to determine which template to use, I added a check for the string vc_, which is the beginning of all VC shortcodes (can’t use VC without first having a row, etc.) in the foreach loop, and only if that string is found does it add the item to the array that is later checked against the post content. This way, the automatic changes based on whether VC is used works as intended, and as clearly stated in the theme’s documentation.
Tested with several shortcodes and so far it’s only catching when an actual VC shortcode is used.
That is normal WordPress behavior.
Hi Bryson,
The system implemented and used by the theme detects shortcodes on the page and in this case the page will not have title and you are right it is specified that only when V.C. is used the page will be without title.
Thanks for notify this and for your explanation. I will add this on our list as reference and our programmers will modify the code in this regard.
Have a nice day!
Alin V.
Thanks, @alin_vlad. I appreciate you reading along and seeing the problem.

