22302 comments found.
Hi AJ
Another query re Custom Post Types.
The “landing page” where I will use Cards to show the posts is a child page. (About > Case studies).
In the Post Types Unlimited settings I have specified the Case studies page as the “Main page” however the breadcrumbs set by the theme are skipping “About”
So it’s showing:
Home > Case studies > Current post
But it should be:
Home > About > Case studies > Current post
Can you help?
Thanks
James
Hi James,
I just tested this and it looks like it’s working for the built-in post types (portfolio, staff, testimonials) but not for ones added via PTU. I will add the fix right now. I can send you the updated file when ready so you can patch it temporarily via FTP so you don’t have to wait for the nextofficial update. Let me know if you want that (so it can trigger a new comment notification – this way your comment won’t disappear from my dashboard here on TF).
Thank you for bringing this to my attention!
I will also update the dropdown in PTU where you select the main page so it shows the page hierarchy so it’s easier to use if you have many pages.
- AJ
ps: If you are using Yoast SEO you will need to switch to the theme’s breadcrumbs by disabling Yoast breadcrumbs under Yoast SEO > Settings > Advanced > Breadcrumbs > Enable breadcrumbs for your theme. Otherwise it won’t work regardless.
Actually, if you want to fix the issue yourself by editing the code, it’s very simple. You can edit the file at Total/inc/lib/wpex-breadcrumbs.php and change line 404 from:
$trail['post_type_archive'] = self::get_crumb_html( get_the_title( $ptu_check ), get_permalink( $ptu_check ), 'trail-main-page' );
to:
if ( true === self::$args['show_parents'] && $parents = self::get_post_parents( $ptu_check ) ) {
unset( $trail['post_type_archive'] );
$trail = array_merge( $trail, $parents );
} else {
$trail['post_type_archive'] = self::get_crumb_html( get_the_title( $ptu_check ), get_permalink( $ptu_check ), 'trail-main-page' );
}
Thank you for bringing this issue to my attention!
- AJ
Hi AJ
Thanks – that worked for breadcrumbs! 
But I still have a related issue.
So, my PAGE structure is:
About (parent) (slug: about) Case studies (child) (slug: case-studies) (I will use a Card on this page to present the case study post type posts)
Which gives URL: /about/case-studies/
So far so good. But the case study single posts URLs are not right, they are not hackable.
/case_studies/title/
Notice the underscore, but I want a hyphen And /about-us is also missing
I can see the underscore in the PTU Name (required) field although I did not ask for that, it seems to have been auto generated. When I try and change it to a hyphen it saves OK but the page then gives a 404.
Can this be solved too?
I can send you a log in via ticket if needed.
Thanks
James
Hi James,
In WordPress your post slug is going to be your post type name by default. So you need to use the “Custom Rewrite Slug” when adding your custom post type to modify it to about-us/case-studies.
But because of how WordPress works if you have a page also with the slug about-us it could create conflicts and your posts may end up displaying 404 errors. In which case you would need to add custom rewrite rules to your site.
- AJ
Amazing AJ. Worked perfectly and no conflicts despite having a page with the same slug 
Sweet 
Hi AJ
Got a bit stuck. I want to auto load a dynamic template when adding a new post – but can’t work it out.
Here’s what I have done:
Using Post Types Unlimited I have created a new post type called “Case studies”.
Using Dynamic Templates I have created a template for case studies.
Again in Post Types Unlimited, under Theme Settings Single Post I have selected the dynamic template I want to use for this post type.
In WPBakery > Role manager I have enabled the post type Case studies to use bakery.
That’s as far as I got.
What I want is for the dynamic template to automatically load when I “Add new” for this post type. But it’s not happening. Firstly I have to click “Back end editor”, and then all I can do is start a layout from scratch, as if the template does not exist.
Help!
Thanks
James
Hi James,
I’m not sure you are understanding the purpose of a dynamic template. A dynamic template should be assigned to your post type to provide a global layout for the post. So you would create your dynamic template then your actual posts don’t/shouldn’t even need to use a page builder like WPBakery.
This gives you complete control over the design of all posts that you can edit from a single location.
What I think you are asking is that you want the template you created to be dumped into the post content whenever you create a new post. This is not possible with dynamic templates and it’s not something I would ever recommend doing. Why? Well, if you create a bunch of posts and you ever need to change their design you will need to manually edit every single post since you added the content with the page builder manually.
The whole point of Dynamic Templates is it removes that lock in effect.
Take for example this demo – https://totalwpthemedemo.com/biz/portfolio/ – whenever you click on a portfolio item you can see they all have the same layout. This is because I created a dynamic template for the portfolio posts so that when adding portfolio items I don’t have to use the page builder every time. I made a video to show you the backend: https://a.cl.ly/xQuJpARA
I hope this clears things up now!
Please see the guide and video here: https://totalwptheme.com/docs/dynamic-templates/
- AJ
ps: You can do what you want installing and using Templatera, but again, I don’t recommend this.
pss: If you need to create something much more complex then the example I shared on Biz you may need to register custom fields to use for different data – https://totalwptheme.com/docs/snippets/add-custom-metaboxes-to-total/ – and/or you may need to create custom integration for your new fields (for example if you need to have repeater fields or complex outputs for a specific field).
Hi AJ – thanks – yeah on reflection I did misunderstand.
I do have another question though.
I have used PTU to set a custom post type.
I have then used ACF for custom fields (all are WYSIWYG fields), and then present those custom fields using the dynamic template.
When adding a new single post type, is there any way to remove the “standard” WYSIWYG editor as it’s totally redundant (not used in the dynamic template). Leaving just the custom fields I created?
Thanks
James
Hi James,
Simply edit your custom post type and in the first tab scroll down to ‘Supports” and uncheck everything you don’t need – https://a.cl.ly/xQuJ96Ep
- AJ
Ah yes! Thanks.
Hey AJ, ist there a way to set or unset the global base font size I assume the theme sets to 13px by default? So that the browser defaults could kick in.
Hi,
There are 2 things here:
1. By default total set’s the root HTML font size to 10px, which was the standard back when the theme was released. 2. Total does set the default Body font size to 13px.
So, you can just go to Appearance > Customize > Typography > Body and set the font size to 16px – which is the default browser font size.
Now, if you wanted to use rem units you would need to add a little CSS to modify the root font size. Like such:
html { font-size: initial; }
This way if you wanted you could set the body font size to 1rem instead of 16px. You can even just use CSS like this if you prefer to not use the Typography settings (some customers disable the Typography settings in the Theme Panel to slim things down).
html { font-size: initial; }
body { font-size: 1rem; }
You can also modify the font sizes for your whole site by changing the presets under the Global Styles Tab. More info here: https://totalwptheme.com/docs/preset-font-sizes/
- AJ
ps: I’m making some adjustments for Total 6.0 so that the default base font will be 16px for new installs. I will have some sort of function for people updating so it won’t affect them. This will likely be done via a new option added under Customize > Typography > General named something like “Root Font Size” and an option for “10px (legacy) or 16px (Browser Default)”.
Thank you very much for the fast and detailed explanation. I was looking for a way to allow the user settings take precedence (in case of A11Y) without possibly running into unwanted side effects themewise.
Yes, setting the HTML font size to initial is probably best (either one of those css snippets).
That said, I believe modern browsers and devices are coded to use a ‘zoom’ affect for the preferred font size. Back in the day it would modify the root font size, but I think since so many websites are coded differently, the standards shifted to using zoom instead. I could be wrong, but the research I’ve done this is what I’ve come to understand. I’ve also tested changing the preferred font size on my iMac to confirm this. If you know otherwise though please let me know!
- AJ
I am trying to make filterable masonry image grid. I am able to add a taxonomy to the “attachment” post type but fail to figure a way to use it to filter with the given grid elements. “Post Cards” only shows “regular” post types and the other grids are not filterable. Do you have any idea? Thanks in advance 
Got it working: In the post cards element I select “Card Style – Image” and “Query Type – Post Gallery”. With the post types unlimited plugin I create a taxonomy for “Attachments” and then iI can use the navigation element with this taxonomy to filter. Only drawback is that “Filter Mode – Ajax” is availale for “post cards only” not for attachments I guess. 
Hi,
- If you wanted to display attachments you can also do so using a custom query like such: https://a.cl.ly/xQuJpYPb – the secret is that in WordPress you must set the post_status to “inherit” in order for the query to work.
posts_per_page=12&post_type=attachment&post_status=inherit
- I did a test with the ajax filter and it’s sending the correct information to WordPress but I’m also not getting any results. There may be some WordPress bug or limitation that is preventing querying attachment posts by taxonomy. I’m looking into it to see if I can figure out what that is.
- AJ
ps: Total has built-in support for the Real Media Plugin if you want an easy way to organize photos – https://totalwptheme.com/docs/real-media-library-integration/ – I’m still trying to figure out why WordPress can’t query attachment posts using a tax query, but haven’t found anything on the topic so far…Going to run a test in the default WP 2024 theme to rule anything out.
I created a blank site to test and my custom taxonomy registered to the attachment type is working (sometimes). It appears that sometimes when I tag an image its set correctly and it will return in the ajax response (filter) but sometimes other images tagged the same way won’t work.
It there is a bug also in the backend showing that there are 0 items in a tag while there is one attached. Example: https://a.cl.ly/X6ujr0nw
In my other site if I try clicking on the tag it’s not showing any of the items that I’ve tagged so WordPress for some reason can’t find them – https://a.cl.ly/jku0oY8N (if this is also happening on your end, then it sounds like you have the same WP issue unrelated to the theme).
Honestly not sure what’s going on, but taxonomies are not “natively” intended to work with attachments so it’s possible you need some other hacks to get them to work seamlessly with WordPress.
- AJ
Hi AJ,
Trying to add ReCaptcha V3 to a site that’s got total installed. Entered the site and secret key into the theme settings page but nothing appearing, does it just automatically add to the default woocommerce my account, registration, checkout page and is invisible?
Hi,
The reCaptcha v3 fields in the Total theme are only used for the theme’s Contact Form element, it can’t be integrated into 3rd party plugins or sections of the site.
I’m pretty sure it says this in the Theme Panel before the input fields, but I’ll double check and if not I will add a notice to prevent any confusion!
- AJ
ps: For WooCommerce you don’t need captcha on the check out page if your site is set for logged in users to check out only. Also most bots aren’t smart enough to know how to add items to the cart then check out – I’ve never, ever had any spam on any of the theme’s demos that have WooCommerce. I would definitely recommend adding a captcha though to the login and registration screens (if needed). If you or your client can afford it though, I would highly recommend Akismet instead of any captcha – it will work very well and it’s not intrusive so your visitors won’t be bothered by all the annoying captcha stuff and branding.
I wonder why the logo does not show up in the header (beside the menu) even though it is configured according to the documentation (https://totalwptheme.com/docs/custom-logo/) . If I switch to another Theme, e.g. “Twenty Fifteen” it shows up – but not with Total.
Hi,
Can you share the URL so I can have a look at how it’s set up?
I can’t think of any reason as to why it wouldn’t show up and there aren’t any known bugs with the custom logo functionality. My only thought would be that a custom logo was also added into the theme settings metabox for a transparent header – https://a.cl.ly/mXuQoAkA – and the image link is broken so it doesn’t display.
That, or there is a retina logo image defined but it’s broken. This happens sometimes when a customer imports a demo and deletes the logo via the media library but it’s still technically defined in the Customizer. You could try adding and removing the retina image to see if that works, like such: https://a.cl.ly/BluPyOrA – so if there was a broken retina image set, adding a new one and removing it would reset the field.
- AJ
Thank you for this great instructions! Unfortunately it still does not work. For the site deepdialog.de a rework is under construction. The main page is currently without menu(+logo) but menu+logo should show up on the new page (soon to be front page), currently deepdialog.de/titel Changing to another Theme (e.g. twenty sixteen) helps but with Total Theme it does not show up.
I have just paid in order to renew support as I need to get this solved besides another issue. Please feel free to transfer this to support ticket.
Hi,
I’m not able to “transfer” this to a ticket myself because I don’t know your email address (that personal data that we don’t have access to as sellers on this marketplace). But you can submit a ticket yourself here – https://my.totalwptheme.com/
That said, I inspected your site and I can see the issue with the logo. There is some custom CSS on your which is setting the logo to “display: none;”. Here is a screenshot: https://a.cl.ly/5zuomJ58
You’ll want to go to Theme panel > Custom CSS and remove that CSS.
By the way, when I remove it myself I see you are using a pretty large logo and the centered header menu style (header five). And your logo is quite large so it will take up a lot of room on the site. So you may want to also go to Appearance > Customize > Header > Logo and use the “height” option to set a max height on your logo image so it’s smaller – https://a.cl.ly/WnuWKENL – or perhaps switch to one of the flex header styles which has a constricted header height by default – https://totalwptheme.com/docs/header-styles/
Let me know how else I can be of assistance!
- AJ
ps: Thank you so much for renewing support! It’s never required, but it really really helps me out. The WP theme industry is not what it used to be and every sale helps me be able to continue updating, maintaining and supporting the theme. So thank you!
Hi AJ, we have a simple 2 image slider we’d like to display to the right of our logo in the header. No animation other than auto loop between slide 1 to slide 2 thought we saw a comment about using an element other than rev slider. Plz. point us to area in doc or suggest on how to accomplish? Much appreciated, -aj
Hi,
I would highly recommend against a slider. Since you are just looping 2 images you really should just create a GIF or an animated SVG. Sliders require extra CSS and Javascript that will slow down your site and it’s not required in your situation.
There are many sites out there you can use to create a gif from an image if you aren’t sure you can try Google searching “gif generator”. Personally I would use canva.com for this, but canva can be a bit overwhelming maybe for someone new to the site. There may be a site out there were you can just upload both your images and it will spit out a gif.
Even if you created a small video instead of a gif it would be better than using a slider.
But…if you did want to use a slider it’s very simple using the theme’s image slider element and a template part. Here is a video: https://a.cl.ly/JruZlynE
- AJ
I don’t see any revolution slider items in my total theme. I have the plugin installed but there aren’t sliders to use
Hi,
This is Aj the theme author.
By default Slider Revolution doesn’t have any default sliders, it’s intended so you can create your own. And I don’t personally use sliders in my of my theme demos because I don’t believe most sites should user sliders (ever). There is a great article here I would highly recommend: https://yoast.com/opinion-on-sliders/ – and you can always delete the plugin and disable notifications for it in Total like this – https://totalwptheme.com/docs/disable-bundled-plugin/
The reason I include the Slider Revolution plugin is because when Total was created many years ago, sliders were almost a “must” for any theme and Slider Revolution was more minimal and fast. The plugin has become very bloated and sliders have become almost obsolete and not recommended by most experts. But I must continue to include it with the theme since it was always included. I am trying to think of ways to not have it bundled with the theme by default but still allow people to install it if they really want it.
Now, it’s possible to have sample sliders in Slider Revolution but the plugin developers have “hidden” the sample slides (was not the case originally) behind their own premium paywall. So you would have to buy a separate slider license to access their sliders library.
If you must use a slider plugin for your site, I would honestly recommend deleting Slider Revolution and instead use this free one – https://wordpress.org/plugins/depicter/ – but I would still recommend against any slides on your site.
I would be more then happy to suggest an alternative design to a slider if you want to share the site you are working on and what you were planning on doing. Using a static hero section instead of a slider will load much faster, is better for SEO and better for accessibility.
- AJ
Hi AJ
Think I might have discovered a small bug. Trying to add an Extra class name to the List (bullet) element, and when I save the element the class is not getting saved. When I reopen the element the field is empty.
Thanks
James
Hi James,
It looks like the class is being added/saved but then when you open the window up it’s being removed so the next time you save it won’t be there.
The issue is I renamed the field at one point to be consistent with all other extra classname fields and it looks like in the function I use to move the old name to the new one it’s got a little issue caused by somewhat recent WPBakery updates.
I patched this for the upcoming update and I fixed the version of the Total Theme Core plugin right now that get’s installed via the WP admin so you can delete and re-install the plugin. Or if you want to fix manually it’s very simple. You would edit plugins/total-theme-core/inc/vcex/shortcodes/bullets.php and change line 378 from:
if ( isset( $atts['classes'] ) ) {
to
if ( ! empty( $atts['classes'] ) && empty( $atts['el_class'] ) ) {
The reason the former code causes the bug is because the ‘classes’ param will technically always exist as it has to be registered as a hidden field so it can move over, thus this code is always running and reseting the field on edit. Previously this wasn’t the case.
Sorry for the troubles and thank you for letting me know!
- AJ
is there a simple way to add an “ID” and/or “local scroll ID” field to the headline element? Would love to see it implemented there as this is where I would like to scroll to 
Hi,
There is no element named “headline” in the theme or WPBakery is it perhaps coming from a 3rd party plugin or your child theme?
If so, I would imagine Total has pretty much every element you need so that you don’t have to install a 3rd party WPBakery add-on plugin and slow down the site. If there are any elements you think are missing that others would like as well, please let me know so I can add them in the theme so you don’t have to use a 3rd party add-on, thanks!
- AJ
Of course I mean the “Heading” element. Unfortunately, it has no ID option so i cannot local scroll to it yet.
I will be sure to add the setting in the next update. Thanks for the heads up 
That said, I recommend adding your local scroll ID to a row instead.
And if what you are doing is writing a post where you want to have a table of contents (this is the scenario where I can see adding ID’s to headings would be useful) I would highly recommend not using a page builder for articles and use Gutenberg instead. In which case, the Gutenberg heading element does have an ID field.
This is what I do on the Total docs – https://totalwptheme.com/docs/ – it’s a highly customized site using WPBakery for creating dynamic templates for it’s unique layouts, but individual articles just use Gutenberg. It’s how I recommend running any site (regardless of the builder – WPBakery, Elementor or Other) – page builders should be exclusively used only for dynamic templates and main pages – not posts.
Just worth mentioning in case…
- AJ
Setting Row Height? Hi, I am trying to create a row just below the header containing logo and nav that contains an image slider that rotates through a series of images.
Rather than make the row full height I would like to set it to 80% height for example so that it’s obvious to users that there is content below the slider.
I’ve had a quick search here and looked at documentation to see if i can find anything to help achieve this.
Could I please ask how to do this? Happy to be pointed to any online reference. Thanks
Hi,
This is Aj the theme author.
The best way to do this is to set your height using the CSS calc() function where you set the height equal to 80vh minus your header height (if it’s known).
By default the theme only uses a “fixed” height for the “Flex” header styles (all other header style’s height is dependent on the logo height) so it would be best to use one of those: https://totalwptheme.com/docs/header-styles/
This way you can use the following for your Row Min Height value:
calc(80vh - var(--wpex-site-header-height, 100px) )
If you aren’t using a flex header style you can just inspect your header to see how tall it is for your calc() function. Or you can instead use a clamp() function with some fixed values regardless of the header which should work for most cases. Example:
clamp(300px, 50vh, 600px)
So in this example you are saying to make the row 50vh tall (vh is a unit based on the viewport height, where 100vh is the full height of your browser) but not greater than 600px and not smaller than 300px. And you could mess around with those values till you find a good fit for what you want.
Now, if you are planning on using the theme’s Image Slider, this slider is responsive so the image will get smaller as the browser get’s smaller so it won’t fill up the whole row vertically (without added CSS).
In which case you could instead consider using a Slider Plugin such as the included Slider Revolution plugin (I don’t like it though and don’t really recommend it – I instead prefer the free Depicter plugin – https://wordpress.org/plugins/depicter/). This way you can setup a slider outside of WPBakery that will take up all the space you need.
Alternatively I made this free plugin for another customer (it’s not available yet on WP.org yet – hopefully some day, the review process over there has gotten crazy, my last plugin “Just Events” took 6 months to get reviewed!) – https://a.cl.ly/mXuQdge8 – this plugin will add new settings to the WPBakery row so you can assign images that will rotate behind the row. While also being able to add static content over the row if wanted.
If you use the plugin, you will need to go to the General tab of the row to enable the Background Slider then you will see a new tab where you can assign your images with a few settings for the slider speed.
Just keep in mind when adding a background slider it can potentially be slower and decrease page speed scores a bit from the added scripts and images. In some cases creating a video instead and self hosting it then assigning the video to the row background may be more efficient. It really depends on the quality, size and number of images you plan on showing.
Let me know if you have any followup questions!
- AJ
Hi,
I’m missing some WP Bakery elements when I use the backend editor.
If I try to add the “Custom Heading” Element it does not appear. I have other websites that still have this element. If I search for Custom, I am missing other items as well such as Empty Space, Post Grid, Post Masonry Grid and WP Custom Menu (These appear in another website)
I have the latest version of Wordpress and the theme.
-C
Hi,
This is Aj the theme author.
It sounds like perhaps you’ve enabled WPBakery Slim Mode on the site – https://totalwptheme.com/docs/wpbakery-slim-mode/ – which removes various elements that aren’t needed since Total has better alternatives.
For example Total has a “Heading” element which is much more efficient and has more settings then the WPBakery core “Custom Heading” element.
Total also has a “Spacing” element which is better than the WPBakery “empty space element”.
Total has the Post Cards element which is better than the “Post Grid, Post Masonry Elements”
...etc.
So you can disable WPBakery Slim Mode in your Theme Panel to have those elements show up. But I would recommend sticking to the Total theme elements where possible as they provide more flexibility and are in general better coded.
Plus, you will have access to exclusive theme features. For example in the Total Heading element you can select from your Color Palette – https://totalwptheme.com/docs/color-palette/ – which you can’t do in the WPBakery Custom Fields element. You can also use your custom defined Fonts in the theme’s Heading element – https://totalwptheme.com/docs/font-manager/ – which you can’t do in the WPBakery Custom Heading element.
Let me know if you have any followup questions or concerns with this!
- AJ
Thank you. That fixed it. Must have been ticked by accident or active by default.
It’s not enabled by default when installing the theme, but it can be enabled when installing a demo as I’ve been enabling this setting on newer demos to encourage people to use the setting.
I also added a notice under Tools > Site Health to recommend the setting as it can significantly speed up your site (backend and frontend). So some customers see this and enable the option through here.
I would personally like to have it enabled by default but I realize it would cause quite a bit of confusion with customers that have been using the theme. So I try and recommend/urge people to use it whenever I see they aren’t and get a chance to do so 
If there is any reason why you aren’t using the option, please let me know – often there is a better alternative and if not, perhaps it’s something I can look at implementing in a future update. Thanks!
- AJ
Hi A.J,
I’m looking at adding pagination to one of my pages (not posts), which is befinning to get very long, so splitting it using pagination would seem to be a good option.
Previously, I’ve used pagination by clicking onto ‘show how many images’ in various image galleries, but this page has videos on it, and there’s no obvious way to do it with a page full of videos.
Is there a way to do this by using WPBakery, as I cannot find a default pagination option anywhere?
Hi,
Pagination is a fairly complex function which requires custom URL rewrites (so the server knows the URL’s exist and don’t display a 404) and in WordPress the functionality is specifically tied to queries. In order to paginate a gallery it must be setup as a query using an element such as “Post Cards”.
If you have just “dumped” your videos onto the page using WPBakery columns you won’t be able to paginate it and I would recommend re-considering how your videos are added to the site.
If you have tons of videos what you should do is create a custom Post Type named “Videos” where you can then add the videos. So each “post” will be a video.
This way, on the page where you want to display them you can insert the Post Cards element and enable pagination. By having your videos in a post type it will be easier to add/remove and manage them in bulk as well. Plus if you ever want to have single posts for the videos (for SEO or bookmarking) it will open up this possibility as well.
Plus, you could always categorize your videos and add an ajax filter at the top to make it easier for your user to filter your videos: https://totalwptheme.com/docs/post-cards-ajax-filter/
—
I’ve had this question asked a few times so I just wrote a lengthy guide on creating a video post type for your site if you want to check it out: https://totalwptheme.com/docs/video-galleries/
- AJ
Hi AJ, Hope you’re ok. I am trying to create a custom results page template where I can display products from feeding product ids through a url and then to the page i.e /find-a-key-results/?product_ids=466,655,555,333. I’ve got it more or less working but can’t work out how to display products in the standard grid layout that Total has by default..
Do you have any information on this?
Hi,
Sorry for the delayed reply, I’ve been fighting off a pretty bad case of bronchitis 
I’m not quite sure what you mean by “display products in the standard grid layout that Total has by default”. Can you share the URL you are working with so I can see what you’ve set up?
It sounds like you created a standard page (rather then sending the URL to the WooCommerce shop page) and then perhaps you inserted the Post Cards element to display the resulting products?
The way I would handle this would be as follows:
1. Create new page. 2. Insert Post Cards Element. 3. Select “WooCommerce” card style. 4. Select “Callback” as your Query Type: https://a.cl.ly/xQuJKyKD 5. Add a new whitelisted function to your child theme for the callback. Example code:
// White list custom functions.
define( 'VCEX_CALLBACK_FUNCTION_WHITELIST', [
'adamb258_woocommerce_query_products_by_id',
] );
// Custom function queries products from the product_ids URL param.
function adamb258_woocommerce_query_products_by_id() {
// Return empty query if product_ids is missing from the URL.
if ( empty( $_GET['product_ids'] ) ) {
return [ 'post__in' => [ 0 ] ];
}
// Sanitize post ID's for security.
$product_ids = explode( ',', sanitize_text_field( $_GET['product_ids'] ) );
$product_ids = array_filter( array_map( 'absint', $product_ids ) );
// Query products by ID's.
if ( $product_ids ) {
return [
'post_type' => 'product',
'post__in' => $product_ids,
'posts_per_page' => count( $product_ids ),
'orderby' => 'post__in',
'order' => 'ASC',
];
} else {
return [ 'post__in' => [ 0 ] ];
}
}
Note: If you had already created custom callback functions don’t re-define “VCEX_CALLBACK_FUNCTION_WHITELIST” but instead add your new function name to your current array.
6. Then you can select your custom function now for your callback: https://a.cl.ly/5zuoZQJx 7. Now the theme will call your custom function for the Post Cards element and use your custom arguments for the WP_Query.
Let me know if you have any followup questions or issues!
- AJ
AJ that worked like a dream first time. Thank you so much. Best theme on Themeforest!
Great!
- AJ
Hi AJ,
First as always, thanks for the most perfect WordPress template on the planet. I am celebrating 10 years using WordPress and your theme was my first Envato purchase way back on July 29, 2014. Since then, I’ve purchased more than a half-dozen licenses for other websites I’ve built for family and friends. Simple the best.
Anyway, can you provide any insight as to why my favicon links are blank. The favicons are displaying okay in the browsers as I’ve uploaded them through the theme. But Google and Bing (and Yahoo, MSN, etc) are not displaying the favicons in their search results.
It never really bothered me but I had some free time this morning to look into it, and I noticed that at around line 122, the following lines of codes are blank (right after the closing tags for the google tag manager)..
<link rel=”icon” href=”” sizes=”32×32”><link rel=”shortcut icon” href=””><link rel=”apple-touch-icon” href=”” sizes=”57×57” ><link rel=”apple-touch-icon” href=”” sizes=”76×76” ><link rel=”apple-touch-icon” href=”” sizes=”120×120”><link rel=”apple-touch-icon” href=”” sizes=”114×114”>
Websites I’m referring to: thedronecoach.com and londonestatephotography.co.uk
Any tips pointing me in the right direction are always appreciated.
Thanks AJ and I hope all’s been well.
~ Frank
Hi Frank,
Wow, 10 years! That’s not far off from the time the theme was released 
I double checked the theme code and it’s correct so your images should be showing. When you assign your Favicon images under Theme Panel > Favicons they get saved using the Wordpress attachment ID and then I use the core WordPress wp_get_attachment_image_src to return the image URL – it looks like your site is not returning any image URL from the defined ID’s.
In the backend do you not see the previews either? Like this: https://a.cl.ly/jku02yBn – if not, then it sounds like there is an issue with the saved ID’s. Perhaps your favicon images were deleted via the Media Library but not removed from the Favicons panel so it’s inserting empty tags (I will add an extra check in the theme to ensure if the images don’t exist it won’t insert blank html).
That said, Total has a Favicons panel because this was never part of WordPress. If you want you could disable the Favicons panel (via the main Theme Panel) and instead assign your image using the WordPress setting under Settings > General > Site Icon.
The reason to use the theme’s Favicons panel would be if you want a different image for different devices. Which is why I haven’t removed the panel from the theme entirely. Also, the WordPress setting will crop the image you select into different sizes which won’t allow you to optimize them prior to upload (I recommend passing all images through tinypng.com or similar service prior to uploading them to your site).
- AJ
Thank you AJ! I sincerely appreciate your in-depth reply as this helped me find that for my drone coach websites, I had “Disallow: /wp-content/” in my robots.txt file. I’m assuming this might be my problem, so I removed that and I’ll continue to monitor. I honestly forget why I originally added that disallow.
Some of my websites had the favicons uploaded as shown in your image link, and some did not.
Thanks again for everything!
Frank
Hi Frank,
Sorry for the delayed reply, I’ve been fighting off a pretty bad case of bronchitis 
The Disallow added in the robots.txt shouldn’t cause the issue at all, the reason you would add this would be to prevent search engines from crawling your theme, plugins and upload folders.
Personally, I wouldn’t recommend restricting access to the uploads folder since that has all your images which you may want to show up in Google image searches. Instead you could Disallow the wp-content/themes/ and wp-content/plugins/ folders if you really wanted to. But I think most people don’t do this. I think looking at a reputable website to see what their robots.txt looks like is a good idea, such as Yoast’s – yoast.com/robots.txt
If you want shoot me an email directly to wpexplorer [at] gmail dot com with your site logins (and FTP if possible) so I can log in and see what’s actually going on and get you all fixed up!
- AJ
So sorry to hear that AJ but please no worries. Just rest and get better.
I have been following Yoast guidelines for quite some time, and looking at WPExplorer too
. I typically only have User-Agent: * as the only thing in my robots.txt file. I really cannot remember why I would’ve added the Disallow: /wp-content/ on just the drone coach websites, but I definitely forgot about it.
But as strange as this may sound, after removing the Disallow: /wp-content/ from the two drone coach robots txt files, Google is now showing my favicons in their search results. Likely all hiding in my media folder, which I was telling Google not to index! No wonder I don’t see any images from my websites too! :\
Get well soon!
Sorry I did misspoke before, blocking access to the files would prevent the search engine from showing the icons, but it wouldn’t explain the empty HTML references in your code.
I checked out both sites and the icons are properly registered and added to the page correct now. Perhaps you re-added the images in the admin as well?
No need to answer…regardless, I did inspect your site’s code and everything looks good now!
- AJ
Can you help me understand, if 3rd party vendor owns the license of the Total theme used on my company’s website, but now 3rd party vendor support ends up and my company want to own the license. Is there a possibility that license can be transferred to my company’s name.
Hi,
It’s not possible to transfer licenses on this marketplace. What you can do, is have the old company give you their Envato logins which has the license. Otherwise, as long as the theme license is active on your site under Theme Panel > Theme License and you’ve saved the license somewhere as a backup (like in a text file) then you can always keep the site active to receive updates.
The only reason for you to own your own license would be to receive support (which most customers don’t really need).
Of course you can always purchase your own license if you are concerned about needing to access support in the future. When it comes to support, Envato does have a support license for all products which renews every 6 months. Personally I reply to ALL comments here from any customer (regardless of the support status) – especially if the user is reporting a bug. But I do require an active support license to submit private tickets via my own system here: https://my.totalwptheme.com/
Let me know if you have any followup questions or concerns!
- AJ
Can I do one thing, If company purchase own license and replace with the old one and that way can I replace the site from old license to new license.
Hi,
Yes this is possible. The important thing is whatever ThemeForest account purchases the license that is the account with access to support.
What a lot of companies do is they will create a new ThemeForest account named something like “your_business_total_theme” and purchase the theme on that account and remove any billing information, this way they can easily share the account with any company members that need to log in, download the theme and/or ask questions.
This way, they can also “transfer” the account to someone else if they want in the future as well.
And what freelance web designers usually do is have their client create their own ThemeForest account and purchase the theme, this way the client can always access support, even after the site is built.
- AJ
Can we update only individual plugin like WPBakery plugin without updating the whole theme if any security issues are raised on that plugin? Like issue raised here for WPBakery – https://patchstack.com/database/vulnerability/js_composer/wordpress-wpbakery-plugin-7-7-authenticated-author-stored-cross-site-scripting-vulnerability?_a_id=431
Any Update on it?
Hi,
You must update the theme to update the bundled plugins as noted on the docs – https://totalwptheme.com/docs/update-plugins/ – or purchase your own WPBakery license (which is more expensive than the theme).
If you look at the actually security vulnerability though, it’s related to users that have access to edit your site which then lets them save weird content in the WordPress editor. In reality anyone with access to your site can do worse things without even being a “hacker” and knowing how to inject malicious code – such as delete your content or upload offensive media. These security sites like scaring people, but in reality as long as no one has access to edit your site that you don’t trust it’s really not a concern. And if someone gains access to your site this is irrelevant as they can do all sorts of things.
So if you are freaking out trying to get things instantly patched, I just want to ease your concerns a bit.
Whenever you see a security vulnerability make sure to read up on what it is and how it affects you personally.
Another good example is Slider Revolution which had multiple recent security patches all of which only were affected by users with administrator access, again, if someone has administrator access there is a lot of bad things they can do without injecting code into your site. The most important thing is to ensure you never give high user privileges to people you don’t trust.
Please do consider purchasing a license of the theme for continued updates and support. Thank you!
- AJ
Please help me with below queries 1. After buying License, can we download any theme version, released till date from the themeforest? 2. Could you provide the available plans for one production site and two staging environments? 3. Do we need to ask 3rd party vendor to remove our site domain from their registered theme list? So that we can add our or we can directly register our domain in theme portal and start using it?
Hi,
1. ThemeForest doesn’t have this feature, but I have backups of theme versions. If you tell me which you need I can send it. But why do you need old versions of the theme? You should only be using the latest version. If you want this to compare your current version with an old one to see if you can locate any modifications – I can probably just look at your live site and tell you right away if there were any modifications you’d need to worry about. I can also help you with updating your site if needed.
2. You can install the theme on as many staging/development sites as you’d like. You just can’t “activate” the license. License activation is primarily used for theme updates. So you can still use all the theme features on the dev sites without activating the license, you just wont get automatic update notifications and you will see a little warning in the admin to activate the license. But all features will be available in any site you install the theme on.
3. No you don’t. If your site currently has a different license registered to it, you can simply de-activate it from Theme Panel > Theme License if you wish to add your own license.
- AJ
Any thoughts as to why Bakery Builder wouldn’t suddenly stop working? I turned plugins on and off to test and it didn’t help. When I try to edit a page or portfolio item using Bakery Builder I get a spinning status wheel and blank page but no page to edit. The site is only two months old and I have changed anything I can think of.
Just as an update I’ve tried deactivating all plugins and reactivating, no combination of which brings WPBB back. I rolled the WP version back to the last release still didn’t work. I’ve changed WPBB role settings. I’ve disable Gutenberg. I’ve resaved pages and portfolio pages. I’ve resaved my permalink settings. I’ve updated all plugins across the board. Nothing get WPBB to work again. Then I found your WPBB troubleshooting guide and tried all the steps and nothing but saw the advice to open up the Developer Console and got these:
Uncaught TypeError: Cannot read properties of null (reading ‘innerHTML’)
Refused to display URL in a frame because it set multiple ‘X-Frame-Options’ headers with conflicting values (‘SAMEORIGIN, DENY’). Falling back to ‘deny’.
Uncaught DOMException: Failed to read a named property ‘vc_iframe’ from ‘Window’: Blocked a frame with origin “URL” from accessing a cross-origin frame.
frontend-editor.min.js?ver=7.3:10 Uncaught DOMException: Failed to read a named property ‘vc_iframe’ from ‘Window’: Blocked a frame with origin “
I tried disabling the minify JS and WPBakery Optimized JS from the theme panel but didn’t work.
Hi,
This is AJ the theme author.
So it looks like you are only having issues in the front-end editor, correct?
It sounds like perhaps the issue is related to your server’s CSP (content security policy). The WPBakery front-end editor works by displaying the live site inside of an iFrame and if your server is blocking the iFrame then it will just endlessly display the loading icon.
If you’ve recently added a CSP to your server, you will need to revise the settings or if you haven’t then you will need to contact your hosting company to see if they’ve changed anything.
To confirm, the backend editor works just fine?
- AJ
Thanks AJ. Yes, the backend editor works, just the front end editor. We haven’t added anything plugin-wise to affect the security but perhaps there is something else. I don’t think it is server level because we have other websites on a shared server and we use Total there as well and the front end editor is working. This particular domain is using Cloud Flare, could anything there be causing it?
AJ, I’m asking our IT to check if Cloudflare has an X-frame setting that might be interfering. Thanks again.
AJ, thanks again for the support and for building the best WP theme on the planet. You helped us locate the issue, it was indeed an X-frame option inside of Cloudflare that was set to deny.
Adding this for anyone searching the comments on this issue: If you are having issues with WP Bakery Builder loading or not loading, check your X-frame security options. WP Bakery Builder needs to load the front end editor in a frame. If it cannot do that, you will get a blank white page with a spinning circle.
Glad you were able to locate the issue, thank you for letting me know!
I was unaware CloudFlare had this option built-in. I used to have my own CloudFlare business account for wpexplorer.com, but because WPEngine switched to having CloudFlare built-in now I don’t have to mess with any settings as it’s managed and optimized all on the WPEngine side (which is really nice).
So thank you for sharing that info as well 
- AJ
Hi, In https://themeforest.net/comments/26747474 you mention the wpex_self_hosted_video_bg_attributes filter. I am using the self-hosted video value in the Media tab of certain posts and a Dynamic template that uses the Post Media module to display this in a banner at the top. I’d like the video to autoplay and to have controls. Is this the method I’d use to enable those video attributes? Perhaps the vcex_post_media shortcode already supports an attribute for html5 video attributes? Thanks for any help!
I see in themes/Total/inc/integration/wpbakery/video-backgrounds.php that this particular filter is deprecated now.
I see that the code looks like this now:
$video_attributes = (array) \apply_filters(
'totaltheme/integration/wpbakery/video_backgrounds/video_attributes',
$video_attributes,
$atts
);
What would the add_filter snippet look like for a self hosted video with a specific css ID where I would want it to loop, autoplay and have controls?
Thanks!
Hi,
The filter you mention will still work, but it’s specifically for the Self Hosted Video Background setting for WPBakery sections, rows and columns: https://a.cl.ly/YEuw5AWg
In terms of video attributes when displaying the Post Media video the correct filter for modifying the video output would be “wpex_post_video_html” – so you can hook into this filter and use str_replace to replace <video with <video and whatever attributes you want. Example:
add_filter( 'wpex_post_video_html', function( $video_html ) {
if ( $video_html ) {
$video_html = str_replace( '<video', '<video autoplay', $video_html );
}
return $video_html;
} );
Personally, what I would do in the Dynamic Template is use the Video element instead of the Post Media element so you can set up the Video element with all the controls you want.
And if you must you can always set up a different template just for videos that is separate from other post types. You can do this either by using this plugin and having a separate video category – https://wordpress.org/plugins/term-based-dynamic-post-templates-for-total/ – or a little custom code that modifies the template based on either the post format – https://totalwptheme.com/docs/snippets/set-dynamic-template-based-on-post-format/ – or based on if the current post has a video or not (I don’t have a snippet for this currently – but if you purchase a license or log in with the account that owns the theme license I can create a custom snippet for you).
- AJ
Hey, that snippet worked brilliantly! The reason I chose the Post Media module is that I only wanted it on a handful of posts and they would each have a different video (specific to the post) and the Post Media module picks up the link of the specific video chosen for that post. Would the Video module be able to do that? I was not under the impression that it could, but could be totally wrong.
(still searching for which account was used to purchase Total)
Yes, the Video module can display the post video as well like such: https://a.cl.ly/5zuog59x
A lot of the Total elements allow for dynamically displaying post content. For example the Image element can also display the featured image or a custom field image.
And for other element fields where you may not be able to select dynamic data to display, you can use dynamic variables to pull post data – https://totalwptheme.com/docs/dynamic-variables/ – for example you could use an Icon Box to display post data like such: https://a.cl.ly/jku02yWD
- AJ
Hello, is it possible to use images + videos mixed in a gallery? As far as I can see, only images are possible. Is that correct?
Im looking for a gallery where I can use images and videos. Does anyone know one for free? I hope its included here in this theme but I cant find it.
Hi,
Thank you for your patience, I hope you had a nice weekend. I just replied to your followup comment on the same subject 
- AJ
I could fix it.
I could not fix this.
is it possible to use images + videos mixed in a gallery? As far as I can see, only images are possible. Is that correct?
Im looking for a gallery where I can use images and videos. Does anyone know one for free? I hope its included here in this theme but I cant find it.
Hi,
This is Aj the theme author. I hope you had a nice weekend.
There isn’t a function that will display images and videos “inline” because usually videos have different aspect ratios and would look strange inside an image grid. However, you can assign videos to images for different galleries as mentioned in the documentation here: https://totalwptheme.com/docs/image-videos-attachments/ – this way you can have videos inside Image Sliders or added to image grids where they would open in lightbox format.
Of course, depending what you are doing you can always use for example the Grid Container to insert images and inline videos into the same grid – https://totalwptheme.com/elements/grid-container/ – but this would be more of a “manual” gallery as opposed to a dynamic gallery which you can do using the theme’s Post Gallery functionality and the guide mentioned above – https://totalwptheme.com/docs/using-post-gallery-image-galleries/
- AJ