- TutorialsDefault Block Settings Guide
- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- TutorialsFrom WPBakery to tagDiv Composer
- TutorialsOffset Feature
- TutorialsWhat is Ajax preloading?
Hello,
We are currently experiencing a discrepancy between our Staging and Live/Production sites involving the subcategories not showing in our menu on mobile devices. Below are links to both our Live and Stage sites:
Live: https://thefreshtoast.com
Stage: https://stage.thefreshtoast.com
In our Theme Panel, we are using the Mobile Theme and our settings are the same across both sites however you will notice that our Live site doesn’t have expanding arrows for the menu whereas our Stage site does. I reviewed the documentation on how to create MegaMenus with subcategory support but for some reason we don’t have those options available when attempting to create a new menu. The only major difference between the two sites are that our Live site has its own security and firewall system in place. Any information on why this is happening or how to resolve it is greatly appreciated.
Thank you,
Matthew Blockus
Systems Administrator
The Fresh Toast
Hi,
on my site https://www.diarioaxarquia.com there is a recurring problem. On frontpage there are two 12 block with 10 post limit. I try to use the pagination “Load more” option, but my client is complaining of repeated posts.
Here is an example:
Thanks.
Hello, is it possible to show a default featured image for a “custom post type” in the list of posts shown in a block?
I’m using “Block 21” to show posts filtered by post type, and I’d like to show a default image if the post doesn’t have a featured image set.
Thank you.
Removing all the theme structured data can be done only manually, from the code itself. But this will have to be done again after a theme update, when the theme files are replaced.
Currently there is no setting to remove it all at once, but I will add this as a request on our list. An option for enable/disable the theme structured data will be considered.
Regarding the lazy load, the one the theme provides works only on pages at the moment. I tested the live theme demo, seems to say that it passes – http://prntscr.com/ocmmrk
The speed booster will help with render blocking, by moving the resources in the footer. This can be checked in the source of a page from the website. As a note, the booster will not be active if it detects active plugins that are not part of this list
– http://prntscr.com/ocmok4
So for example – http://prntscr.com/ocmp3a
This check could be disabled if needed, like mentioned in this topic
– https://forum.tagdiv.com/topic/tinymce-advanced-and-other-various-disabling-speed-boster/
We have managed to recreate the disqus problem when the comments are closed, on our end. We will try to identify why this happens and what can be done about it. Sorry for this inconvenience.
Hi,
The mobile version is look like that because you have the mobile theme plugin that provide you a better speed then responsive version of theme, but in order to achieve that speed you’ll need to create a new content for pages because in the most of cases those were made with builders ( tagDiv Composer, WPBakery ) and you need to use only the mobile editor ( you need to set the content for pages in mobile editor and this content will be display on mobile theme)
-> https://www.screencast.com/t/ebUIzt4se
Mobile Theme: Automatic Optimization for Mobile with Newspaper Theme -> https://tagdiv.com/mobile-theme-automatic-optimization-for-mobile-newspaper-theme/
Also for the 3 blocks, you’ll need to have set same feature posts (that have set feature category) -> https://forum.tagdiv.com/featured-posts-2/ -> https://www.screencast.com/t/QsJ6ppY4
If you want the responsive version and amp you should use this opinion -> https://www.screencast.com/t/jZct5ueBqOrb but if you have amp activate on pages you’ll need to create in Mobile editor a content for AMP version of page.
Let me know if you have more questions!
Hi,
The mobile version is look like that because you have the mobile theme plugin that provide you a better speed then responsive version of theme, but in order to achieve that speed you’ll need to create a new content for pages because in the most of cases those were made with builders ( tagDiv Composer, WPBakery ) and you need to use only the mobile editor ( you need to set the content for pages in mobile editor and this content will be display on mobile theme)
-> https://www.screencast.com/t/ebUIzt4se
Mobile Theme: Automatic Optimization for Mobile with Newspaper Theme -> https://tagdiv.com/mobile-theme-automatic-optimization-for-mobile-newspaper-theme/
Also for the 3 blocks, you’ll need to have set same feature posts (that have set feature category) -> https://forum.tagdiv.com/featured-posts-2/ -> https://www.screencast.com/t/QsJ6ppY4
If you want the responsive version and amp you should use this opinion -> https://www.screencast.com/t/jZct5ueBqOrb but if you have amp activate on pages you’ll need to create in Mobile editor a content for AMP version of page.
Let me know if you have more questions!
Hi garyjones,
The new plugin differ just a little from the old one, but what you what achieve? maybe this can be achieve using the flex blocks that have more option for customize.
Why You Should Try the New Flexible Big Grids with Newspaper Theme
tagDiv Composer: Big Grid Flex elements
Thank you!
Hello !
.td-grid-style-7 .td-big-grid-post-0 .td-module-thumb a:last-child:before{
background: linear-gradient(20deg, red 5%, yellow 90%)
}
.td-grid-style-7 .td-big-grid-post-1 .td-module-thumb a:last-child:before{
background: linear-gradient(20deg, red 5%, yellow 90%)
}
.td-grid-style-7 .td-big-grid-post-2 .td-module-thumb a:last-child:before{
background: linear-gradient(20deg, red 5%, yellow 90%)
}
.td-grid-style-7.td_block_big_grid_3 .td-big-grid-post-2 .td-module-thumb a:last-child:before, .td-grid-style-7.td_block_big_grid_4 .td-big-grid-post-2 .td-module-thumb a:last-child:before, .td-grid-style-7.td_block_big_grid_5 .td-big-grid-post-2 .td-module-thumb a:last-child:before, .td-grid-style-7.td_block_big_grid_10 .td-big-grid-post-2 .td-module-thumb a:last-child:before, .td-grid-style-7.td_block_big_grid_12 .td-big-grid-post-2 .td-module-thumb a:last-child:before, .td-grid-style-7 .td-big-grid-post-3 .td-module-thumb a:last-child:before, .td-grid-style-7 .td-big-grid-post-7 .td-module-thumb a:last-child:before{
background: linear-gradient(20deg, red 5%, yellow 90%)
}
You can change the colors, the amonunt ( % ) and the degrees to whatever you want.
This codes have to be pasted in here: https://www.screencast.com/t/i014kgdjhXI
I hope this helps !
Thank you !
Hi,
Unfortunately our theme do not have an option for this, also the WordPress sticky post do not work with our theme, sorry!
You can achieve something similar by setting the id of posts in block, in this way this will be always show.
-> https://forum.tagdiv.com/block-settings-guide/
-> https://www.screencast.com/t/SY6XAchFF
Unique articles -> https://forum.tagdiv.com/unique-articles/
Thank you!
Hello !
If you are using a single post template from the cloud library you can add a new block of what kind you like instead of the old one and set the filters so it can contain only related articles from a tag or category ( option 1 ) : https://www.screencast.com/t/Oj8wE0fhm7
Or you can add a related articles element wich will fit the template you’ve selected and no need to edit it ( Option 2 )
I hope this was helpfull !
Thank you !
Hi Simon
Thanks for getting back. I’m now confused as to hoe I use Block 9/module 8 in this new scenario.
Do I simply create a td_block_textlist.php file by copying and renaming the existing .php file for block 9 and then drop the shortcode in under the API call? (both are above)
All help appreciated
Thanks.
Best
Gary
Hi,
If you want to have ea different layout on mobile version, you can use the mobile theme plugin, but this will not achieve what you need.
What you can do is to use flex blocks on responsive version of the theme -> https://www.screencast.com/t/OzVL0rhkNg -> https://www.screencast.com/t/2kQdy6NBZNY
Thank you!
Hi,
So you mean the featured image thumbnail does not appear in modules/blocks/grids? if there is a featured image set, the theme will display thumbnails created from it
– https://forum.tagdiv.com/featured-image-or-video/
Please provide a link to the website so I can take a look. Or in case I misunderstand the problem you are having, post some more details about it. Let me know.
Thanks
Hi,
I do not know if this is possible, but if it is, then is possible only with custom work, you’ll need to make some function to get the pagination content from the archive page and set it in flex block element, also those change will be lost after you’ll make a theme update.
Thank you for your understanding!
Hi, i was able to fix the issue. I have another question.
How do I select a different block/module style for the “related article section” down at the bottom of the post?
Thanks
Hi,
In the display view for the categories, there are two empty blocks after the 10th article. It looks like indicated below.
Article | Article | Article
Article | Article | Article
Article | Article | Article
Article | |
Article | Article | Article
Article | Article | Article
Article | Article | Article
Article | |
Where can I set the number to 12 so it fills the rows properly? Or is there another way to fix it?
Lana
Hi,
If you are using a Flex Block you can change the “Load more” button color from Style -> https://www.screencast.com/t/u7I0gPSJ4hP
Or using custom css for the predefined blocks -> https://www.screencast.com/t/bsgHwxLpV
.td-load-more-wrap a{
background-color: red;
color: white;
}
The code need to be set in the Theme Panel>Custom code> Custom css
Thank you!
Hi,
The lightbox effect is only for the image inside the post, on the blocks grid can be apply the lazyload -> https://www.screencast.com/t/dkM5q7xYY
If this is not what you mean, please provide some more details.
Thank you!
When I click on the Text with Title and try to add content the edit window cycles non stop and I cannot use.
Hi,
I have Newspaper 9.7.2 installed and have tried to follow this, https://forum.tagdiv.com/practical-example-how-to-add-a-new-block-and-module/ to create a new version of block 9 in which I have custom code (for the purposes of the learning exercise i have called it block and module 77 as per the exercise).
The php for the shortcode is,
<?php
class td_block_77 extends td_block {
static function cssMedia( $res_ctx ) {
// fonts
$res_ctx->load_font_settings( ‘f_header’ );
$res_ctx->load_font_settings( ‘f_ajax’ );
$res_ctx->load_font_settings( ‘f_more’ );
// module 77 fonts
$res_ctx->load_font_settings( ‘m77f_title’ );
$res_ctx->load_font_settings( ‘m77f_cat’ );
$res_ctx->load_font_settings( ‘m77f_meta’ );
}
public function get_custom_css() {
// $unique_block_class – the unique class that is on the block. use this to target the specific instance via css
$unique_block_class = $this->block_uid . ‘_rand’;
$compiled_css = ”;
$raw_css =
“<style>
/* @f_header */
.$unique_block_class .td-block-title a,
.$unique_block_class .td-block-title span {
@f_header
}
/* @f_ajax */
.$unique_block_class .td-subcat-list a,
.$unique_block_class .td-subcat-dropdown span,
.$unique_block_class .td-subcat-dropdown a {
@f_ajax
}
/* @f_more */
.$unique_block_class .td-load-more-wrap a {
@f_more
}
/* @m77f_title */
.$unique_block_class .td_module_77 .entry-title {
@m77f_title
}
/* @m77f_cat */
.$unique_block_class .td_module_77 .td-post-category {
@m77f_cat
}
/* @m77f_meta */
.$unique_block_class .td_module_77 .td-module-meta-info,
.$unique_block_class .td_module_7 7.td-module-comments a {
@m77f_meta
}
</style>”;
$td_css_res_compiler = new td_css_res_compiler( $raw_css );
$td_css_res_compiler->load_settings( __CLASS__ . ‘::cssMedia’, $this->get_all_atts() );
$compiled_css .= $td_css_res_compiler->compile_css();
return $compiled_css;
}
function render($atts, $content = null) {
parent::render($atts); // sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
if (empty($td_column_number)) {
$td_column_number = td_global::vc_get_column_number(); // get the column width of the block from the page builder API
}
$buffy = ”; //output buffer
$buffy .= ‘<div class=”‘ . $this->get_block_classes() . ‘ td-column-‘ . $td_column_number . ‘ td_block_padding td_block_bot_line” ‘ . $this->get_block_html_atts() . ‘>’;
//get the block js
$buffy .= $this->get_block_css();
//get the js for this block
$buffy .= $this->get_block_js();
// block title wrap
$buffy .= ‘<div class=”td-block-title-wrap”>’;
$buffy .= $this->get_block_title(); //get the block title
$buffy .= $this->get_pull_down_filter(); //get the sub category filter for this block
$buffy .= ‘</div>’;
$buffy .= ‘<div id=’ . $this->block_uid . ‘ class=”td_block_inner”>’;
$buffy .= $this->inner($this->td_query->posts); //inner content of the block
$buffy .= ‘</div>’;
//get the ajax pagination for this block
$buffy .= $this->get_block_pagination();
$buffy .= ‘</div> <!– ./block –>’;
return $buffy;
}
function inner($posts, $td_column_number = ”) {
$buffy = ”;
$td_block_layout = new td_block_layout();
if (empty($td_column_number)) {
$td_column_number = td_global::vc_get_column_number(); // get the column width of the block from the page builder API
}
$td_post_count = 0; // the number of posts rendered
$td_current_column = 1; //the current column
if (!empty($posts)) {
foreach ($posts as $post) {
$td_module_77 = new td_module_77($post, $this->get_all_atts());
switch ($td_column_number) {
case ‘1’: //one column layout
$buffy .= $td_block_layout->open12(); //added in 010 theme – span 12 doesn’t use rows
$buffy .= $td_module_77->render($post);
$buffy .= $td_block_layout->close12();
break;
case ‘2’: //two column layout
$buffy .= $td_block_layout->open_row();
$buffy .= $td_block_layout->open6(); //added in 010 theme – span 12 doesn’t use rows
$buffy .= $td_module_77->render($post);
$buffy .= $td_block_layout->close6();
if ($td_current_column == 2) {
$buffy .= $td_block_layout->close_row();
}
break;
case ‘3’: //three column layout
$buffy .= $td_block_layout->open_row();
$buffy .= $td_block_layout->open4();
$buffy .= $td_module_777->render($post);
$buffy .= $td_block_layout->close4();
if ($td_current_column == 3) {
$buffy .= $td_block_layout->close_row();
}
break;
}
//current column
if ($td_current_column == $td_column_number) {
$td_current_column = 1;
} else {
$td_current_column++;
}
$td_post_count++;
}
}
$buffy .= $td_block_layout->close_all_tags();
return $buffy;
}
}
And the php for the module is,
<?php
class td_module_77 extends td_module {
function __construct($post, $module_atts = array()) {
//run the parrent constructor
parent::__construct($post, $module_atts);
}
function render() {
ob_start();
$title_length = $this->get_shortcode_att(‘m77_tl’);
$modified_date = $this->get_shortcode_att(‘show_modified_date’);
///print_r($this->post->ID);
$choosen_post_functionality = get_field( “choose_post_functionality”, $this->post->ID );
// For Element One
$title_lo = get_field( “title_lo”, $this->post->ID );
$title_link_lo = get_field( “title_link_lo”, $this->post->ID );
$media_name_lo = get_field( “media_name_lo”, $this->post->ID );
$media_link_lo = get_field( “media_link_lo”, $this->post->ID );
$publish_date_lo = get_field( “publish_date_lo”, $this->post->ID );
//$abstract_excerpt_lo = get_field( “abstract_excerpt_lo”, $this->post->ID );
$abstract_excerpt = get_post_field(‘post_content’, $this->post->ID);
// For Element Two
$title_lt = get_field( “title_lt”, $this->post->ID );
$title_link_lt = get_field( “title_link_lt”, $this->post->ID );
$author_name_lt = get_field( “author_name_lt”, $this->post->ID );
$media_name_lt = get_field( “media_name_lt”, $this->post->ID );
$publish_date_lt = get_field( “publish_date_lt”, $this->post->ID );
$citations_title_lt = get_field( “citations_title_lt”, $this->post->ID );
$citations_link_lt = get_field( “citations_link_lt”, $this->post->ID );
//$abstract_excerpt_lt = get_field( “abstract_excerpt_lt”, $this->post->ID );
?>
<div class=”<?php echo $this->get_module_classes();?>”>
<?php if($choosen_post_functionality == “ext_lo_one”) { ?>
<div class=”item-details”>
<?php //echo $this->get_title($title_length);?>
<h3 class=”entry-title td-module-title”>” rel=”bookmark” title=”<?php echo get_the_title( $this->post->ID );//$title_lo; ?>”><?php echo get_the_title( $this->post->ID ); //$title_lo; ?></h3>
<div class=”td-module-meta-info”>
<?php //if (td_util::get_option(‘tds_category_module_77’) == ‘yes’) { echo $this->get_category(); }?>
<?php //echo $this->get_author();?>
<div class=”media_date” style=”margin-top:5px;”>
<span class=”td-post-author-name”>“><?php echo $media_name_lo; ?> <span>-</span> </span>
<?php //echo $this->get_date($modified_date);?>
<span class=”td-post-date”><time class=”entry-date updated td-module-date”><?php echo $publish_date_lo; ?></time></span>
</div>
<div class=”td-post-content” style=” margin-top: 5px; padding: 0; “><?php echo $abstract_excerpt; //$abstract_excerpt_lo; ?> </div>
<?php //echo $this->get_comments();?>
</div>
</div>
<?php } elseif($choosen_post_functionality == “ext_lo_two”) { ?>
<div class=”item-details”>
<?php //echo $this->get_title($title_length);?>
<h3 class=”entry-title td-module-title”>” rel=”bookmark” title=”<?php echo get_the_title( $this->post->ID ); ?>”><?php echo get_the_title( $this->post->ID ); ?></h3>
<div class=”td-module-meta-info”>
<?php //if (td_util::get_option(‘tds_category_module_77’) == ‘yes’) { echo $this->get_category(); }?>
<?php //echo $this->get_author();?>
<div style=”margin-top: 5px;”>
<span class=”td-post-author-name”><?php echo $author_name_lt; ?> </span>
</div>
<div class=”media_date” style=”margin-top:5px;”>
<span class=”td-post-author-name”><?php echo $media_name_lt; ?> </span>
<?php //echo $this->get_date($modified_date);?>
<span class=”td-post-date”><time class=”entry-date updated td-module-date”><?php echo $publish_date_lt; ?></time></span>
</div>
<span style=” display: block; margin-top:5px;” class=”td-post-author-name”>“><?php echo $citations_title_lt; ?> </span>
<div class=”td-post-content” style=” margin-top:5px; padding: 0;”><?php echo $abstract_excerpt; ?> </div>
<?php //echo $this->get_comments();?>
</div>
</div>
<?php }else { ?>
<div class=”item-details”>
<?php echo $this->get_title($title_length);?>
<div class=”td-module-meta-info”>
<?php if (td_util::get_option(‘tds_category_module_77’) == ‘yes’) { echo $this->get_category(); }?>
<?php echo $this->get_author();?>
<?php echo $this->get_date($modified_date);?>
<?php echo $this->get_comments();?>
</div>
</div>
<?php } ?>
<?php echo $this->get_quotes_on_blocks();?>
</div>
<?php return ob_get_clean();
}
}
I have set up the folders as per the tutorial but am not sure where to pull the two CSS files needed that set out the style for Block 9.
NOTE: I also wish to create custom block versions for the Flex Blocks.
Please can you advise as to where these are located and if any additional considerations need to be made in view of the Envato-required changes.
Finally, another question. Given the change to follow Envato rules when I come to update to a new release version will this overwrite any custom blocks?
Thanks.
Best
Gary
Hi Cain – See my previous message. I also saved the screenshot at:
The filter menu on the top of the block shows all the categories and sub-categories. I want this menu to show only those sub-categories whose parent is “Hadith”.
Hi Calin –
I understand that the block will only show posts from the parent category that I set (in my example every post that has a parent category of A). However, I am referring to the filter menu which appears on the top right of the block. This menu is a list of links on the top right of the block that the user can click to further filter the posts. I want this list of links to be only the subcategories of A – only p, q and r. Right now it shows every category and subcategory.
Let me know if it is not clear and I can send a screen shot to explain.
Thanks
Hi,
I would like to know how I can possibly expand the article preview on Block 2. As you can see in the picture that I uploaded, the first 2 articles show a preview, while the others do not. Is there any way that I can have a preview show for all the articles.
Thank you.
Hello !
Unfortunately you will have to do the next steps in order to achieve that option
Go to pages and edit the homepage as seen here: https://www.screencast.com/t/RBGbRLLf0 ; Select Page builder + Page Title and save the settings.
Edit the homepage using the tagDiv Composer and add a Block 16 above the Spotlight Block. Add a title to it and then go to filters: https://www.screencast.com/t/S1gfmvIqPK3v
And in the filters tab you can set what posts you want to be shown in that block: https://www.screencast.com/t/472zMCPs
I hope this was helpfull !
Thank you !
Hi,
I would like to know how I can possibly integrate this block as it is shown on the demo template on my website. Can anyone tell me which block it is and how I can add it to my site?
Thank you.
Block for Template