- 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,
Indeed the name/number of templates for tagDiv Cloud Library differ from the default posts templates, that is because the templates from tagDiv Cloud Library use only flex blocks and our designer change the order of templates that those single posts was made.
If you want to use the same style for 12 and 13 from tagDiv Cloud Library you should use the single post template 6 and 7
Thank you!
Hi,
I think that your thumbs was not set to the right dimension, you can correct theme by using this plugin for Thumbnails – Fix strange looking images on blocks -> https://forum.tagdiv.com/thumbnails-fix-strange-looking-images-on-blocks/
If this in not what you mean, please provide some more details/some screenshots or a link where I can inspect this problem.
Thank you!
sir my website speed is slow kindly tell me what i do:
Eliminate render-blocking resources and some css and javascrip files is a reason to slow speed kindly tell me recommendations.
I have the same question and I wanted to know if it’s also possible to change the style of the blockquote and put it into a “box”? Cause it changed the way my previous block quote is showing right now.
That makes sense. I think this is the last questions then! I noticed in some of the screen shots and examples that different category display blocks show categories in different orders. One will say “all” followed by gadgets. Some will say “all” followed by say, fashion, or lifestyle.
Is there a way that can control which order that the category listings appear? Or maybe Tagdiv has a way or order that the Ajax grabs the categories to display that I could manipulate on the WordPress made on date?
The final question I have is this; is there a way I can practice this theme before going live? I’ve been activating it live, trying to piece it together only to come up short. Then switching back to the old theme and having to redo that While live which is not ideal. Thank you again!!
Hi,
@lidlpatrik The Newsmag theme isn’t capable of full width, the content has a fixed width, changing or forcing this fixed width with CSS will damage the content layout (blocks, grids etc).
On the other hand if you would like full width design, Newspaper is the way to go. The rows have settings with stretching settings and more row layouts – https://prnt.sc/oultwe
Let me know if you have more questions.
Thanks
Hello !
Is better to ask than to do something you don’t know !
Unfortunately you cannot choose what categories to be displayed there. The filter tab is to filter what categories are shown in the actual block.
Thank you !
Hello !
You could re-activate that option by doing so:
Go into: wp-content/plugins/td-composer/legacy/common/wp_booster/wp-admin/css/wp-admin.css
Search for: .tdc-tab-content-wrap .tdc-tab-content
Set it to Display Block from Display None as you can see here: https://www.screencast.com/t/6rVFWuiBaT
Thank you !
Awesome, thank you for the help! The main reason I wanted to Switch to this theme was because of the block category feature. I really like that each block can feature the buttons to display other categories. I just wanted to control the content. I was assuming this could be done through the “filters” tabs using category id’s but it didn’t seem to work for me. Maybe I was inputting the id’s incorrectly? I hope that makes sense?
For instance, in the screen shot you sent next to “don’t miss”. I would like to display strictly 4 categories in a certain order. Is that possible?
Sorry for my beginner questions. But I thank you again for any help!
Hello !
If you have shortcodes then you can implement them through the Column Text Element from tagDiv Composer in the TEXT tab: https://www.screencast.com/t/StIKlkYQuoXi
Unfortunately you cannot edit the blocks categories list since they are ajax based and are not editable. You can only hide them: https://www.screencast.com/t/xy5NSchZ
I hope this was helpfull !
Thank you !
Hello !
That can be achieved by using the tagDiv Composer and simply clikc on the block you want to edit as you can see here: https://www.screencast.com/t/e6feFYPGE
Thank you !
Hello !
If you modify it there it will affect all the modules, not just the mega-menu modules. Also there could be various design issues as you mention caused by changing the heading, the proper CSS will not apply anymore.
Maybe you can try if you want to decrease the title font size only for your mega menu, please try to use a bit of CSS code to do that. Try the code below and place it in Theme panel->Custom CSS area.
The code is ->
.td_block_mega_menu .td-module-title a {
font-size:15px;
}
Hope this helps!
Thank you !
Hello !
You can change it using this CSS code: .td_module_15 .entry-title {
font-size: 20px;
}
The code must be inserted here: https://www.screencast.com/t/J1Nxw5s5
Or you can edit the blocks and change it from there as you can see here: https://www.screencast.com/t/wDO0NM7InBn5
Thank you !
Hello !
Unfortunatelly it doesn’t work because a category page displays all the content in one block layout. And the offset function cannot be used there.
We are sorry for the inconvenience !
Thank you !
Hello,
I’d like the flex1 block to be full width on mobile
How to?
On the site https://movimentoonline.com.br/home/movimento-online-teste/
No Element “Columnists”
I use Flex Block 1, in the Phone Viewport area I want to place horizontal sliding on the fingers. instead of button to change the element page. How to do this?
Hello !
Please try this CSS and let me know if worked !
.page-id-65120 .tdm-list-with-icons .tdm-list-text a img{
vertical-align: top;
}
.page-id-65120 .tdm-list-with-icons .tdm-list-text a {
color: black;
font-weight: 500;
}
.entry-title a:hover, .td-post-category:hover, .widget a:hover, .td_block_wrap a:hover {
color: blue!important;
}
Thank you !
Hello !
Every block has it’s own filtering system. You will have to edit each block and set a filter for it so your posts won’t repeat anymore as you can see here: https://www.screencast.com/t/1Pl7d19BE1
Thank you !
Hi guys,
On a category page (Cloud Library) I want 6 posts in a loop on desktop an 4 posts on mobile. I thought I would do it by copying the post loop block and hiding it on certain devices. But when I set the mobile block to 4 posts, it also shows 4 on the desktop even though it shows six in tagdiv composer. Is this a known problem? https://bit.ly/2KGxpwU
Hello,
i am currently editing a Cloud Template for my posts. I would like to edit the Single Post Featured Image block and make it half, in order to add a custom html box next to it and show an Adsense Ad.
https://www.screencast.com/t/GhRPuO6DHu
So to be more clear, below social media icons, i would like to have featured image aligned left and a 300×250 adsense size on the right. Below these two the main post content will start.
Any help would be appreciated.
Many thanks.
Chris
This thread has been superseded by this, https://forum.tagdiv.com/topic/code-share-two-versions-of-the-same-block-at-the-same-time/
Hi All,
I am new to WordPress and Newspaper – my main focus is databases. In a lot of the database forums I subscribe to, and as I suspect most of you know, it’s not uncommon for members to share code that creates a feature – not least because others then frequently take the initial entry, adapt it, then re-post. These sites also quite often also feature a sample code silo.
(@TagDiv Support, there’s a lot of really useful content on this forum but it’s limited navigation, layout and quantity of posts make it difficult to search effectively, not to mention time consuming. Can we have a Sample Code silo? Not only would it be useful for members but possibly limit you having to repeat the same or similar support requests).
BACKGROUND
I have a number of Use Cases that require elements on a web page to display simple listings of external editorial content – similar to a news ticker-type display but with no animation.
Initially, I decided that the TD Composer elements Blocks 10 & 9 were the most suitable – as they were closest to my required simplicity and would only be used for these Use Cases. However, the fact that there is no Newspaper option to duplicate a block within TD Composer, and I want minimal plugins installed, I decided to teach myself the PHP/CSS that would be required to achieve my objectives.
FUNCTIONALITY
- The link here shows two page elements that have different content and features which were created using the same Block 10;
- This involved creating new field types using ACF Custom Fields, including a post-type whose options could also be used in a PHP conditional If statement to create the variable field display within the same block;
The generic fields are headline, media outlet and published date for simple listings and other use cases have additional meta data fields; - When the headline linked is clicked on it has to a new web page and go to the external content. The published date must be that of the original editorial, not the WP posting date. This last point is important as I would be bulk uploading posts a few times a week, that will feature a spread of publication dates.
The following provides the necessary ACF Custom Fields setup, the PHP code and the CSS.
ACF Custom Fields
The table below lists out the field names and their setup –
- Post Type: Required. Field Type is “Select”. Drop down list choices are “Editorial” and “Research”;
- Title Link: Required. Field type is “URL”. This contains the URL of the external content page. Non-conditional as it applies to both Post Types;
- Publication Date: Non-conditional. Field type is “Date Picker”;
- Media Outlet: Non-conditional. Field type is “Text” and contains the name of the external content publication;
- Media Outlet URL: Required. Field type is “URL”. Conditional logic is if Post Type = “Editorial”;
- Some Other Field: Required. Field type is “Text”. Conditional logic is if Post Type = “Editorial”;
NOTE: I recently edited one of the Post Type options as there was a typo. I subsequently discovered that in doing so it not only broke all the conditional relationships with other ACF fields, that I then had to reset, but also reset all the Post Types assigned to my posts to a single value – which I also then had to go through and update. I raised this with ACF Support, who said –
“This is expected behavior, each field value is saved independently under each post and it is not recommended to change the field settings after posts have been saved with a value. You can however update all the field settings by creating a query to step through all the posts and pass the new value to the update_field() function. Please take a look at the following resource page for more info on this: https://www.advancedcustomfields.com/resources/update_field/”.
PHP
Block 10 uses the td_module_9.php file. My code amendment is here – https://pastebin.com/vJDbVjMA
Things to note –
- I have stripped out most of the default php echo statements that display author, WP post date and so on to stop them appearing if your default Newspaper 9 setting is to have these on;
- I’ve kept the div names etc as much as possible but the naming may not make sense in terms of the fields that sit within. This means the post title font formatting is still controlled by TD Composer’s Block 10 style settings menu. Similarly, the Media Outlet and date fonts can be collectively changed via the Article Meta Info style options;
- Additionally, as both these fields sit within a span class other style options are possible via custom CSS;
- You will see the conditional variable for the ACF field, Post Type, along with the other ACF Field variables defined within Function Render at the top of the code;
- Finally, to display the tags I used the suggestion in this support post (another good example of why a Sample Code silo would be useful), https://forum.tagdiv.com/topic/display-tags-along-the-category-on-the-blocks/. My code already contains the php get_the_tags statement, but you will have to copy Vlad’s Pastebin code to your td_module.php file as he suggests. Note that I amended this slightly as it displayed a field label for the tags and I think it’s obvious what they are;
- If you want the same, simply remove the following line –
$buffy .= '<span>' . __td('TAGS') . '</span>;
CSS
This is here, https://pastebin.com/mjTz8Tua and features comments to explain what it does, which for the most part is reducing spacing and tightening the gaps between fields.
Hopefully, this post is clear enough to enable you to replicate and hopefully extend this functionality. A big thanks to Simion C. at TagDiv for his fantastic support in helping me work through this.
Please be aware, I have only been teaching myself PHP and CSS for about four weeks so I’ve no doubt the experienced community members will have more elegant ways of writing the PHP or CSS.
Please share if you do ?
Best Wishes
Gary
Hi,
Flex blocks do not work with archive pages. It selects all the posts and does not filter on the selected category. Is there any other way?
Hello !
You can filter the posts to appear in a block by limiting them either using a tag or posts ids as you can see here: https://www.screencast.com/t/9Dr2KV9Wbkvm
Thank you !
Hello !
Unfortunately this option is not available using the tagDiv Composer. The best way you can achieve this is using flex blocks
We are sorry for the inconvenience !
Thank you !