mcography
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Add Javascript to Nav Menu?@gabolozano83 You do not need to add the Google Analytics code directly to the menu items, so the solutions in this thread will not help you. Google Analytics already tracks clicks on your website. All you need to do is copy and paste the tracking code provided by Google Analytics into your functions.php file.
Check out this article or this one for more information.
Forum: Plugins
In reply to: [The Events Calendar] Custom List Template Not Overriding Main List TemplateI figured it out. I realized that I needed to edit single-event.php not list-widget.php. I tried to post that answer here a couple of days ago, but the WordPress forums weren’t cooperating. Thanks for your reply.
Forum: Fixing WordPress
In reply to: How to Unregister Footer Widget from Parent ThemeNevermind. It’s working now.
@photocrati – Well, when I activate NextGen and NextGen Plus, the masonry items on my blog page only show one column on the left side of the screen rather than 4 columns (as I’ve set it to show).
The 10 items in the Slick carousel (which should only show 3 posts at a time) are all displayed.
Is there a no-conflict mode in NextGen?
@photocrati Thanks for your response. I have not contacted the Slick plugin author yet.
In addition to breaking the Slick carousel, NextGen also broke the Isotope jQuery plugin I am using on my blog page. So I deactivated NextGen and found a different plugin.
It would be nice if we could figure out what the issue is so that I could use NextGen. But for now, because I am on a deadline, I’l have to use a different plugin for my galleries.
Forum: Fixing WordPress
In reply to: Why are my child styles loading before my parent styles?I am using SASS, so I have a couple of stylesheets. In the root of my child theme, I have style.css which has this:
/*! Theme Name: UIC Theme URI: http://slamagency.com Description: Child theme of the SLAM! theme for UIC. Author: Megan Carroll Template: slam-theme_v1 Version: 1.0.0 Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready */ /* =Theme customization starts here -------------------------------------------------------------- */In root > library > css I have style.css which has all of my child theme styles.
Forum: Fixing WordPress
In reply to: Add Javascript to Nav Menu?Hi playpianotoday. I revised my approach a little bit so that it would be more in line with Javascript best practices. Here’s what you should do.
Create an item in your WordPress menu called ‘Live Chat’ or whatever you want it to be called. Direct the URL to ‘#’. Save the menu. Hover over the item and look at the little pop-up in the bottom left of your browser to find the ID of the menu item (or use Google Chrome dev tools). Note the ID.
Create a new javascript file called olark.js. Save it in your JS folder. Put the following code in it (be sure to replace
#menu-item-38872with the appropriate ID for the menu item you want to target).jQuery(document).ready(function($) { $("#menu-item-38872").on("click", function(e){ e.preventDefault(); // olark code here olark('api.box.expand'); }); });Then, in functions.php, enqueue the olark.js file by including the following code (be sure that the path to your olark.js file is correct).
// Enqueue Olark Script function olark_script() { wp_register_script( 'olark', get_stylesheet_directory_uri() . '/js/olark.js', array(), '1.0.0', true ); wp_enqueue_script( 'olark' ); } add_action( 'wp_enqueue_scripts', 'olark_script' );That should do it. If you have any problems, let me know and I’ll try my best to help.
I did not figure it out, but it eventually started working on its own. Maybe come back to it in a couple of days and see if it is working for you.
Forum: Fixing WordPress
In reply to: Add Javascript to Nav Menu?I figured this out. In case anyone else is looking for the same thing, here’s the code that worked for me:
// Live Chat Utility Link add_filter( 'wp_nav_menu_items', 'live_chat_utility_link', 10, 2 ); function live_chat_utility_link ( $items, $args ) { if ( $args->theme_location == 'utility' ) { $items .= '<li><a href="javascript:void(0);" onclick="olark(\'api.box.expand\')" class="livechat">Live Chat</a></li>'; } return $items; }Forum: Fixing WordPress
In reply to: WordPress Visual Editor Stripping HTML ChangesThat’s disappointing. What’s the point in being able to switch tabs then?
Forum: Fixing WordPress
In reply to: WordPress Visual Editor Stripping HTML ChangesThis is a problem on every post. Unfortunately, I’m building this site for a client who doesn’t know HTML that well. They’ll want to use the visual editor. I can’t tell them to just use the HTML editor. Kind of defeats the purpose of WordPress as a content-editor-friendly CMS, doesn’t it? Isn’t there a way to fix this?
Forum: Themes and Templates
In reply to: Can't Change Read More Link in Child Theme?I thought you meant I posted in the wrong thread. I’ve asked questions here tons of times about child themes and I’ve found help. Not sure how this question is different.
Forum: Themes and Templates
In reply to: Can't Change Read More Link in Child Theme?Alright, thanks.
Forum: Themes and Templates
In reply to: Can't Change Read More Link in Child Theme?I am using Reverie.
Forum: Fixing WordPress
In reply to: Footer Only Displaying on Home PageNevermind all. I’m a dummy. I forgot to check if there was anything in the footer widget.