- ApiPractical example – How to add a new Block and Module
- Apitd_api_block::delete
- Apitd_api_block::update_key
- Apitd_api_block::update
- Apitd_api_block::add
- ApiAPI – Blocks – Introduction
- Apitd_api_thumb::update_key
- Apitd_api_thumb::update
- Apitd_api_thumb::add
- ApiAPI – Thumbnail – Introduction
- Apitd_api_category_top_posts_style::update_key
- Apitd_api_category_top_posts_style::update
- Apitd_api_category_top_posts_style::add
- ApiAPI – Category top section style – Introduction
- Apitd_api_module::update_key
- Apitd_api_module::update
- Apitd_api_module::add
- ApiAPI – Modules – Introduction
- ApiUsing the Theme API in plugins
- ApiThe Theme API
Hi,
Each block uses one (or two) module(s) to display the posts. For example block1 uses modules 4 and 6 – http://screencast.com/t/WBt6c0iw
On most modules there’s a thumbnail, they come in different sizes – http://screencast.com/t/4dIuc3exp
The thumbnails are registered in td_config.php – http://screencast.com/t/cyVQTwja
To add a new thumbnail you have to use the td_api_thumb::add API call – https://forum.tagdiv.com/td_api_thumbadd/
When you register a new block you have to use a strict name – http://screencast.com/t/1pSR20AXAZf – this is required because the theme loads only the necessary blocks code to improve the speed.
Make sure that the files are included in the plugin folder and their path is correct – http://screencast.com/t/TpQKBEd4oT0
For widgets registration try to use the following hook: – http://screencast.com/t/gIAV69k56ds
add_action('td_wp_booster_loaded', array($this, 'td_wp_booster_loaded'));
Add a function and the code required for registering the widget:
function td_wp_booster_loaded() {
...
}
Hope this helps, let me know how it goes.
Thank you!
-
This reply was modified 11 years by
Emil G.
Hi,
Not sure, it’s possible that this issue with saving settings appears because the server security module blocks the access to admin-ajax.php file or the file it’s not found. Try to verify if this happens when you save settings in other cases in theme panel and also verify the console for error while saving the settings on the Theme Panel, usually it displays a 403 or 404 error.
Contact your server administrator and explain the situation, as it’s requested many times during the a save the file it’s treated as threat so it’s banned. You can report false positives to your server administrator to remove it from the banned list.
You should also check the max_input_vars directive from you php.ini file and make sure that it’s set above 2000, you can check this in system status section within theme’s panel: http://screencast.com/t/V8MumQISR
Let us know how it goes and check this wp codex article on changing file permissions: https://codex.wordpress.org/Changing_File_Permissions
Thanks
Salut,
Nu sunt sigur ca intelg care e problema. Un text block poate fi folosit oriunde in pagina, doar adaugi on text block folosind Visual Composer sau daca vrei il adaugi din Widgets daca vrei sa-l folosesti in sidebar – http://screencast.com/t/Odgk6pL6Z iar marimea fontului se poate customiza folosind custom css(poti folosi chiar inline) – http://screencast.com/t/2Dc0lXY6Q
<h1 style="font-size: 16px; line-height: 20px; margin-bottom: 10px;">I am text block. Click edit button to change this text.</h1>
<h2 style="font-size: 14px; line-height: 20px; margin-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.</h2>
Mersi!
-
This reply was modified 11 years by
Alin [tagDiv].
Hi,
There is a way to post news only with text: title, subtitle and nothing more.
And the blocks and modules show this possibilities. If there is a picture, show it!, But if there isn’t, show only the text without the space blank of the picture.
This is possible? how?.
thanks!!.
Hi
This blog http://demo.tagdiv.com/newspaper_classic_blog/ it’s built with page builder with latest as a page template and contains one big grid 4 followed by a text block and the latest article section with modul 4 used for layout and a sidebar left as you can see here: http://screencast.com/t/TjhAzBzA Also you can install the classic demo and check the setting.
Thanks!
Hi,
Not sure what you mean. Do you cannot edit the homepage?
Also if you use a widget to display recent comments and it doesn’t appear through Visual Composer elements and you can use it only from Widgets, you can create a custom sidebar and add your widgets to it(elements that you have now in the page) – http://screencast.com/t/4BG9WcGjY6d and use Widgetised sidebar block to display it on the page – http://screencast.com/t/WugW6kJv
Hope this helps!
Hi
You can hide the comment block title using custom css in Theme Panel > Custom Css like here: http://screencast.com/t/9IH1dq9GiCW
.td-comments-title-wrap{
display: none;
}
.comments .comment-reply-title{
display:none!important;
}
If you only want to translate this titles you have this option in theme panel> translations http://screencast.com/t/H2yxjPyYk
Thanks!
Hi
You can hide the pagination using custom css in theme panel > custom css: http://screencast.com/t/jXEfSE2cPQ
.td_block_related_posts .td-next-prev-wrap{
display: none !important;
}
and you can set the number off related article from theme panel like here: http://screencast.com/t/tXCOYim0
Thanks!
-
This reply was modified 11 years by
Andrei L..
hello
i create page form backend editor but i don’t see block ..
http://picture.in.th/id/39513646160e05df42ed6e2c7d0a55fe
i setting Visual Composer . it Error
http://picture.in.th/id/cdb4fb8ed3c2b3055b6c2acb7fbd549c
Pleas Help Me
Hi,
I observed that my newspapaer sport site starts shwoing this;
Firefox
Chrome:
Google Chrome’s connection attempt to sportvisionng.com was rejected. The website may be down, or your network may not be properly configured.
Access a cached copy of http://sportvisionng.com/
Search on Google
How can I solve this? I’ve not setup any cache plugin yet (w3tc or wp super cache) and it throwing error already!
Regards
Hi guys,
I would to add additional blocks to my homepage but I can’t work out how to do so. I can copy an existing block and then edit it, but I’m stuck with those block designs. I can’t work out how to choose and add new blocks from scratch. For example, I have a Block 6 so I can copy and edit that, but I can’t seem to add a Block 3 or 4.
Also, I can’t work out how to change a block type. For example, is it possible to change a Block 1 to a Block 2?
Many thanks,
stuart
Hi,
Unfortunately the theme doesn’t have such an option, you can do this only manually, edit the page and change blocks position.
Thanks!
Hi,
Unfortunately the top menu was not designed for mobile devices, we try to find a better implementation for sign in/register widgets in a future update. Until then you can try this custom css in Theme Panel > Custom Css: http://screencast.com/t/cw4mTt1hSINv
@media (max-width: 767px){
.td-header-top-menu-full {
display: block !important;
}
.td-header-sp-top-menu {
display: block!important;
}
.menu-top-container {
display: none !important;
}
.td-header-sp-top-widget {
display: none !important;
}
}
Thanks!
Hi,
If you use blocks on different rows you can set a negative margin for specific row/column:
Before – http://screencast.com/t/EIPvPZMwpByH
After – http://screencast.com/t/LjQiFe7kTP – http://screencast.com/t/1JbJXCREir
If you use blocks in the same row, it can be done only with custom css.
Thanks!
Hi,
If you want to use child theme to overwrite the files from main theme and don’t lose the custom modifications when you update the theme you don’t have to upload the api plugin. The api plugin was created for advanced users so they can create new modules,blocks, templates as you can see in the documentation – https://forum.tagdiv.com/the-theme-api/
Thanks!
Hi,
Yes, the “WP Reccent Comments” works like it should be, unfortunately there is not block or widgets to display comments like you need.
Thanks!
I think I am part way there.
With the help of the example in the API documentation, I have code for the new thumbnail, block and module, and have put what I thought was the correct code in the td_api_plugin.php (links to all code below)
1) The new block initially appeared in the visual composer but when used, and I tried to view the page, it gave a 404 error.
2) I directly edited td_page_builder_widgets.php to include the new block. The new block initially showed in the widgets but when used in a sidebar there were NO images on the page (the featured image also disappeared).
I didn’t know if I should reactivate the plugin after changes so tried to do so and now consistently get the following, and the widget of the new block is no longer available in the list:
wp booster error:
td_api_base::mark_used_on_page : a component with the ID: jc_block_7 is not set.
/homepages/8/d453795254/htdocs/SiteHome/wp-content/themes/Newspaper/includes/wp_booster/td_wp_booster_functions.php
Links to code:
https://dl.dropboxusercontent.com/u/4800576/TagDiv%20questions/jc_block_7.php
https://dl.dropboxusercontent.com/u/4800576/TagDiv%20questions/jc_module_6.php
https://dl.dropboxusercontent.com/u/4800576/TagDiv%20questions/td-api-plugin.php
I would really like to see where this code is wrong please to help my general understanding, but I have found an alternative solution for this particular need.
td_block_21 also uses square images but in the theme is not in the widgets list. Having now found the way to get blocks in the list I put the block 21 in there and works great. I assume I cannot edit this file via the API or child theme? A direct edit is not ideal even though it is a simple one.
Thanks
Hi,
I have a last problem with my SEO, H2.
“Nici o etichetă de subtitlu (cum ar fi un H2) apare în articol.”
No sub-label (such as H2) appears in the article.
I readed om this forum that can be a solution to use a block text but I can’t figure out how to do it.
Can someone help me with a sample please?
Thanks in advance!
Hi,
Please try this without any plugins active and also make sure you empty cache as well and make sure the theme actually saves settings. The issue with saving settings usually appears because the server security module blocks the access to admin-ajax.php file. Try to verify the console for error while saving the settings on the Theme Panel, usually it displays a 403 or 404 error.
Contact your server administrator and explain the situation, as it’s requested many times during the a save the file it’s treated as threat so it’s banned. You can report false positives to your server administrator to remove it from the banned list.
Thanks!
I had obviously looked at this too long yesterday as in the light of a new day I think I can see this a bit clearer now. I had begun to think of blocks as being the building block of a module but am thinking now it is the other way around. That it is the module that is repeated to make up the block. Is that correct?
I can’t test it out as I am currently unable to access our site but I will post again if I can’t sort it out.
Thanks
Hi Got it. Interesting part is that all other pages can move like this but the one I set as home page. there is no dot line box so very time I move the block it goes back to the side, any idea?
Best,
Hello,
how can I decrease the space between the vertical and horizontal blocks on the homepage?
Hi
To change the color of background title add the css style inline like here: http://screencast.com/t/pIMrRhTg
<h4 class="block-title" style= "border-color:blue;">
<span style= "background-color:blue;">
MOST POPULAR
</span>
Here is the result: http://screencast.com/t/pIMrRhTg
Thanks!
-
This reply was modified 11 years by
Andrei L..
I am using TagDiv block 7 in a sidebar widget but need to customise it to use square thumbnails.
I have already done a similar edit for the mega-menu so I know how to create the new thumbnail size and how to create a new block (7sq) in config.php.
I was expecting to then create a td-block-7sq.php but, unlike the mega-module I edited previously, the td_block_7.php does not seem to refer to a thumbnail size – What am I missing? should I be creating a new module?
I think I am not correctly understanding the structure of things. Are you able to explain?
(I am actually doing the edits via API and a child theme but assume if I understood how to do direct edits I can work out this side of things 🙂 )
Thanks
Hi,
When viewing my site I have sections called ‘Latest Articles’ at the bottom of the site etc which are not visible in Visual Composer so I cannot review. Where can I locate these blocks to remove?

Thanks
Graham