- NewspaperFlex Block Builder and Flex Loop Builder
- NewspaperHow to use the Flex Blocks cache option
- NewspaperHow to edit modules for Flex Block X
- NewspaperHow to insert a block inside the content of a post
- NewspaperFlex Block Settings Guide
- NewspaperMeta Info on Modules and Blocks
- NewspaperTheme modules and blocks
- NewspaperThumbnails – Fix strange looking images on blocks
- NewspaperBlock settings tutorial
- NewspaperCategory Tag on Modules/blocks
- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- NewspaperSearch setup for custom post type
- NewspapertagDiv Opt-In Builder – Emails
- NewspaperBookmark – Save For Later
- NewspaperModules Builder in Newspaper Theme
- NewspaperFilters and sorting for taxonomies
- NewspaperUser review system
- NewspaperWooCommerce: Happy “Add to Favorites!”
- NewspaperLockers
- NewspaperLeads
That’s a good sign, it means it’s doing something. 😉
I just skimmed the code and the mistake is mine. I forgot a close quote on the new tab strings. Here it is fixed:
// Set up your row, column, and tabs element
$to_echo = '[vc_row][vc_column width="1/1"][vc_tabs]';
// Simplest possible example of getting ACF data, sub in yours
$data_1 = get_field('2g_network');
$data_2 = get_field('3g_network');
// Repeat these lines for each tab, making sure each tab has a unique id
$to_echo .= '[vc_tab title="The first tab" tab_id="tab_1"]';
$to_echo .= $data_1;
$to_echo .= '[/vc_tab]';
$to_echo .= '[vc_tab title="The second tab" tab_id="tab_2"]';
$to_echo .= $data_2;
$to_echo .= '[/vc_tab]';
// (You could wrap each block in an if to skip a tab if the data is empty)
// When you have all your tabs, close the elements
$to_echo .= '[/vc_tabs][/vc_column][/vc_row]';
// We have to filter the whole string to make WP interpret the shortcodes
$to_echo = wpb_js_remove_wpautop($to_echo);
// Do whatever
echo $to_echo;
Hi TheMediumUTM,
I am using the childtheme. Would it be there any different if I was using the mothertheme?
I don’t know what CDN is and I just installed cache plugin. Could you pleas guide me how to refresh the prowser using cache plugin?
Regards
Ecofame
I am unable to adjust the excerpt length of the blocks. When I change to letters everything on the homepage get restricted to 50 words.
Also can you tell me about Schema support. Which type of content have schema support right now. Thanks in advance.
The problem with this is that sometimes I will get pictures, if only there was a way to detect that there is a picture available or not and then apply the CSS accordingly…
Yes we need a module to address this issue.
ok thanks a ton but this is not work i uncomment the code but it will not work 🙁 and also can you guide me how i edit the code so i can add the twitter button to there?
-
This reply was modified 11 years by
Mosamlife.
Hi,
You can add the author from here: http://screencast.com/t/QQp6G4Bo
It will look like this: http://screencast.com/t/6fmyhAHqVbD
You will need to customize it to look like the one in the scrrenshot.
If you want this time format: http://screencast.com/t/d4EsggNO0B you can add it like this: http://screencast.com/t/GxxudwmH
You can find here the code: http://pastebin.com/QzmxPcQ3
Thanks
Same problem with the menu behind the slider shortcode. – but the css doesn’t seem to fix it..
Hi,
1. Set your page like this to have 3 columns layout for module 4 (block 5 it’s made using module 4): http://screencast.com/t/mG9wWUmSOS
2. Yes, just edit the block you want to customize and set the “Show child categories menu:” to -hide- like this: http://screencast.com/t/kki7Myz1Dj0
3. You have to edit the module file for which module you want to remove the date and remove the get_date function or comment it, like this:
* ex for module 1: http://screencast.com/t/esowK96r0
Do the same for each module.
Thanks
I tried to implement as per your instructions. Please check this screenshot it was with the_field.
I don’t know where i am making a mistake. I again changed the code to get_field and it still remains the same. Here you can see it.
Here is the full code of loop-single-1.php in which i am inserting.
<?php
/**
* The single post loop for post template 1
**/
if (have_posts()) {
the_post();
$td_mod_single = new td_module_1($post);
//show the breadcrumb
if (get_post_type($post) == 'post') {
echo td_page_generator::get_single_breadcrumbs($td_mod_single->title);
} else {
echo td_page_generator::get_page_breadcrumbs($td_mod_single->title);
}
?>
<article id="post-<?php echo $td_mod_single->post->ID;?>" class="<?php echo join(' ', get_post_class());?>" <?php echo $td_mod_single->get_item_scope();?>>
<header>
<?php echo $td_mod_single->get_title();?>
<div class="meta-info">
<?php echo $td_mod_single->get_category();?>
<?php //echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_commentsAndViews();?>
</div>
</header>
<?php if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) { ?>
<p class="td-sub-title"><?php echo $td_mod_single->td_post_theme_settings['td_subtitle'];?></p>
<?php } ?>
<?php
// override the default featured image by the templates (single.php and home.php/index.php - blog loop)
if (!empty(td_global::$load_featured_img_from_template)) {
echo $td_mod_single->get_image(td_global::$load_featured_img_from_template);
} else {
echo $td_mod_single->get_image('art-big-1col');
}
?>
<div class="td-post-text-content">
<?php echo $td_mod_single->get_content();?>
// Set up your row, column, and tabs element
$to_echo = '[vc_row][vc_column width="1/1"][vc_tabs]';
// Simplest possible example of getting ACF data, sub in yours
$data_1 = get_field('2g_network');
$data_2 = get_field('3g_network');
// Repeat these lines for each tab, making sure each tab has a unique id
$to_echo .= '[vc_tab title="The first tab" tab_id="tab_1"];
$to_echo .= $data_1;
$to_echo .= '[/vc_tab]';
$to_echo .= '[vc_tab title="The second tab" tab_id="tab_2"];
$to_echo .= $data_2;
$to_echo .= '[/vc_tab]';
// (You could wrap each block in an if to skip a tab if the data is empty)
// When you have all your tabs, close the elements
$to_echo .= '[/vc_tabs][/vc_column][/vc_row]';
// We have to filter the whole string to make WP interpret the shortcodes
$to_echo = wpb_js_remove_wpautop($to_echo);
// Do whatever
echo $to_echo;
</div>
<div class="clearfix"></div>
<footer>
<?php echo $td_mod_single->get_post_pagination();?>
<?php echo $td_mod_single->get_review();?>
<?php echo $td_mod_single->get_source_and_via();?>
<?php echo $td_mod_single->get_social_sharing();?>
<?php echo $td_mod_single->get_social_like_tweet();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo $td_mod_single->get_item_scope_meta();?>
</footer>
</article> <!-- /.post -->
<?php echo $td_mod_single->related_posts();?>
<?php
} else {
//no posts
echo td_page_generator::no_posts();
}?>
I think the code is not executing. Am i placing it in the wrong way?
Hi,
1. Use this custom css in theme panel > custom css:
.iosSlider.td_block_big_grid .td-icon-left, .iosSlider.td_block_big_grid .td-icon-right {
color: rgb(255, 0, 31);
}
Should work like this: http://screencast.com/t/b2n1dpDVPGRH
2. Try to deactivate all plugins and check if it starts working, also have you had any modifications for the use of this plugin before version 4 update? If so you will have to re-make also those modification, from what I know that plugin dose not work well without any modifications.
3. I’m not sure how this can be fixed, you can try to check the support page for the plugin that you are using and explain there this situation or you can try to use the tag div modal view and notice how it works.
Hope this helps!
Thanks
Hello Tagdiv team,
How to Enable block author info and twitter button in post page?? see the image below 🙂
It looks like you’ve done it almost exactly right. But I have these notes:
1. I made a mistake when I said to use the_field — change all instances to get_field in the code.
2. If you can’t activate a child theme, your code modifications won’t survive a theme update anyway and you’ll have to redo it each time you update. 🙁 Still, it should work. And it’s fine if you use that block of code instead of the functions.php way I quoted.
3. Once you have that code in your template files, you don’t need to do anything from the post editing page besides enter those custom fields.
4. If you’re not seeing anything show up when you view the post, you might be putting your code in the wrong single post template file. There are seven of those in this theme: loop-single.php, loop-single-1.php, single_template_2.php, single_template_3.php, single_template_4.php, and single_template_5.php. You could put the above code in whichever template file you’ve picked in Theme Panel -> Post Settings, or you could put it in every template file.
5. Just to make sure, where are you putting the code in the template file? (Which lines come right before and after it?)
I didn’t use a block I just used text with a title on a new page. Then it shows a double page title… The word press page title and the text with title

