Fire effect in the text of the header
-
I need help in order to make this effect. There is a .js file for this, but I don’t know what I have to do. This is the link: http://sinetheta.github.com/burn/
I puted the downloaded file in the “js” directory of Graphene. What else must I do? I have a chid theme. Thanks a lot.
Mod
Create a folder called js under child theme (child theme must be active) and put that jquery.burn.min.js
in it. Then add this to child-theme’s functions.php
<?php
function load_burn_text_jquery() {
if ( ! is_admin() ){
wp_enqueue_script(
'burn-text-script',
get_stylesheet_directory_uri() . '/js/jquery.burn.min.js',
array('jquery')
);
}
}
add_action('wp_enqueue_scripts', 'load_burn_text_jquery');
function burn_the_header_text() {
?>
<script>
jQuery(document).ready(function($){
$(document).ready(function() {
$(.header_title).burn('wind');
});
});
</script>
<?php
add_action('wp_head','burn_the_header_text');What’s in your functions.php? Use pastebin to share code.
Hellow Prasanna. Only now I have read your message. I think we have a big time difference.
In my child-theme’s functions.php I have a few functions. Exact that:
<?php
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'Read more' => 'Segueix llegint',
'Permalink to %s' => 'Enllaç permanent a',
'Go back to the front page' => 'Torna a l'inici',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
?>
<?php
function graphene_custom_header_width(){
return 981;
}
function graphene_custom_header_height(){
return 365;
}
add_filter('graphene_header_image_width', 'graphene_custom_header_width');
add_filter('graphene_header_image_height', 'graphene_custom_header_height');
?>I don’t think that is the cause of the problem. Even when I leave ‘functions.php’ empty, the problem persist when I put in your code for the fire effect. Something will be wrong. Only I must say that I have a shadow effect (in the CSS of the child’s theme) in the header’s text. I don’t know if this can be responsable for the error message. If it can help you, I will give you the link of my site:
http://enmaristanynodorm.site11.com/
I’m waiting your news. And thanks again,
Gica.
Remove the function which alters header image dimensions. You don’t need that anyways. You can change the header height in Graphene Options itself.
Put code in between backtick (
Code:`) characters here. It’s usually located above the Tab key on your keyboard.
Oops! Missed a closing bracket. Try this,
function load_burn_text_jquery() {
if ( ! is_admin() ){
wp_enqueue_script(
'burn-text-script',
get_stylesheet_directory_uri() . '/js/jquery.burn.min.js',
array('jquery')
);
}
}
add_action('wp_enqueue_scripts', 'load_burn_text_jquery');
function burn_the_header_text() {
?>
<script>
jQuery(document).ready(function($){
$(document).ready(function() {
$(.header_title).burn('wind');
});
});
</script>
<?php
}
add_action('wp_head','burn_the_header_text');Admin
Paste the entire content of your child theme’s
functions.phpfile in pastebin.com and share the link here so that we can take a look.
Viewing 10 posts - 1 through 10 (of 14 total)
- 1
- 2
- You must be logged in to reply to this topic.
