- Apitd_api_single_template::update_key
- Apitd_api_single_template::update
- Apitd_api_single_template::add
- ApiAPI – Single Template – Introduction
- ApiPractical example – How to add a new Block and Module
- ApiAPI – Category top section style – Introduction
- Apitd_api_module::update
- Apitd_api_module::add
- ApiAPI – Modules – Introduction
- Apitd_api_block::update
- Apitd_api_block::add
- ApiAPI – Blocks – Introduction
- ApiUsing the Theme API in plugins
Hello
I made a page like “index”
I want to use this page for one of my category’s template
But,in Theme panel I couldn’t find a choose.There are only two options of “TDB TEMPLATE”
The one is inherit from global settings,another is Theme templates
So,How can i make the page to be the template of category?
Thanks
Hi,
In this page you display the latest articles since you use the default blog page it seems
– http://vards.net/
There is no control over the posts displayed there.
If you were to create a page with and choose the latest articles template
– https://www.screencast.com/t/TdIZ3g6uE
Then set that page as homepage
– https://forum.tagdiv.com/homepage-how-to-build-and-set-it/
The result will be the same visually. But the difference is that you have control of what is displayed in the page.
The filter settings for the latest articles section are here for example
– https://www.screencast.com/t/Jo8bfFfjjdcN
Or here – https://www.screencast.com/t/QQoQiMvp
The latest articles section by default will show posts from all your categories. However it has the same filtering ans sorting as a block
– https://www.screencast.com/t/CdTQzkeqXjbP
If you don’t want posts from the “Coin Study” category in the latest articles enter the category ID with “-” before it
– https://www.screencast.com/t/WG9ZlrVDit
Thanks
Hi,
What do you mean nothing happens, you change the page template and it is not applying? It would be unusual.
That is how the page template can be changed, it can be done in the composer directly or in the backend of the page
– https://www.screencast.com/t/clA8B3icrKp
Once you save or update the page the template you choose should apply. Try clearing the cache and also force refresh the page (Ctrl+Shift+R). Let me know if there is still a problem.
Thanks
Hello,
I am trying to remove the Latest Articles from Home page this is no possible.
I have follow your manual but nothing happens when i use other option from Page Attributes -> Template nothing happens.
Let me know the option to remove it.
Thanks
Hi,
I tried with “bottom” – https://www.screencast.com/t/jmdLDdz1CVYD
For some reason that returns the homepage. Pages are included in the search results. The excerpts for pages cannot be controlled, they will be picked automatically from the page content. Some unusual results can be displayed in the excerpt field.
A solution would be to display the search results in a module that does not show excerpts
– https://www.screencast.com/t/1ZwidjL7sxhl
Or create your own search template with the cloud plugin
– https://forum.tagdiv.com/tagdiv-cloud-library-plugin/
The way the WordPress search works it is quite common to return relevant result. This is a much discussed topic online. Many users install dedicated plugins when it comes to a better search functionality, or simply remove it entirely.
Thanks
Hi,
1. I have inspected the website, for me the latest articles appear on desktop and mobile
– https://www.screencast.com/t/jGtdQgaR
2. That will be the case, you are using the mobile theme plugin. You can read more about the plugin and how it works here
– https://forum.tagdiv.com/the-mobile-theme/
The plugin is optional, so if you want the same page content that appears on desktop, to appear on mobile, deactivate the plugin.
3. The About us is part of the predefined footer content, in the footer template you are using. It will display text entered here
– https://www.screencast.com/t/bAW2bRkvXh
You can select other footer templates that do not display this section
– https://forum.tagdiv.com/footer-templates/
There are templates with predefined content, this cannot be removed, but there are also empty templates, there you can enter any widgets you want.
Thanks
It doesn’t seem to work for me.
I am trying to load custom ad 2 starting from the second page. Here is the code I am tried using…
if ($current_page > 1) {
$buffy .= td_global_blocks::get_instance(‘td_block_ad_box’)->render(array(‘spot_id’ => ‘custom_ad_2’));
}
Here is my smart list 6 page code…
<?php
class td_smart_list_6 extends td_smart_list {
protected $use_pagination = true; // set this to true to use rela pagination on this template
protected function render_before_list_wrap() {
if(td_global::$cur_single_template_sidebar_pos == ‘no_sidebar’) {
$td_class_nr_of_columns = ‘ td-3-columns ‘;
} else {
$td_class_nr_of_columns = ‘ td-2-columns ‘;
}
$buffy = ”;
//wrapper with id for smart list wrapper type 2
$buffy .= ‘<div class=”td_smart_list_6’ . $td_class_nr_of_columns . ‘”>’;
return $buffy;
}
protected function render_list_item($item_array, $current_item_id, $current_item_number, $total_items_number) {
//print_r($item_array);
$buffy = ”;
//creating each slide
$buffy .= ‘<div class=”td-item”>’;
$buffy .= ‘<div class=”td-number-and-title”><h2><span class=”td-sml-current-item-nr”>’ . $current_item_number. ‘</span><span class=”td-sml-current-item-title”>’ . $item_array[‘title’] . ‘</span></h2></div>’;
$buffy .= ‘<div style=”text-align: center; font-size: 10px; margin-bottom: 5px;”><span style=”color: #666666;”>ADVERTISEMENT</span> </div> <div style=”border-top: 1px solid #e9e9e9;text-align: center; margin-bottom: 12px;”></div><!– Ezoic – TS-SL-728×90 – under_page_title –>
<div id=”ezoic-pub-ad-placeholder-105″>’;
$buffy .= ‘<div class=”adsense”>’;
$buffy .= td_global_blocks::get_instance(‘td_block_ad_box’)->render(array(‘spot_id’ => ‘custom_ad_4’));
$buffy .= “</div></div>”;
//$buffy .= ‘<div style=”border-top: 1px solid #4DB2EC;text-align: center;color: #56565A; margin-bottom: 8px;”></div></div>’;
//get image info
$first_img_all_info = td_util::attachment_get_full_info($item_array[‘first_img_id’]);
//get image link target
$first_img_link_target = $item_array[‘first_img_link_target’];
//image caption
$first_img_caption = $item_array[‘first_img_caption’];
//image type and width – used to retrieve retina image
$image_type = ‘td_696x0’;
$image_width = ‘696’;
if(td_global::$cur_single_template_sidebar_pos == ‘no_sidebar’) {
$first_img_info = wp_get_attachment_image_src($item_array[‘first_img_id’], ‘td_1068x0’);
//change image type and width – used to retrieve retina image
$image_type = ‘td_1068x0’;
$image_width = ‘1068’;
} else {
$first_img_info = wp_get_attachment_image_src($item_array[‘first_img_id’], ‘td_696x0’);
}
if (!empty($first_img_info[0])) {
//retina image
$srcset_sizes = td_util::get_srcset_sizes($item_array[‘first_img_id’], $image_type, $image_width, $first_img_info[0]);
// class used by magnific popup
$smart_list_lightbox = ” td-lightbox-enabled”;
// if a custom link is set use it
if (!empty($item_array[‘first_img_link’]) && $first_img_all_info[‘src’] != $item_array[‘first_img_link’]) {
$first_img_all_info[‘src’] = $item_array[‘first_img_link’];
// remove the magnific popup class for custom links
$smart_list_lightbox = “”;
}
$buffy .= ‘
<figure class=”td-slide-smart-list-figure td-slide-smart-list-6’ . $smart_list_lightbox . ‘”>
</figure>
<figcaption class=”td-sml-caption”><div>’ . $first_img_caption . ‘</div></figcaption>
‘;
}
$tds_smart_list_6_title = td_util::get_option(‘tds_smart_list_6_title’);
// ad smart list 6
//$buffy .= ‘<div style=”text-align: center; font-size: 12px; margin-bottom: 6px;”><span style=”color: #666666;”>ADVERTISEMENT</span> </div> <div style=”border-top: 1px solid #4DB2EC;text-align: center;color: #56565A; margin-bottom: 12px;”></div> <!– Ezoic – TS-SL-728×90-2 – under_first_paragraph –>’;
$buffy .= ‘<div class=”adsense”><div id=”ezoic-pub-ad-placeholder-106″>’;
$buffy .= td_global_blocks::get_instance(‘td_block_ad_box’)->render(array(‘spot_id’ => ‘smart_list_6’, ‘spot_title’ => $tds_smart_list_6_title));
//$buffy .= ‘<div style=”border-top: 1px solid #4DB2EC;text-align: center;color: #56565A; margin-bottom: 8px;”></div>’;
$buffy .= “</div></div></div><!– End Ezoic – TS-SL-728×90-2 – under_first_paragraph –>”;
$buffy .= “<!– google_ad_section_start –>”;
//adding description
if(!empty($item_array[‘description’])) {
$buffy .= ‘<span class=”td-sml-description”>’ . $item_array[‘description’] . ‘</span>’;
}
$buffy .= ‘</div>’;
// render the pagination
$buffy .= “<!– google_ad_section_end –>”;
$buffy .= ”;
$buffy .= ‘<div id=”ads” style=”clear:both;padding-top:15px;”><div style=”float:left;”>’;
$buffy .= ‘<!– Ezoic – TS-SL-336×280 – bottom_of_page –>
<div id=”ezoic-pub-ad-placeholder-107″><div class=”adsense”>’;
$buffy .= td_global_blocks::get_instance(‘td_block_ad_box’)->render(array(‘spot_id’ => ‘custom_ad_5’));
$buffy .= ‘</div></div></div>
<!– End Ezoic – TS-SL-336×280 – bottom_of_page –>’;
$buffy .= ‘<!– Ezoic – TS-SL-336×280-2 – bottom_of_page –>
<div id=”ezoic-pub-ad-placeholder-108″><div class=”adsense”>’;
$buffy .= td_global_blocks::get_instance(‘td_block_ad_box’)->render(array(‘spot_id’ => ‘custom_ad_3’));
$buffy .= “</div></div>
<!– End Ezoic – TS-SL-336×280-2 – bottom_of_page –>”;
$buffy .= ‘<div id=”ezoic-pub-ad-placeholder-117″>’;
$buffy .= td_global_blocks::get_instance(‘td_block_ad_box’)->render(array(‘spot_id’ => ‘custom_ad_1’));
$buffy .= ‘</div>’;
// render the pagination
$buffy .= $this->callback_render_pagination();
//$buffy .= $this->callback_render_drop_down_pagination();
$buffy .= ‘<div style=”text-align: center; font-size: 12px; margin-bottom: 2px;”></div><!– Ezoic – TS SL Native Bottom – native_bottom –>
<div id=”ezoic-pub-ad-placeholder-194″>’;
$buffy .= td_global_blocks::get_instance(‘td_block_ad_box’)->render(array(‘spot_id’ => ‘custom_ad_2’));
$buffy .= “</div><!– End Ezoic – TS SL Native Bottom – native_bottom –>”;
return $buffy;
}
protected function render_after_list_wrap() {
$buffy = ”;
$buffy .= ‘</div>’; // /.td_smart_list_6 wrapper with id
return $buffy;
}
}
Hi,
The flex block does have an option to display the whole post meta above the thumbnail
– https://www.screencast.com/t/pHYtwWPk
You could use flex blocks instead of predefined blocks. Doe to their flexibility, one can build entire pages with flex blocks
– https://demo.tagdiv.com/newspaper/flex-block/
The subtitle can be positioned anywhere in the single post page. Drag and drop it in the location that you want
– https://www.screencast.com/t/BQWfdagWzlZl
That is easily done with the cloud library plugin and tagDiv composer, post template can be design in many ways
– https://forum.tagdiv.com/tagdiv-cloud-library-plugin/
More beautiful templates will be added in coming updates, for posts as well.
Thanks
Hi,
The thumbnails will be cropped center-top, not from the left
– https://forum.tagdiv.com/featured-image/
These modules have predefined thumbnail sizes, they cannot be changed.
If none of the modules display the images properly, you could experiment with the cloud category templates
– https://forum.tagdiv.com/tagdiv-cloud-library-plugin/
The post loop element used in category pages uses the flex module used in flex blocks
– https://demo.tagdiv.com/newspaper/flex-block/
The module has options to change how it looks, maybe you can use those settings to design a module that displays the images better
– https://www.screencast.com/t/ABiVG9r70
Thanks
Hi,
The breadcrumbs will show one level of parent-child category, there is no setting to change that at the moment. The same would be for the cloud single templates.
I am now aware of any plans to make modifications to the breadcrumbs. Sorry for the inconvenience.
I mobile the last element of the breadcrumbs is not shown, I could give you a code to make it appear, enter it in Theme panel->Custom CSS
– https://www.screencast.com/t/sOFVXiLycS
@media (max-width: 767px) {
.single-post .td-bred-no-url-last{
display: inline;
}}
Regarding that hidden category, where exactly is it still showing? That option will remove it’s tag from the single post pages and category pages. I see you don’t show any category tags in post pages for example.
Thanks
Everything is just the excerpts with all html stripped out. I need a simple blog feed/recent posts block that shows the html formatted post content. Sort of like Module 15. or is there a shortcode to insert Module 15 into a page? I only see block templates available to insert.
Hi, as you can see here (https://devenirbilingue.com/apprendre/anglais/garde-enfant/nounou-anglophone-baby-speaking/) all my categories are not showed in breadcrumbs. On that page I’d like to see ‘Accueil > Apprendre une langue > Anglais > Garde d’enfant en langue etrangere’ but the first parent category is missing on desktop, and there is only ‘Accueil > Anglais’ on mobile.
In template settings, I selected the first 3 criteria (show breadcrumbs, homelink, and parent category). Is there a possibility to see all categories on breadcrumbs, on desktop and mobile?
Also, in Categories settings, I requested to hide the category ‘Etudier a l’etranger > Par pays’ on post and on category pages since it’s a category that I use to sort things up. However it’s still visible.
Thank you.
Hi,
@Ozt The edit with composer option in the admin bar appears only for pages. If you want to use the composer on categories, use the cloud library plugin
– https://forum.tagdiv.com/tagdiv-cloud-library-plugin/
Then you will be able to create/import category templates (not pages) using the composer. These templates can then be applied for the categories in the theme panel.
So the main problem you have is only with the homepage same as above? We could take a look, send us an email at stated above and provide all the details.
Hi,
After the latest update of Newspaper Safari on iMac has started showing 3 instances of “wp-booster” error messages on the front page og my website:
wp_booster error:
td_api_base::mark_used_on_page : a component with the ID: tdm_top_bar_template_1 is not set.
/home/c247new3/public_html/wp-content/themes/Newspaper/includes/wp_booster/td_api.php
Display backtrace
Worked fine until the update was applied.
Kind regards
Peter
Admin
http://www.24-7news.dk
1. My social counter isn’t working (brand new install–yesterday, so the versions should be up to date). When clicking on the Facebook and Youtube banners I am taken to the correct page. Here’s a link: http://www.ohiovarsity.com/
2. My videos page is no longer displaying correctly. There is a lot of white space under the featured video and the start of the video gallery: http://www.ohiovarsity.com/videos/
3. I can’t get Amazon ads to appear. I used the below code and inserted my Amazon code in the middle:
<div class=”td-all-devices”>
<!– Your NON AdSense code here – this ad will show on all devices –>
</div>
Thanks…love the template.
Hello khalil,
The latest news section at your website is part of Pagebuilder+Latest Articles+Pagination, area which cannot be edited from TD Composer. Also, the Editor Pick is part of your Footer section which also, cannot be edited by the page builder. We recommend using a default template as the page template and for the Footer section, you should use a Footer Page functionality, a page which can customize it with TD Composer.
Check our documentation from here -> https://forum.tagdiv.com/newsmag-page-templates/
Hope this helps!
Thanks for the message!
You can create a blog type page if needed, that would not be a problem. Create a page and choose the latest articles template for it
– https://www.screencast.com/t/q1RwmHUY
That will show a list of articles sorted by latest, the settings for it are as shown in the screenshot.
This demo for example uses something like that for the Blog page
– https://demo.tagdiv.com/newspaper_recipes/
You can call the page anything you want and add it in the menu for example.
Hello rocketman,
If you want to have that layout for your single post pages, we recommend using the Single Post templates from Cloud Library and then, with TD Composer you can customize it as you wish. Check here the theme’s documentation -> https://forum.tagdiv.com/tagdiv-cloud-library-plugin/
Thanks for your understanding!
Hi,
That code will not affect the AMP template. This will require a modification in the AMP plugin files if you want to remove the views
– https://www.screencast.com/t/dD4NYh1Da
Comment or remove that code and the views will no longer be displayed in AMP post pages.
Hi I am looking for the PSD files, it mentions them here:
https://forum.tagdiv.com/newsmag-whats-included/
“PSD files – includes the PSD files which are useful if you want to customize various aspects of the original design. Located in /psd folder. I have no /psd folder
logo files – we included all of our demo logos in the /psd_logo folder. The logos are also available in .png format. there is a ‘psd+logo template’ folder,”
but no PSD files of the page design, with layers like mentioned on the themeforest page:
https://themeforest.net/item/newsmag-news-magazine-newspaper/9512331
“ThemeForest Files Included Layered PSD, PHP Files, CSS Files, JS Files, PSD ”
Where can I find the layered PSD files?
Hello! thanks for the response.
No i mean something else, i’ll try to give you more details:
I downloaded and set as default the custom author template in the cloud. I want the same template for all authors but the problem is that: when i open an author page (for example bonder93) the page shows the data of admin profile instead of bonder93 title,avatar etc.
Hi,
The date format can be changed in WordPress settings
– https://www.screencast.com/t/eKm4hAppSpt
– https://www.screencast.com/t/ejw1NmDHMGC
– https://www.screencast.com/t/wLrXdDkmKP
These parameters are accepted – https://codex.wordpress.org/Formatting_Date_and_Time
Format used in example
F j, Y g:i a
I believe this is what you wanted.
The cloud library templates have a setting when using it’s post templates, there is an option to display a time ago format
– https://www.screencast.com/t/DgvU3Z0uD
That will affect the date in the post page, not modules in blocks/grids.
Thanks
I’ve installed the “Awards – Restro” template in a page (https://padeladdict.com/landing-suscripcion/) but unfortunately I am not able to see the background image.
What could be the reason?
Thanks!
The facebook counter shows 0. We have tested with other pages and with some if it shows the correct number and in others it shows 0.
This is a problem of the template or you have to put some special configuration on the facebook page.
Newspaper v8.8.2 – tagDiv Social Counter v4.4
Hi,
The cloud library plugin will work only with theme versions 8.8 and above. It will work only with the tagDiv composer as well and will allow users to design post templates easily. More beautiful templates are on their way.
For adding a new post template by code there is no guide I can provide you. You could modify an existing one if required. In a loop file you can modify the structure of the template (it is possible to modify it in a child theme)
– https://www.screencast.com/t/HujVnLkOu
Depending on what exactly you want to do with the template, CSS may have to be used as well
– https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/
If you should decide to update the theme and benefit from all the fixes and additions from 8.1 until 8.8.2, this is a guide
– https://forum.tagdiv.com/how-to-update-the-theme-2/
You can see the changelog at the bottom of this page
– https://themeforest.net/item/newspaper/5489609
Thanks