Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #1828784
Penci blocks - possible to customize in PenNews child theme?
Closed

Comments

  • redpointmediagroup started the conversation

    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!

  •  501
    Penci replied

    Hi,

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

    Best Regards,

    PenciDesign

  • redpointmediagroup replied

    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?

  •  501
    Penci replied

    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

    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.

  •  501
    Penci replied

    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 privately
  •  501
    Penci replied

    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

  • redpointmediagroup replied

    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,

  •  501
    Penci replied

    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

    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 ?

  •  501
    Penci replied

    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