- TutorialsFrom WPBakery to tagDiv Composer
- TutorialsDefault Block Settings Guide
- TutorialsHow to Update the WPBakery Page Builder plugin
Hi there,
with the update of Newsmag theme to versione 2.3.5, the modification indicated at the http://screencast.com/t/yOEz5TC7x to file Newsmag/includes/td_config.php doesn’t work anymore. Even if I’ve set the ‘show_child_cat’ to 10, theme still shows only 5 child categories as you can see at http://43b.60a.myftpupload.com/.
Hereafter my code modification:
...
td_api_block::add('td_block_mega_menu',
array(
'map_in_visual_composer' => false,
'file' => td_global::$get_template_directory . '/includes/shortcodes/td_block_mega_menu.php',
// key added to supply 'show_child_cat' differently for each theme
'render_atts' => array(
'show_child_cat' => 10,
)
)
);
...
How I can get again to show more than 5 default child categories in the top megamenĂą?
I’m using a Newsmag child theme and I’ve made only this max category number modification to my Newsmag-child/includes/td_config.php file.
Thanks in advance for any appreciated help.
Giuseppe Maio
Hello,
Unfortunately our theme does not support featured posts. You can however create a featured category and add your posts to it, then add a block in visual composer on the specific post you want it displayed. You can activate visual composer on posts from the plugin settings: http://screencast.com/t/V4d9MhrFxr
if you do not want to do this for every post in particular, you can edit the theme files and edit the specific post template you use and add a function to the file called do_shorctode. This will add a specific block you set to it on every post that uses that particular template you edit. They can be used in the child theme as well.
For example you can create your block in visual composer on a dummy page and get the shortcode for it: http://screencast.com/t/02ccgJ2Q8mN then get the shortcode for the block in classic mode/text mode
Then you can edit the post template from the files: http://screencast.com/t/FBgdVg39o
example: <?php echo do_shortcode('[vc_row][vc_column][td_block_3 category_id="2"][/vc_column][/vc_row]');?>
I hope this helps.
Thank you!
Hello,
This can be achieved in 2 ways. The first one is choosing a different grid style. Take a look at our demo and switch between grid styles here: http://demo.tagdiv.com/newspaper/big-grid-1/ Style 4 is the brightest one. This style can be selected in visual composer: http://screencast.com/t/wF53pOxdCQb
If you do not wish to change the style and you use style 1 (i assume) then you can use css to remove the gradient:
.td-grid-style-1.td-hover-1 .td-module-thumb a:last-child:before{
display:none!important
}
Thank you!
Hi
You can insert an ad under post title using do_shortcode function in the file corresponding with post template used, like here: http://screencast.com/t/sOX6p9gHJ
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
To get the shortcode add an ad box into a blank page then switch in backend editor copy and paste this code: http://screencast.com/t/Kcqsjk9C7xbU inside do_shortcode function.
For homepage you can use the adbox clock from Visual Composer like here: http://screencast.com/t/0kTjlWwwg – http://screencast.com/t/USSisJGc
Hope this help!
Thanks!
-
This reply was modified 10 years by
Andrei L..
Hi
Try to deactivate all plugin except Visual Composer, clear all caches and test again. Also check in browser console while you’re saving the settings if there are any errors. Usually a 403 or 404 error appear in this situations.
Regarding the ad issue please make sure that you’re not using any ad-blocker software as I’ve checked your site with google chrome and the header ad it’s displayed fine: http://screencast.com/t/NVwwEtdkpDq
Thanks!
Hi,
You can replace these files:
1) td_panel_footer.php (includes/wp-booster/wp-admin/panel/views)
2) td_view_system_status (includes/wp-booster/wp-admin/panel/)
3) td_wp_booster_functions.php (includes/wp-booster/)
4) td-config.php (includes/)
5) td_footer_extra.php and
6) td_footer_extra_bottom.php (parts/footer)
7) style.css (root)
8) style-woocommerce (root)
You can update visual composer as well as there is a new version in the the new update.
Thank you!
Hi
The indicated part here: http://www.screencast.com/t/RSGBCaVe2 is not a block from Visual Composer. That is the loop part generated by page-builder + latest article pagetemplate. Its equivalent in backend editor is here: http://screencast.com/t/03Kwgm8hA9C
The function which generate that pagination can be found in td_page_generator.php http://screencast.com/t/EpLaTGGx4J The pagination for blocks it’s based on ajax and the hard part comes when this numeric pagination: http://www.screencast.com/t/RSGBCaVe2 must be adapted as a ajax pagination. Basically when you click on the page 2 or 3, the main page won’t reload, as happens now. The final implementation should be similar with this one: http://www.sanwebe.com/assets/ajax-pagination-basic/ but adapted at our theme’s requests. You can use this example if you want to give it a try: http://www.sanwebe.com/2013/02/ajax-pagination-jquery-php-simple but as I said in my previous reply it’s a very complex task which require time and many investigations in order to be accomplished successfully.
Hope this help.
Thanks!
Hey,
We were able to add config to each of the block settings (in visual composer) using a function hooked to admin_init. This allows the user to specify a list of terms in that taxonomy and filter the results by those terms.
function extendCustomTaxonomyOptions() {
// Check if Visual Composer is installed
if ( ! defined( 'WPB_VC_VERSION' ) ) {
return;
}
// Retrieve all Lifestyle taxonomy
$terms = get_terms('name_of_your_custom_taxonomy_here');
if( !is_wp_error( $terms ) && count( $terms ) > 0 ) {
$dropdown = array(
'Disabled' => 'disabled',
'All Custom Taxonomy Terms' => 'all'
);
foreach( $terms as $term ) {
$dropdown["- {$term->name}"] = $term->term_id;
}
// Param to be added
$new_param = array(
'type' => 'dropdown',
'heading' => 'Filter based on custom taxonomy',
'param_name' => 'adv_filtering_custom_taxonomy',
'group' => 'Filter',
'admin_label' => true,
'value' => $dropdown,
'description' => __( 'If selected, will further filter the posts based on the custom taxonomy', 'vc_extend' )
);
// Integrate and add new parameter to the options available from the parent theme
// See https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524335 for more info
for ( $i = 1; $i <= 16; $i++) {
vc_add_param( "td_block_{$i}", $new_param);
}
vc_add_param( "td_block_slide", $new_param);
}
}
Then we added some custom code in a child theme copy of the td_data_source class to read those settings and filter the results. This was added to the end of the td_data_source::shortcode_to_args() function, just before returning the $wp_query_args:
if( array_key_exists( 'adv_filtering_custom_taxonomy', $atts ) ) {
if( $atts['adv_filtering_custom_taxonomy'] != 'disabled' && !empty( $atts['adv_filtering_custom_taxonomy'] ) ) {
// Add new taxonomy in the query
$query = array_merge( $wp_query_args, array(
'tax_query' => array(
array(
'taxonomy' => 'name_of_your_custom_taxonomy_here',
'field' => 'term_id',
'terms' => $atts['adv_filtering_custom_taxonomy']
)
)
));
}
}
Hope that helps!
Hi Catalin,
I appreciate your continued help.
I had to restore a recent backup. Maybe you could have a look at our current layout and contrast it with that in the picture.
I do have Visual Composer installed; it’s just not the latest version. The funny thing was that the settings seemed to be correct (=the same as before theme update), yet for some reason there were additional, unwanted categories like “Latest articles”, “The most popular posts” and “Popular category” (all in Finnish, of course) at the bottom of the front page. They were not there before the update.
I also noticed that my translations were missing.
TagDiv’s instruction video says “Delete the old version of the theme.” At that stage I deleted the “Newspaper 4 child theme”, which was active. Afterwards I have wondered if I should have deleted the Newspaper 4 main theme, not the child theme. Which should one delete?
Note that I have made customizations to a number of php files – for example, td_block_8.php – and added customizations in the CSS Editor. Does this cause problems when updating?
Best,
Vesa
Hello BigN0701,
I suppose that you have used the 2 column layout from the Visual Composer and you have added the Big Grid 4 like this -> http://screencast.com/t/asvmGUZgfyWl Please try the code below and add it in Theme panel->Custom CSS area.
The code is ->
.td-pb-row [class*="td-pb-span"] {
padding-right: 2px;
padding-left: 2px;
}
If you want to target a certain page where to applied this code, you have to add before the code that I provided you above. For example, if your big grid is on the home page, you can target this page with .home before the code like this ->
.home .td-pb-row [class*="td-pb-span"] {
padding-right: 2px;
padding-left: 2px;
}
The result -> http://screencast.com/t/FDsTHauu1ng
If you want to target the other page, you have to use the page id -> http://screencast.com/t/lgssXeIBFNSf
Thank you for the message!
Hello rocket.works,
I have inspected your site again and saw that in your slider you have some incorrect images. So, the general thumb of this element, in your case ->use the Visual Composer element on three column layout <- has the next dimensions -> width=1068px and height=580px as you can see here -> http://screencast.com/t/NAusqn86G Your images ahs these real dimensions -> width=960 px and height=640px -> http://screencast.com/t/18bMXd9t Therefore, your are using inappropriate image with width smaller then the thumb and the height bigger than the thumb and hence the image position, is not centered. The theme only crop the image (center -> top) and does not enlarge this. If your image is too short for the thumb you will have this gap of the space. We suggest using a plugin like ‘thumbnail upscale’ with ‘force regenerate thumbnail’ to fill the thumbs. Also, you can use a bit of CSS but is not the best solution for this ->
.td-module-thumb img {
width:100%!important;
}
The result -> http://screencast.com/t/80nB9f77kG
Hope this helps and let us know how it goes!
Thank you for the message!
Hello JBH,
1) Good to update to latest version but also remember to update the included plugins too! Please update your theme to the latest version using this tutorial: https://forum.tagdiv.com/how-to-update-the-theme-2/
Also, update your plugins: https://forum.tagdiv.com/how-to-update-visual-composer-plugin/. Remove the current version and install the new version which comes with the theme. Clear all cache and try it again and see how it works and check if the error reappears.
2)This kind of problem might be caused by the conflicting plugins. Please try to disable all the active plugins, except Visual Composer and instal only the plugins that come bundled with our theme. Also, if you use CDN files, please purge them and disable this option and check it again and see how it works.
3)If you want to exclude ‘no comments’, it is necessary to use a bit of CSS to hide it. Please try the code below and add it in Theme panel->Custom CSS area.
.td-comments-title-wrap {
display:none;
}
Hope that helps and let us know how it goes!
If you need more assistance in this regard, please provide your website URL and provide more details about your desired changes.
Thank you for the message!
Hello Castle Yen,
1), 2) I have tested on my side and this kind of Visual Composer element, Big Grid Slide, seems to work as expected on mobile devices. Please try to check it on our demo version, here -> http://demo.tagdiv.com/newspaper/big-grid-slide/ Please ensure that issue do not come from any untested plugins wich can cause some js.errors in our theme. Please try to disable all the active plugins, except Visual Composer, clear all cache and instal only the plugins that come bundled with our theme and rule out the conflicting plugins.
3)If you want to change the name of the “Related Articles” field, you can to do it from Theme panel->Translations->Translations, like this -> http://screencast.com/t/UDYXLI88r and the code of this feature you should find in td_block_related_posts.php -> http://screencast.com/t/12jOZHSYSIn
4)If you want to use Multiple Categories filter, you have to add your Category ID and not Category name as I can see in your screenshot. The category ID you can find like this -> http://screencast.com/t/8TrG0KdBfT -> http://screencast.com/t/0FOTgG09
5)This is a known issue with modules that use the wp default thumbnail and your post does not have a featured image. Please use this method to fix it: https://forum.tagdiv.com/topic/search-error-message-thumbnail-is-not-set/
Hope this helps and let us know how it goes!
Thank you for the message!
Hello mzirafos,
Unfortunately, our theme does not have such an option for blog mode but if you want to achieve as you want, it is necessary to alter the code. You should use do_shortcode method and add the code in index.php core file. First of all, you have to create, for example, a block with your desired configuration and then you have to copy/paste the code of this feature from Visual Composer to index.php. Please follow the steps below and try to implement this method into your backend.
Steps -> http://screencast.com/t/EcUZqBidw -> http://screencast.com/t/oZUk6Lue -> http://screencast.com/t/6DH9gcogDwk -> http://screencast.com/t/Zwn0cfQAbrt and from here you have control over your homepage in blog mode -> http://screencast.com/t/QMUb3gnfu
The example of the code is ->
Please try to follow the steps that I gave you above and please notice that after this changes, it is necessary to do some custom style modification for a better look.
If you are not aware the steps in this regard, please consider hiring a freelancer/developer to do this for you because we cannot provide custom work at the moment, sorry!
Thank you for the message!
What’s the better option if I need a block with a different layout? I see you can either use the td-api plugin or a child theme. I’m not totally clear that the child theme approach lets me add a new block or only override an existing block.
Also, is there a guide somewhere in the docs that shows an example of the layout of each block? It’s kind of hit and miss with the tiny icons in the composer, and no way to see how big the thumbs and such are.
Hello,
Your sidebar does not work with the code above as it’s not a default sidebar from the sidebars section of WP. It is created using row settings in visual composer.
Please use this code to do it:
@media (max-width:767px){
.td-pb-span4{
display:none!important
}
}
Thank you!
I Just installed the latest version – 6.6.4 of newspaper theme. The plugin installer has a warning as below:
Warning: Invalid argument supplied for foreach() in /home2/desaren1/public_html/gadgetrace.com/wp-content/themes/Newspaper/includes/wp_booster/wp-admin/panel/td_view_theme_plugins.php on line 80
I am not able to install plugins using this panel. I also cannot fine visual composer plugin in the plugin folder. there is a WPBakery Visual Composer plugin already installed but not activated. Is it the same. Please guide.
Hello,
You can use the author box shortcode from visual composer: and only insert it in the posts you want it to display in text mode: [td_block_authors]
If this is not what you mean, and you want to remove the author name and only show it on certain posts, then the theme has no option for it. You will have to find a plugin that has this functionality I’m afraid.
Thank you!
Hello,
I meant by text mode that you have to access classic mode in order to enable the standard editor and then enter text mode so you can see the page shortcodes: http://screencast.com/t/vH0HvduxRehN
Visual composer can create issues if you are adding a row inside another row. If it’s the standard tab element from visual composer you are having trouble with, please use this shortcode and add it in text mode in a blank page (like the screenshot above):
[vc_row][vc_column][vc_tta_tabs][vc_tta_section title="Tab 1" tab_id="1452692807969-ce686049-8e27"][td_block_15][/vc_tta_section][vc_tta_section title="Tab 2" tab_id="1452692807981-b8b08b23-8dd9"][td_block_5][/vc_tta_section][/vc_tta_tabs][/vc_column][/vc_row]
If this tab also create issues let us know so we can investigate further. If it does not, then please try to recreate your tab and the content within it.
Thank you!
Hi
try to deactivate all plugins except Visual Composer, clear all caches and test again. If you want to remove the WhatsApp button just edit the td_module_single.php and delete this line: http://screencast.com/t/VO09Bwfwldj
Thanks!
Hello,
For custom ads you do not need to edit anything as you get the sortcode from visual composer. The ad box in visual composer allows you to add a title to it so the sortcode will look like so:
[td_block_ad_box spot_id="custom_ad_1" spot_title="Advertisement"]
Thank you!
– Added plugins name code
– activated Speedbooster
– cleared cache
– run Pagespeed Insights and still showing scripts and CSS to move to footer
– tested functions.php
registered scripts
wpdreams-photostack | http://www.cele.si/wp-content/plugins/ajax-search-pro/js/nomin/photostack.js
jquery | http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
wpdreams-ajaxsearchpro | http://www.cele.si/wp-content/plugins/ajax-search-pro/js/min-scoped/jquery.ajaxsearchpro-noui-isotope.min.js
archivesCW | http://www.cele.si/wp-content/plugins/archives-calendar-widget/admin/js/jquery.archivesCW.min.js
td-site-min | http://www.cele.si/wp-content/themes/Newsmag/js/tagdiv_theme.min.js
comment-reply | /wp-includes/js/comment-reply.min.js
registered styles
wpdreams-asp-basic |
wpdreams-ajaxsearchpro-instances |
archives-cal-classiclight |
google-fonts-style | http://fonts.googleapis.com/css?family=Open+Sans:400,700
js_composer_front |
td-theme |
td-theme-child |
as I can see, styles are no longer with links as scripts are .. progress 🙂 but not for Pagespeed
-
This reply was modified 10 years by
gregy1403.
Hello razakey,
I have checked your website and I saw your menu-nav into your sidebar. I suppose that you have set it with Visual Composer with WP Custom Menu element. You can check your configuration into your panel and you should to exclude it from your sidebar. Another alternative would be to hide it with a bit of CSS. Please try the code below and add it in Theme panel->Custom CSS area, like this -> http://screencast.com/t/xynPdzjzd3
.td-ss-main-sidebar .widget_nav_menu {
display:none;
}
The result -> http://screencast.com/t/JLracsj3D4
Hope this helps and let us know how it goes!
Thank you for the message!
Hello,
Please make sure you have every option checked in screen options: http://screencast.com/t/tDGu0cDvG especially page attributes. If the options are all checked please try to disable all plugins except visual composer to rule out a plugin conflict.
Thank you!
Hi
1. Try this css in theme panel > custom code custom css: http://screencast.com/t/LWo79pKINwG
.td-header-sp-logo img{
padding-right: 24px;
margin-right: 45px;
}
2. From what I can see in your screen there is an additional distance added on top of trending now block. I am not sure why that distance appear but can be a margin or a padding set by a plugin. Try to deactivate all plugins except Visual Composer, clear all caches and test again.
Let us know how it goes.
Thanks!