How can we help?
If you are looking for support for our PokaTheme, this is the place!
Forum Replies Created
-
AuthorPosts
-
Jean-Sebastien GerardParticipant
HI there, following up as I have somehow similar issues.
Thanks.Jean-Sebastien GerardParticipantHI there, following up as I have somehow similar issues.
Thanks.Jean-Sebastien GerardParticipantHey!
Ah! interesting…! Indeed, my review Template Style was not on Default but on Review Style 1, that’s why it kept overriding the general settings.
All good now!
thanks 🙂
Jean-Sebastien GerardParticipantHI!
thank you for the follow up, really appreciate it.I might have an issue:
– I upgraded pokatheme to 4.04
– I left pokatheme_child unchanged (this is my active them)
– I have added the code snippet:
add_filter( ‘poka_general_review_style’, ‘poka_general_review_style_gsh’ );
function poka_general_review_style_gsh( $review_styles ) {
return array(
‘style1’ => ‘Review style1’,
‘style2’ => ‘Review style2’,
‘style3’ => ‘Review style3’,
‘style4’ => ‘Review style4’, // added fourth custom style
);
}
– I have added a “affiliates-single-style4.php” file in folder child theme “\inc\templates\affiliates”
– Now I can see the 4th style in the Customizer dropdown, but, whichever of the 4 available review style I select, it renders as the Review Style 1.Any clue wat I’m doing wrong here? A missing steps?
thanks!
Jean-Sebastien GerardParticipantHI,
ok, got it, thanks for letting me know 🙂
Jean-Sebastien GerardParticipantLooks like it’s not the way to do it.
How should I override Poka_Customizer class in order to alter simply that Review Styles drop down?
Any other way / ideas to achieve this?
thanks for assistance!
Jean-Sebastien GerardParticipantHey!
yes indeed, on the other hand, having everything under the child theme (wp-content/themes/pokatheme_child/) is also part of the usual recommendation in so far as it is supposed to be preserved customized files as well in case of parent theme update, isn’t it?
Thanks for sharing your thoughts 🙂
Jean-Sebastien GerardParticipantHey!
thanks for your reply 🙂
I was reading about this here https://developer.wordpress.org/themes/functionality/internationalization/#loading-translations
I’m still weighing the pros & cons of one strategy vs the other, not sure which is the best, looking for the ease of maintenance over time, especially avoiding any problem when I update Pokatheme, or WordPress itself.
Jean-Sebastien GerardParticipantI found a solution which I will share here in case it may help the community.
What I had done in my initial post was OK, but for it to work it required to properly load the child theme translations, which I achieved by adding the following code to the child’s theme functions.php:
add_action( ‘after_setup_theme’, function () {
load_theme_textdomain( ‘poka’, get_stylesheet_directory() . ‘/languages’ );
load_child_theme_textdomain( ‘poka’, get_stylesheet_directory() . ‘/languages’ );
} ); -
AuthorPosts