EduardET

Extra Child theme functions code

Mar 7th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.23 KB | None | 0 0
  1. <?php
  2. /*================================================
  3. #01 Load Parent Theme style.css file
  4. ================================================*/
  5. function extra_enqueue_styles() {
  6.     wp_enqueue_style( 'extra-parent', get_template_directory_uri() . '/style.css' );
  7. }
  8. add_action( 'wp_enqueue_scripts', 'extra_enqueue_styles' );
  9.  
  10. /*================================================
  11. #02 Load the translations from the child theme folder
  12. ================================================*/
  13. function wpcninja_translation() {
  14.     load_child_theme_textdomain( 'extra', get_stylesheet_directory() . '/lang/theme/' );
  15.     load_child_theme_textdomain( 'et_builder', get_stylesheet_directory() . '/lang/builder/' );
  16. }
  17. add_action( 'after_setup_theme', 'wpcninja_translation' );
  18.  
  19. /*================================================
  20. #03 Load custom Blog Module
  21. ================================================*/
  22. function divi_child_theme_add_custom_module() {
  23.     get_template_part( 'custom-modules/Blog' );
  24. }
  25. add_action('et_builder_ready', 'divi_child_theme_add_custom_module' );
  26.  
  27. /*================================================
  28. #04 Create a new image file size - this is optional
  29. ================================================*/
  30. add_image_size('wpc-extra-full', 9999, 9999, false );
Advertisement
Add Comment
Please, Sign In to add comment