chrisguitarguy

Lexington, KY

christopherdavis.me

Age: 29

I work as a web developer for Enterprise clients and build web applications with PHP.

Connect

1d
comment How to use shortcode in js url
do_shortcode should not be used like this. Shortcodes simply execute a callback function with the provided arguments and content. If you want to execute that callback function in PHP, just call it directly (eg. the_shortcode_callback() instead of do_shortcode('[the_shortcode]')). Don't bother with the regex and other stuff that do_shortcode includes.
2d
revised How to convert the file path to a URL of the same file?
added 2028 characters in body
2d
answered How to convert the file path to a URL of the same file?
Feb
2
awarded Necromancer
Jan
11
awarded Favorite Question
Jan
10
comment Custom Loop through category menu to include sub categories
If this is a nav menu, why not just use wp_nav_menu and let it handle the hierarchical output for you?
Jan
4
answered wp_get_attachment_url with specific image_size?
Dec
29
awarded plugins
Dec
4
awarded Nice Answer
Nov
19
awarded Enlightened
Nov
6
awarded Yearling
Nov
6
awarded Yearling
Oct
26
comment Redirect non-admin users away from wp-admin/index.php (main dashboard page) to wp-admin/profile.php
There was a small typo in my code. See: github.com/chrisguitarguy/WPSE-Plugins/commit/… The code in this post and the plugin on github has been updated
Oct
26
revised Redirect non-admin users away from wp-admin/index.php (main dashboard page) to wp-admin/profile.php
added 1 character in body
Oct
25
comment Inserting Category programmatically
It should be fine. The only way you'll know if it's too many or its an issue is if your server starts to underperform when it's under load. Until then, it's not a problem worth worrying about.
Oct
25
answered Allow SVG in WP step by step
Oct
25
comment Inserting Category programmatically
If you have more than one category you can track each ID or just track a boolean value to mark that you inserted things. add_option('wpse206511_inserted_terms', true) for instance. Your call.
Oct
25
comment Inserting Category programmatically
Yep. You you just need to walk down the tree for each category. Start with the toplevel parent, insert next level parents, insert the child categories.
Oct
25
answered 'posts_per_page' in costum page type
Oct
25
answered Inserting Category programmatically
1 2 3 4 5