Custom flex block with CPT field

Posted in: Newspaper
Post count: 16

Hi

I want to be able to create a custom version of Flex Block 1. It will be exactly the same, except instead of the excerpt, I’d like to display the contents of a custom post field that I’ve added to the post page. I’ve done this in other themes by editing the relevant PHP file but I’m wondering if I can do this with the Flex Block Builder?

Many thanks!

Post count: 16

I should say that I’ve created a test module and displayed the custom field, which is great, but is there a way of effectively duplicating the style of the Flex Block 1 from the pre-built website theme I’m using (Town Talk), rather than having to try and work out exactly how it was designed?

Post count: 21065

Hello!

When you build a module for flex block builder, you use different shortcodes (title, excerpt, etc.), can check their style from the flex block one, and recreate them. They are different shortcodes. You can save and load a font setting on shortcodes, for example https://app.screencast.com/iQ7dOPEm5OChv. This could help you cut time a bit. It will save the font settings from each viewport.

Thank you!

Post count: 16

Thanks, that helped a bit. Is there a guide to using shortcodes to design a module? For example, things that I would like to define include adding a bookmark/save icon to the image, and setting the height of the module to match the other ones in the same row.

Thanks!

Post count: 21065

Hello!

We have this guide: https://forum.tagdiv.com/modules-builder-newspaper-theme/
You can add the module featured image shortcode; below, you can add an inner row with the module bookmark post inside and apply the settings from here: https://app.screencast.com/kabJ7HZRdzNB5
You can set the width of each element from the CSS tab. Also, there is a helpful tool: https://app.screencast.com/7sxCpK2gNcWFc

Thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.