Child theme style.css versioning

Are you sure the version is included in style.css in the right way? In that case this should really work (hook with wp_enqueue_scripts): $theme_data = wp_get_theme(); wp_register_style(‘your-style-handle’, get_template_directory_uri() . ‘/style.css’, ”, $theme_data[‘version’], ‘all’); wp_enqueue_style(‘your-style-handle’); While developing you may not want to change the file version in style.css all the time, in which case you could … Read more

Create a post in custom post type using field in registration form after users submit form

First, add the custom field to the registration form: add_action( ‘register_form’, function(){ ?> <p> <label for=”institute”>Institute</label> <input type=”text” name=”institute” class=”input” value=”” size=”25″> </p> <?php } ); Then, hook to user_register action which gets called after a user has been registered succesfully. add_action(‘user_register’,function($user_id){ $my_institute = array ( ‘post_type’ => ‘Institute’, ‘post_title’ => $_POST[‘institute’], // Custom field … Read more

the file placed in the child theme is not included

You want to replace bimber_capture_entry_featured_media in your child theme. In the theme.php file you’ve given us you can see that this is only called in one place, from bimber_render_entry_featured_media, and the call is wrapped in a filter: if ( apply_filters( ‘bimber_render_entry_featured_media’, true, $args ) ) { echo bimber_capture_entry_featured_media( $args ); } where returning false from … Read more

Adding tawk.to code just before body tag on functions.php file

You can the code to head or before body tag this way. Add this code at the last of functions.php add_action( ‘wp_head’, function() { ?> <!–Start of Tawk.to Script–> <script type=”text/javascript”> var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date(); (function(){ var s1=document.createElement(“script”),s0=document.getElementsByTagName(“script”)[0]; s1.async=true; s1.src=”https://embed.tawk.to/5b54359ee21878736ba23110/default”; s1.charset=”UTF-8″; s1.setAttribute(‘crossorigin’,’*’); s0.parentNode.insertBefore(s1,s0); })(); </script> <?php } ); Hope it helps

wp_add_inline_script not adding when script_loader_tag filtered

The reason this is happening is because the markup that is filtered by script_loader_tag includes the inline scripts. So when you filter it and replace all the HTML tag for a particular script, your filter is removing those inline script tags. If you print out the original value of $tag from within your filter you … Read more

How to load parent theme style.css?

At the top of your child themes style.css add: @import url(“../twentyeleven/style.css”); Obviously replace twentyeleven with your parent themes folder. 2016 – This practice has now been replaced by declaring the ‘Template’ in your theme stylesheet header: Template: twentyfifteen https://codex.wordpress.org/Child_Themes

bbpress change the word forum, topic, reply in the forum to another word I choose

You can hook to translation filters of WordPress to change any word or phrase. These filters are: gettext, ngettext and gettext_with_context: add_filter(‘gettext’, ‘change_bbpress_wording’, 10, 3); add_filter(‘ngettext’, ‘change_bbpress_wording’, 10, 3); add_filter(‘gettext_with_context’, ‘change_bbpress_wording’, 10, 3); function change_bbpress_wording ($translated, $untranslated, $domain) { if ($domain == ‘bbpress’) { $translated = str_ireplace(‘Forum’, ‘*desired word*’, $translated ); $translated = str_ireplace(‘Topic’, ‘*desired … Read more

Including style.css in Child Theme

get_stylesheet_uri will return the current theme’s stylesheet– the child stylesheet if it is a child theme. While not entirely clear from the Codex entry for that function, it is clear from the entry for get_stylesheet_directory_uri, which is used by get_stylesheet_uri. What should be happening is that the child stylesheet is being enqueued twice under different … Read more