Skip to content
Public Ticket #6064

Penci blocks - possible to customize in PenNews child theme?

Conversation thread

Penci Design replied

Staff Reply

Yeah, 

IWe will consider to add more hook to modify shortcode on the nextupdate version of PenNews.  I'm not sure it will be added - but, I'm sure we will consider about this.

We will notify you when new updates are available.

Note important: please backup code block 5 before update theme and plugin

Best Regard,

PenciDesign

redpointmediagroup replied

Customer Reply

Thanks for letting us know. To be clear, there is no way you can recommend for us to make this change in the child theme besides the WPide plugin? 

Can you please also confirm whether future updates to the Penci Framework plugin will overwrite this change you have made to /penci-framework/shortcodes/block_5/frontend.php ?

Penci Design replied

Staff Reply

Hi,

Unfortunately, curently, this theme has not filter for change content block 5.

We will consider to add more this feature in the next update versions of PenNews. I'm not sure it will be added - but, I'm sure we will consider about this.

Best Regards,

PenciDesign

redpointmediagroup replied

Customer Reply

Hello, 

Thanks for taking a look. We can see the ACF field data on the homepage now, which is good.

However, we're concerned by the edit to the plugin files. We were hoping to avoid that, and keep all changes in the child theme, because otherwise the changes can be overwritten by an update to the plugin. 

Thank you for recommending the WPide plugin, but it does not look like a solution we can use. The plugin is three years out of date, and known to conflict with another plugin we need. 

Do you have an alternate solution for making this change in the child theme? Is there a way you can recommend we use the filter you provided earlier? Our earlier attempts to use the filter caused the page to break.

Thank you,

Penci Design replied

Staff Reply

Hi,

I checked on your site and modify block_5/frontend.php file  as screenshot  http://prntscr.com/m7r499

I create post test and check custom post type . After you check, please remove this post help you. 

https://avenuecalgary.wpengine.com/wp-admin/post.php?post=20799&action=edit

Please check infor display on home page: http://prntscr.com/m7r4rl

If you want modify  theme , you can use WPIDE plugin as screeshot  http://prntscr.com/m7r55c

Best Regards,

PenciDesign

Penci Design replied

Staff Reply

Hi,

Please send me your website information management ( admin url site, username and password ).

I will check it help you.

Best Regard,

PenciDesign

redpointmediagroup replied

Customer Reply

Thanks very much for the filter snippet! Which code from the plugin's Penci block would be best to use with it? We've tried it with the code from each of these files, but haven't been successful yet: 

penci-framework/shortcodes/block_5/content-items.php

penci-framework/shortcodes/block_5/frontend.php

penci-framework/shortcodes/block_5/settings.php

Is there a different file or files we should be looking at to use with the shortcode? We're trying to include output from Advanced Custom Fields in each post displayed by the block.

Penci Design replied

Staff Reply

Hi,

You can use filter with code below:

add_filter( 'penci_after_block_items', 'penci_custom_block_items',10, 2 );function penci_custom_block_items( $output, $atts = null ){ if ( isset( $atts['shortcode_id'] ) && 'block_5' == $atts['shortcode_id'] ) { // Custom code block 5 shortcode }
return $output;}

Please copy code to function.php file of child theme and custom code .

Best Regards,

PenciDesign

redpointmediagroup replied

Customer Reply

Thank you for the response. Is this a feature that will be included in future versions? What do you recommend for the customizations until then?

Penci Design replied

Staff Reply

Hi,

Unfortunately, currently this theme doesn't support to customize the template files for Penci blocks in the child theme.

Best Regards,

PenciDesign

redpointmediagroup started the conversation

Conversation Start

Hello,

We are working with a child theme of PenNews, and are trying to display some additional information for each post in Penci blocks (ex: Penci Block 5). Is there a way to customize the template files for Penci blocks in the child theme, similar to what you can do with WooCommerce template files? 

Thank you!

Want to join this conversation or access attachments? Sign in first.