Title: Eivind's Replies | WordPress.org

---

# Eivind

  [  ](https://wordpress.org/support/users/eivsemb/)

 *   [Profile](https://wordpress.org/support/users/eivsemb/)
 *   [Topics Started](https://wordpress.org/support/users/eivsemb/topics/)
 *   [Replies Created](https://wordpress.org/support/users/eivsemb/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/eivsemb/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/eivsemb/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/eivsemb/engagements/)
 *   [Favorites](https://wordpress.org/support/users/eivsemb/favorites/)

 Search replies:

## Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SimpleTOC - Table of Contents Block] How to highlight a TOC-Headline? Using GeneratePress Elements](https://wordpress.org/support/topic/how-to-highlight-a-toc-headline-using-generatepress-elements/)
 *  [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/how-to-highlight-a-toc-headline-using-generatepress-elements/#post-16898139)
 * **Update**: created a new topic since this one is already marked as completed:
   [https://wordpress.org/support/topic/highlight-active-toc-headline/](https://wordpress.org/support/topic/highlight-active-toc-headline/)
 * Hey guys,
 * I’m looking for the same solution, so does the author or anyone else know how
   this can be achieved? I tried asking ChatGPT that spit out the JS code below,
   which didn’t work out of the box. I also tried changing the class selector and
   a few other things.
 * Would be really great to find a way to solve this since I’m sure many people 
   would like to implement the same to their site!
 * **my-toc-highlight.js**
   `document.addEventListener('DOMContentLoaded', function(){
   var tocLinks = document.querySelectorAll('.simple-toc a'); var sectionIds = Array.
   from(tocLinks).map(a => a.hash); window.onscroll = function() { var scrollPosition
   = document.documentElement.scrollTop || document.body.scrollTop; sectionIds.map(
   function(id) { var section = document.querySelector(id); if (section.offsetTop
   <= scrollPosition && section.offsetTop + section.offsetHeight > scrollPosition){
   document.querySelector('.simple-toc a[href="' + id + '"]').style.color = '#f00';//
   Change color to red when active } else { document.querySelector('.simple-toc 
   a[href="' + id + '"]').style.color = ''; // Reset color when not active } });};});`
 * **functions.php**
   `function my_theme_scripts() { wp_enqueue_script('my-toc-highlight',
   get_template_directory_uri() . '/js/my-toc-highlight.js', [], '1.0', true); }
   add_action('wp_enqueue_scripts', 'my_theme_scripts');`
 * PS: this is the exact code from ChatGPT and I know that the class selector is
   not the correct one (I tried changing that!)
    -  This reply was modified 2 years, 11 months ago by [Eivind](https://wordpress.org/support/users/eivsemb/).
    -  This reply was modified 2 years, 11 months ago by [Eivind](https://wordpress.org/support/users/eivsemb/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Smart Custom 404 Error Page] Default 404 page still showing](https://wordpress.org/support/topic/default-404-page-still-showing/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/default-404-page-still-showing/#post-13644017)
 * I am now using a custom 404 page directly from the theme instead of this plugin.
   The plugin authors do not seem very interested in helping out since there have
   not been any replies since 6 weeks ago.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Smart Custom 404 Error Page] Default 404 page still showing](https://wordpress.org/support/topic/default-404-page-still-showing/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/default-404-page-still-showing/#post-13443157)
 * Update: I have done some more testing and noticed that if I change the permalink
   of any existing post/page, then when visiting the old URL I am actually seeing
   the correct 404 page (defined in the settings).
 * However, the correct 404 page is NOT showing for URLs that never existed, for
   example website.com/asdfasdfasdf.
 * Is this something you can look into? Looking forward to your reply.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Emojis replaced by ‘??’ after restoring backup](https://wordpress.org/support/topic/emojis-replaced-by-after-restoring-backup/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/emojis-replaced-by-after-restoring-backup/#post-13121076)
 * Thanks for your quick response.
 * So if I understand correctly, the issue is likely because of how my WP hosting(
   Siteground) either generates or restores the backup (or along one of those processes).
   Do you know if this can be fixed by a developer with FTP access?
 * I am asking because Siteground continues to say it’s related to the “application’s
   development process” (?) and does not seem to have a solution to this (or at 
   least they don’t want to look more into the issue).
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] Full width header + navigation position](https://wordpress.org/support/topic/full-width-header-navigation-position/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/full-width-header-navigation-position/#post-12749661)
 * Thanks, that solved the issue with centering the navigation!
 * I figured out why the header wasn’t full width myself: I’m using header element(
   merge with content to get transparent header), and I just had to select Full 
   width for Container (Page Hero tab) to display as full width.
 * Regards
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Fonts - Host Your Fonts Locally] Can’t upload .tff file type](https://wordpress.org/support/topic/cant-upload-tff-file-type/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/cant-upload-tff-file-type/#post-11446041)
 * I think the issue is with WordPress and restrictions to certain file types. I
   addded a line of code to the wp-config file which solved the issue:
 * define(‘ALLOW_UNFILTERED_UPLOADS’, true);
 * See also solution #4 here:
    [https://www.elegantthemes.com/blog/wordpress/how-to-fix-the-sorry-this-file-type-is-not-permitted-for-security-reasons-error-in-wordpress](https://www.elegantthemes.com/blog/wordpress/how-to-fix-the-sorry-this-file-type-is-not-permitted-for-security-reasons-error-in-wordpress)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Fonts - Host Your Fonts Locally] Can’t upload .tff file type](https://wordpress.org/support/topic/cant-upload-tff-file-type/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/cant-upload-tff-file-type/#post-11390696)
 * Can anyone from support assist with this? Must be a simple work-around solution.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MashShare - Social Media Share Buttons, Social Share Icons] Issues with Subscribe Button](https://wordpress.org/support/topic/issues-with-subscribe-button/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/issues-with-subscribe-button/#post-11360902)
 * Anyone have suggestions for how to solve this, if possible? Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Change styling (CSS) of Cart and Discount code buttons](https://wordpress.org/support/topic/change-styling-css-of-cart-and-discount-code-buttons/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/change-styling-css-of-cart-and-discount-code-buttons/#post-9318257)
 * Any tips to this? I am sure this must be an easy fix, I just don’t know the CSS
   class or selector to use to style the buttons.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Change styling (CSS) of Cart and Discount code buttons](https://wordpress.org/support/topic/change-styling-css-of-cart-and-discount-code-buttons/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/change-styling-css-of-cart-and-discount-code-buttons/#post-9311099)
 * The URL is [https://www.restauram.com/](https://www.restauram.com/). I am using
   latest Flatsome theme if that helps.
 * Note that the site is still under construction on a temporary domain and contains
   random content at the moment 🙂
 * PS: I just realised I also need to style the “Logg inn” button that appears in
   the pop up when clicking “Logg inn / registrer” in the very top right corner.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Change styling (CSS) of Cart and Discount code buttons](https://wordpress.org/support/topic/change-styling-css-of-cart-and-discount-code-buttons/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/change-styling-css-of-cart-and-discount-code-buttons/#post-9310279)
 * If you cannot see the two pictures in first post, this is the links:
 * > [View post on imgur.com](https://imgur.com/a/JdfSo)
 * > [View post on imgur.com](https://imgur.com/a/KjJg7)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [WooCommerce PayPal checkout no order confirmation sent](https://wordpress.org/support/topic/woocommerce-paypal-checkout-no-order-confirmation-sent/)
 *  Thread Starter [Eivind](https://wordpress.org/support/users/eivsemb/)
 * (@eivsemb)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/woocommerce-paypal-checkout-no-order-confirmation-sent/#post-6789623)
 * I see also now that 2 hours after the PayPal order was placed I received an email
   that the order was cancelled, but the transaction went through and is in the 
   PayPal account. Any help?

Viewing 12 replies - 1 through 12 (of 12 total)