137 reputation
6
bio website ComplexWaveform.com
location
age
visits member for 4 months
seen 2 days ago
stats profile views 3

May
16
comment wp enqueue style and style sheet depth
@MarceloNoronha in functions.php
May
14
comment wp enqueue style and style sheet depth
OP, make sure, if you go this route, that you put this code in a function and hook that function to the wp_enqeue_scripts action.
May
14
comment wp enqueue style and style sheet depth
Put it in functions.php
May
14
answered wp enqueue style and style sheet depth
May
8
comment How to get attachment id of background image?
Thanks for your response. I tried this and it returned false, though I'm not sure if I follow how to implement it. I tried to echo $bg_post, just to see if I got a value, and I did not.
May
3
awarded  Student
May
3
asked How to get attachment id of background image?
Apr
19
awarded  Tumbleweed
Apr
16
answered Crop image from get_theme_mod Customizer field
Apr
12
asked How to add vertical navigation from Foundation 3 to a Foundation 4 based theme?
Mar
29
comment How to execute a function from function.php in a javascript?
@MereDevelopment [This is the js] (github.com/dimsemenov/Touchfolio/blob/master/js/…) or in non minimized for. The non-minimized version has an error on line 413 btw. I will try using .replaceWith() and report back.
Mar
29
asked How to execute a function from function.php in a javascript?
Mar
6
comment How to set and use global variables? Or why not to use them at all
Marked as accepted as its what I am doing now though I may go with one of the strategies @MarkKaplun is suggesting below. Using get_template_part() is an interesting idea, but I'm not sure I want to have a dir full of short files like that...
Mar
6
accepted How to set and use global variables? Or why not to use them at all
Mar
6
comment How to set and use global variables? Or why not to use them at all
@MarkKaplun Awesome. Your first solution sounds like the best. I will experiment with caching, which will probably be necessary. I'm not sure why this is outside the scope of this stackexchange? The question is about PHP, but it turns out it has everything to do with how WordPress deals with globals. Also the case is specific to WordPress navigation menus.
Mar
5
revised How to set and use global variables? Or why not to use them at all
changed title slightly
Mar
5
comment How to set and use global variables? Or why not to use them at all
@Milo Also I want to be able to use these as links to various parts of the site in the text of the site, either in posts (if that works) or in page templates.
Mar
5
comment How to set and use global variables? Or why not to use them at all
@Milo That's what I started with, but know I have one function for top bar navigation; one function for a side bar nav which just grew to 4 different versions based on conditionals; and one function for a sub-nav in a page template and there are going to be more of those as this goes on. I can't come up with a sane way of combining all of those into one function.
Mar
5
revised How to set and use global variables? Or why not to use them at all
deleted 15 characters in body
Mar
5
comment How to set and use global variables? Or why not to use them at all
@Milo Excellent point. My actual problem is my theme has 4 different navigations (so far.) 1 that is a standard top bar, and 3 that only display based on certain conditions. They all show different combinations of roughly the same things and are in arbitrary orders and are going to change as the project goes on. My problem is if I hard-code them, I will have to hardcode the same thing over and over again, and then change the same thing 4 times every time something changes.