Hi Ecofame. I’m looking at your site and the CSS I gave you is in effect! The whitespace I was hoping to remove is gone — the space between each row in the blocks. (You may need to clear your cache, or if you’re using a CDN purge that cache, or hard refresh your browser cache… there are many potential reasons you might be seeing an old version of your page!) If there’s a different whitespace you want to remove, please point it out in a screenshot.
@Ecofame i think these codes only work on “homepage blank” from the templete settings because mine work fine with out any issues,but i just think it’s only for the homepage with blank and that’s what i’m using,i build my homepage my self not from the theme demo…oh well wait till tomorrow and see what fix the staff can give you because they know more about the theme then us,we are just gussing here…
check my site @ http://jahliveradio.com/ and see for ur self what i’m talking about…
Hi,
Thanks again.
I pasted the code and nothing happened. I installed cache plugin and still nothing is happening.
Regards
Thanks for reply, I previously activated child theme but synthesis allows me to activate one theme at a movement and therefore whenever i activate it, it throws an error in the dashboard.
I first created a number of fields like here under one group as you can see here.
Then i am inserted the code you provided in loop-single.php
// Set up your row, column, and tabs element
$to_echo = '[vc_row][vc_column width="1/1"][vc_tabs]';
// Simplest possible example of getting ACF data, sub in yours
$data_1 = the_field('2g_network');
$data_2 = the_field('3g_network');
// Repeat these lines for each tab, making sure each tab has a unique id
$to_echo .= '[vc_tab title="The first tab" tab_id="tab_1"];
$to_echo .= $data_1;
$to_echo .= '[/vc_tab]';
$to_echo .= '[vc_tab title="The second tab" tab_id="tab_2"];
$to_echo .= $data_2;
$to_echo .= '[/vc_tab]';
// (You could wrap each block in an if to skip a tab if the data is empty)
// When you have all your tabs, close the elements
$to_echo .= '[/vc_tabs][/vc_column][/vc_row]';
// We have to filter the whole string to make WP interpret the shortcodes
$to_echo = wpb_js_remove_wpautop($to_echo);
// Do whatever
echo $to_echo;
But now i don’t know what to do here on this screenshot.
I entered the custom fields on the post page but it’s not showing up.
And yes, i have FTP access of my site. Infact, i don’t have access to edit themes within dashboard due to my hosting strict security policy. That’s why, i was not able to take screenshot of code itself on the edit page of single loop.
Thanks again for support.
Welcome!
Go to Theme Panel -> Custom CSS and paste it in there.
If it doesn’t work, add an !important tag like this:
.td_mod_wrap .meta-info {
display: none !important;
}
Make sure to refresh your cache if you’re using a cache plugin. Let me know if that works!
As for site design, to each his own 🙂 I guess the more options the better.
and when i add elements, the elements do not load. I mean i can not enter settings of the blocks…. damn… this update has too many problems!
thanks 🙂
Hi heMediumUTM,
Thank you for your support.
Yes, you have write. They are puplishing a lot of content on the site. Newspaper is pretty theme. But what I like or thinking its intresting is the design that the site has. And I hope the newspaper team will develope a demo page that is similar with that site.
I found another site that is similar with newspapers theme. You can visit it here:
http://se.msn.com/
I pasted the code but nothing is happining.
Maybe I am pasting the code in a wrong place. Could you pleas let me knw where is the right place to paste?
Have a nice day!
Ecofame
Check out “Post type” further down in the block settings 🙂
Use “page” even though the label suggests that you use “pages”.
Difficulty: Pages don’t have categories or tags and are hard to filter. Maybe you could assign the pages you want to show to a single author and the ones you don’t want to show to a different author, or change the pages’ publish dates to the most recent.
Ahhh! If whitespace is one extreme, aftonbladet.se is very much the opposite. :p
Ecofame: I’m not sure how you’re currently hiding your meta info, but it’s still taking up some space and that’s the reason your rows are taller than you want. Use this instead:
.td_mod_wrap .meta-info {
display: none;
}