atuan
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Libre] Customizing sticky menuReading WordPress forums, I found a solution for child theme javascript.
1) First of all, copy libre.js to child theme folder “/js” and rename it to “libre-child.js”
2) Edit the new “libre-child.js” in your child theme folder and change the code as benedicksahagun suggested. The first 22 lines should be:
(function($) { var stickyHeader = $( '.site-header' ); var body = $( 'body' ); var adminBar = libreadminbar; //localized in functions.php var stickyHeaderOffset; var additionalOffset = 300; if ( adminBar > 0 ) { stickyHeaderOffset = stickyHeader.offset().top + additionalOffset - 32; } else { stickyHeaderOffset = stickyHeader.offset().top + additionalOffset; } var stickyTime = function() { if( $(window).scrollTop() > stickyHeaderOffset ) { body.addClass( 'sticking' ); } else { body.removeClass( 'sticking' ); } } /* Remove border from linked images */
3) Change
var additionalOffset = 300;
number as needed.4) Edit in child theme your “functions.php” and add this:
/** Custom javascript **/ add_action( 'wp_enqueue_scripts', 'libre_child_script', 20150624 ); function libre_child_script() { wp_dequeue_script( 'libre-script', get_template_directory_uri() . '/js/libre.js', array( 'jquery' ), '20150623', true ); wp_enqueue_script( 'libre-script-child', get_stylesheet_directory_uri() . '/js/libre-child.js', array( 'jquery' ), '20150624', true ); $adminbar = is_admin_bar_showing(); wp_localize_script( 'libre-script-child', 'libreadminbar', array( $adminbar ) ); }
And that is all. I don’t know if adminbar localization lines are necessary, but just in case.
Thanks to benedicksahagun again.
Forum: Themes and Templates
In reply to: [Libre] Customizing sticky menuSorry for another answer. Your code works, but only if modified in parent theme /js/libre.js.
It’s however a solution. Thanks!
Forum: Themes and Templates
In reply to: [Libre] Customizing sticky menuI think I’ve done well, but it don’t work. Thanks anyway for your quick answer.
Forum: Themes and Templates
In reply to: [Libre] Customizing sticky menuThanks benedicksahagun for your answer. Sorry my English. Yes, I want it to appear after scrolling more pixels. Now, the banner image appears below sticky menu and seems very strange.
Forum: Themes and Templates
In reply to: [Libre] Sidebar in posts pageI got it. Modified your code in:
.blog .entry-meta { margin-bottom: 1.5em; }
And added:
.blog .entry-header, .blog .entry-content { float: none; width: 100%; }
I hope is right. Greetings.
P.S.: I was working on-line because web page is not yet public.
Forum: Themes and Templates
In reply to: [Libre] Sidebar in posts pageCompressed in the sense that post titles are a bit out of space. But I will try tinkering with the code. Thanks!
Forum: Themes and Templates
In reply to: [Libre] Sidebar in posts pageWow, great. Seems a bit compressed, but thank you very much (again) for your work, Kathryn.
Forum: Themes and Templates
In reply to: [Libre] Bad aligment if change to "the_excerpt" in "content.php"Whoops. You’re right: I tried with another some posts and everything is ok then. Really thanks, Kathryn.
Forum: Themes and Templates
In reply to: [Libre] Bad aligment if change to "the_excerpt" in "content.php"Sorry, I forgot the URL: https://bit.ly/23GEWC7
Blog page is “Actualidad”. Thanks again.
Forum: Plugins
In reply to: [Workbox Video from Vimeo & Youtube Plugin] WordPress crash after 3.1 updateEverything is ok with new version 3.1.1. Descriptions of videos are gone, but much better than previous versions. Thanks!
Forum: Plugins
In reply to: [Workbox Video from Vimeo & Youtube Plugin] WordPress crash after 3.1 updateSorry if I was gruff, but the latest updates was catastrophic. You need more testing before publishing. Keep the good work.
Forum: Plugins
In reply to: [Contact Form DB] After update, I can't delete recordsThanks again, Michael.
Forum: Plugins
In reply to: [Contact Form DB] After update, I can't delete recordsIt seems an issue, but is solvable. Click on the date (data was a mistake) link at the beginning of the record, and from there you can delete it. Thanks Michael for your answer. Greetings.