1,493 reputation
420
bio website about.me/adam.bosco
location San Luis Obispo, CA
age 24
visits member for 2 years, 3 months
seen 2 days ago

Level 6 Dire Code Monkey


Feb
23
revised debugging js scripts
added 804 characters in body
Feb
23
revised debugging js scripts
added 804 characters in body
Feb
23
answered debugging js scripts
Feb
23
comment debugging js scripts
Additionally, if you are developing or modifying a theme this code should be in a functions.php file - not functions.js
Feb
23
comment debugging js scripts
For simplicity sake, let's just cut out the wp_register_script() entirely and use wp_enqueue_script() alone - it will register the script itself if it sees it's not already registered. Additionally, you shouldn't have any calls to wp_enqueue_script() outside of a function hooked to the 'wp_enqueue_scripts' action - the Codex mentions all of this, don't be afraid to dig ;) . It would also still be helpful if you could share the properly functioning script tag that you are attempting to reproduce with WordPress functions.
Feb
23
comment Sidebar menu, different parent and child pages
Ah... well you could still actually have but one menu and simply hide the irrelevant parts. The way I see it, to accomplish what you're asking likely requires 2 custom templates to cover the pages that are true descendants of a "category" page... That shared page does make things rather tricky. I'll roll this around in my head, and hopefully have something for you tomorrow
Feb
23
comment debugging js scripts
Your code as it's written isn't attempting to do "the same thing" as a script tag in the header - when you're using wp_register_script() you're passing arguments to print your script in the footer - not the header - for starters. Additionally, when you call wp_enqueue_script() with all those empty strings, you're over-writing many of the arguments that you set in wp_register_script()... I recommend spending some time reviewing the Codex entries for these two functions before we troubleshoot this further.
Feb
17
comment debugging js scripts
Could you add the script tag that you are using in the head section to enqueue the same script? Have you enabled WP_DEBUG, and do you receive any PHP/WordPress error messages? Have you tried registering the script to print in the header instead of the footer (by setting the last argument of wp_register_script() to false instead of true)? I'd also recommend setting the $version argument to false rather than an empty string '' while debugging this issue. Are you properly calling wp_enqueue_script() within a hook attached to the wp_enqueue_scripts action? In what file is this?
Feb
17
comment Sidebar menu, different parent and child pages
Thanks for clarifying, I see what you're getting at... I've rephrased your question in the "language of WordPress" - did I manage to detail everything you wished to convey?
Feb
17
revised Sidebar menu, different parent and child pages
Clarified the author's intent. The question is still of debatable quality and potentially a duplicate, but more work will be done to address these factors.
Feb
16
comment Get meta info related to current post
Review the Codex entries for the_title() and the_permalink() - you'll note they make use of two additional functions, get_the_title() and get_permalink(), to which you may pass a post ID in order to retrieve the corresponding information.
Feb
16
suggested approved edit on Sidebar menu, different parent and child pages
Feb
16
reviewed Reviewed Sidebar menu, different parent and child pages
Feb
16
comment Sidebar menu, different parent and child pages
Welcome to the Stack Exchange community! I'm still really confused as to what you are attempting to accomplish... What constitutes a "topic" and an "item," for starters? Are "topics" categories or tags or another taxonomy of some sort, and "items" posts/pages? You call "Item 3" a "generic parent page," but then seem to illustrate that it's a child of other "topics" and has no children of it's own. It may help to further describe an example of the actual use-case that you are working towards - what content, specifically, are you organizing? How does the user "keep the sidebar menu?"
Feb
16
answered Get meta info related to current post
Feb
11
comment enqueue style google fonts in functions.php in array?
Regardless of whether or not there are valid use-cases for doing something like this, I think we can all agree to strongly recommend against it - a single font often exceeds 50KB and many surpass 100... we're talking about loading more than 14-30MB of fonts in a single page load. That's more data than an entire WP installation. Whatever you're attempting to accomplish, there is almost certainly a better way to achieve it. Lazy-load them as needed, pre-render font previews into images, etc. Strive to avoid hitting end-users with a 30MB font download when the content only uses 0.07MB O.o
Feb
11
comment Tags and Templates with Plugin Conflict
Awesome, Requin - glad it all worked out ;)
Feb
11
comment How to prevent funny characters on Home Page
Awesome @tammy! Glad you got it worked out - thanks for taking the time to share your process and solution. W3 Total Cache can do some pretty awesome things, but getting it and your server environment configured properly can take a lot of time, research, and head-scratching - thus why both the developer as well as third parties sometimes offer to configure the plugin for a premium! If you ever go back, I recommend starting small and building upwards - disable every W3TC feature and enable them one at a time, examining every configuration option and verifying stability each step of the way.
Feb
5
comment How to prevent funny characters on Home Page
I'm out of my depth, but that you only receive these characters on subsequent loads makes me suspect some sort of cache failure. Do you have any plugins installed/have you tried disabling all plugins? I would also try disabling any caching features provided by your webserver.
Feb
5
comment Enqueue Style in Functions.php
Your newer question is technically identical to this one - in both scenarios your code is not functioning correctly due to premature use of conditional tags. I've provided a more detailed breakdown of the issue on the other question, however I feel these two questions should be reconciled into a single, more general question.