Tagged Questions
0
votes
2answers
49 views
Hook 'wp_enqueue_scripts' priority has no effect
In a theme I am working there are up to 3 Stylesheets. I am using the hook 'wp_enqueue_scripts'. The order of the stylesheets is important for overwriting styles.
I have a code like this:
...
0
votes
1answer
69 views
“admin_enqueue_scripts” hook or $_GET['page']?
When adding a function to "admin_enqueue_scripts" a hook is passed to the function. It looks like this "toplevel_page_nameofyourpage". That works great, but how is it different from checking the $_GET ...
0
votes
1answer
379 views
How do I implement the Wordpress Iris picker into my plugin on the front-end?
This question here is asking the same question as I am, but there were no adequate answers nor a selected correct answer so I am asking again hoping if I ask in a more coherent manner I might get a ...
0
votes
3answers
284 views
What can I hook into after_setup_theme?
I'm wondering what can I or should I NOT hook to after_setup_theme? I'm wondering because I have been told that I shouldn't hook wp_enqueue_style to it, but I have seen other places using it to hook ...
0
votes
1answer
179 views
wp_enqueue_script before wp_head
If this works (and it's the way people do in a bunch of themes around the web):
<html>
<head>
<!-- stuff -->
<?php wp_enqueue_script('jquery'); ?>
<?php ...
1
vote
2answers
307 views
Enqueue script from widget method (of extended WP_widget object) possible? (slightly different from other variations of this question)
I am creating a widget plugin that a user could potentially use multiple iterations of the widget multiple times on a single widget-area / multiple widget-areas on a single page. Because of its ...
1
vote
2answers
62 views
Same Conditionals Not Working on Two Different Hooks
Everyone!
I am new to WP and trying to build a plugin. I have the following codes working properly:
add_filter('the_content', 'say_hello');
function say_hello($content){
if(is_single() || ...
6
votes
3answers
2k views
How to enqueue scripts on custom post add/edit pages?
I'm trying to enqueue a JS script only when someone is adding or editing a custom post type I created called "recipes". Currently the script works ok when I do this:
if (is_admin()){
...
18
votes
1answer
3k views
Where is the right place to register/enqueue scripts & styles
I am using WordPress 3.1.4 by now. I am confused with where (which hook) do I use:
to register and/or enqueue
scripts and styles
on front- and back-ends?
Questions:
Which are right hooks to ...