The hooks tag has no wiki summary.
-1
votes
0answers
13 views
hooks of qTranslate
Is there any ways to find out all hooks of qTranslate? I am thinking to add an action when a user clicks a flag to change the language. I've checked the cord codes of qTranslate, and it seems that ...
0
votes
0answers
12 views
One page site (returning from google) + history manipulation
I am making a one page site using wordpress.
The one page has all the menu pages linked into one, but there will be arbitary pages (landing pages) for subcategories and stuff at the moment.
I have ...
0
votes
1answer
33 views
Hooks - Query about WooCommerce plugin integration to non-compatible theme
I am quite new to WordPress and wish to learn more about hooks and how to use them.
Could anyone point out the necessary hooks in this page.php code to replace the markup in the following WooCommerce ...
0
votes
1answer
24 views
How to return hook data when multiple parameters are present?
What is the proper way of returning data to a hook when there is more than one parameter present?
Example
apply_filters('image_downsize', false, $attachment->ID, $size)
Attaching a callback ...
0
votes
0answers
15 views
Lightbox Post Pop-up on homepage [duplicate]
I've been working on sampression lite theme and what I want to achieve is when a post' thumbnail/read more link on homepage is clicked, a modal will pop-up ( similar to pinterest and this wp theme ...
2
votes
1answer
35 views
Display custom list of tags in post/page editor with hooks
I used the information posted on this blog post to display specific tags when editing a post. The editors on my site wanted the ability to display pre-specified tags instead of the most popular ones. ...
0
votes
0answers
16 views
Creating a new post every time an image is uploaded
I'm making this question because the one I found by searching seems not to work.
I have a custom post type project on my theme. When I upload an image via the media library in the wordpress backend I ...
1
vote
1answer
32 views
How do I handle multiple Submit buttons in plugin's option page?
I'm developing my first plugin for WordPress and I'm getting a grasp of the whole hook system. I'm now stuck on a (probably) small issue, that I could possibly circumvent, but I'm afraid of coming out ...
0
votes
2answers
22 views
prepopulate form from a hook within wordpress function.php file
I have a form that I created by simply using the HTML editor in the wp-admin backend for a page. I have some variables in a hook for that page, I would like to pre-populate some of the form fields ...
1
vote
0answers
30 views
Show message in media-new.php
I'm wondering if there's a way to show a specific message when user uploads a file using the wp-admin/media-new.php script.
So far I have this:
function my_uploads_notice(){
global $pagenow;
...
0
votes
1answer
34 views
Why enqueue styles on hook
Why do we need to enqueue styles on a hook, why not just enqueue them straight in like this?
wp_enqueue_style( $handle, $src);
the codex page gives an example of using a hook but doesn't explain ...
1
vote
1answer
40 views
Empty Super Cache programmatically (with ACF action)
I regularly use Advanced Custom Fields to create awesome backend interfaces for my clients (as I'm sure a lot of us do…). ACF includes an Options add-on that creates one or multiple global options ...
0
votes
1answer
86 views
Include WooCommerce 2's prettyphoto scripts on all site pages
So when WooCommerce updated to version 2 they replaced the fancybox lightbox scripts with prettyphoto. I would like to use this on all my wordpress site's pages, not just the product pages, but the ...
1
vote
1answer
45 views
How to remove a metabox from menu editor page?
I am not sure if it is much different for any page but I am wondering how to remove a metabox from the appearance>menu page without having to go into the wordpress core files and remove it. Is there ...
0
votes
0answers
39 views
How to add X number of products to woocommerce cart at once
I am trying to add x number of products input and button to my catalog page so I can select a number, then hit add to cart.
Is it possible to add in this function? The user will provide a number ...
-1
votes
0answers
59 views
How to hook into WooCommerce checkout process?
I need a way to add a hook so when a user completes checkout on WooCommerce, I can grab the user email address and any coupon code used, and do something with some custom PHP code. How do I go about ...
1
vote
2answers
84 views
Trouble understanding apply_filters()
In apply_filters()
apply_filters( $tag, $value, $var ... );
I'm having trouble wrapping my head around the $value and $var. I read the codex and it sounds like the $value can be modified, $var not, ...
0
votes
1answer
29 views
Extend WC_Product Class
I'm using Woocommerce, and I want to extend the WC_product class, I tried using
class xxxx extends WC_product { ... }
and hooking it to
add_action('plugins_loaded', 'my_callback', 0);
But using ...
3
votes
1answer
50 views
Is there an action for when permalinks are rebuilt?
In my plugin, I have a list of titles and permalinks in the options table. It's updated every time my custom post type is saved.
Since I'm saving permalinks the option data can become bad if the ...
4
votes
4answers
238 views
Import Wordpress XML File from Within Functions.php
I am developing a theme which has a different method of adding in content and so, the default install of Wordpress won't show any content because of this. I was wondering if it is possible to ...
0
votes
2answers
52 views
Theme not calling Jquery properly
I am developing a theme and I have called jquery along with other JS files from a theme-enqueue.php file. For some reason only the Jquery file that is hosted on googles servers is adding the theme URL ...
0
votes
1answer
24 views
How can I add a filter to a particular post format?
I have several post formats and I want to use add_filter selectively, applying the filter to some of the post formats but not all. When I do this in my functions.php file it affect all the post ...
0
votes
2answers
73 views
Theme Customizer not loading JS for live preview
I am currently working on adding options to the theme customizer. For the last two hours I have been trying to get the live preview working and I am trying figure out why my theme isn't loading the ...
0
votes
1answer
58 views
Hook to be used when creating a database table
I read the Codex and some other tutorials describing the process of creating a new table for WordPress.
I thing that the steps are pretty straightforward; however, I'm encountering a small problem.
...
0
votes
2answers
69 views
gform_after_submission content appears immediately after <body>, not in post body
I have the following function that successfully uses form fields (IDs 13 and 18) from a Gravity Form (ID 18) as parameters within wp_query.
This displays a list of posts with specific taxonomy terms ...
1
vote
1answer
65 views
Gravity Forms field entries into wp_query loop
I have a simple function that filters the page content when form (ID 18) is submitted. It simply displays the entry of field (ID 13)...
add_action("gform_after_submission_18", "set_post_content", 10, ...
0
votes
0answers
58 views
custom styling for woocommerce categories
I am using hooks and customizing the template files to use woocommerce. On my products page I want a list of categories along the top like this. I would even settle for a neat list of them where my ...
1
vote
2answers
59 views
Hook before inserting user into database
I'm working on airsoft website using woocommerce. One of my client's needs is to prevent a user to register if his name or mail is in a blacklist (I don't know yet if I'll use a csv file, a json or a ...
0
votes
1answer
49 views
Catch and display error on save_post action
I wrote this function that adds data to an external db every time a custom post called 'event' is created. How can I prevent the save from happening if this function returns an error? At the moment, ...
0
votes
0answers
33 views
getting a post id from a custom type post
changed a wordpress to use custom type posts instead of pages.
I'm Trying to update a plugin to work with this change.
currently I'm stuck with just getting the right id from the post
here's the ...
0
votes
2answers
109 views
Hooking into the post editing screen for an existing page only
I am working on a Wordpress theme that hides the default WYSIWYG editor and replaces it with a custom module system which is fine and dandy, but I've come to the realisation if someone were to use the ...
0
votes
0answers
60 views
How to add custom button to new media upload interface
I am developing a plugin and i want to add my own button to the wordpress media upload interface (WP version 3.5). Right next to the standard 'insert into page' button, i want my button to be there, ...
0
votes
0answers
30 views
Roll back / Undo all changes from a deleted WordPress user
Has anybody seen a way to roll back all changes made to all posts/pages by a particular user upon user deletion?
(only if that user is the last person to make a change on that page, not interested in ...
0
votes
0answers
13 views
Is there is any hooks that allow a Group admin to invite anyone to the group in buddypress?
I am looking for a hook or a code that will allow any group admin in buddypress to invite any member to the group without adding that member to his friends list.
Is that possible?
How to do it?
0
votes
0answers
38 views
Getting Auth and Id from wp-fb-autoconnect
I'm trying to access facebook id and auth token values within my custom page. I'm using the wp-fb-autoconnect plugin. I've tried settings these via the hook (in function.php):
...
0
votes
2answers
53 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
27 views
How to make plugin work in each template in wordpress
I am new to plugin development .I want to get all images of a particular page/post and want to show them as slideshow below the page ..Currently i am able to gather all images in media library and ...
1
vote
0answers
34 views
How to save the values of checkbox to the register setting?
<?php
function default_menu() {
<form action="options.php" method="post">
<?php settings_fields( 'sample_check' );?>
<input type="checkbox" name="sample" value="nofollow"/>
...
0
votes
1answer
26 views
Filter post before *editing*
I know there are a lot of hooks in WP for altering a posts content (and other fields) before the post is written to the DB upon saving; but what I am interested in doing is running my custom filter ...
0
votes
1answer
45 views
the_posts hook, which set of posts?
I want to modify search results. Currently I hook to the_posts and check wp_query->is_search to determine if I am looking at the search results page.
However, I noticed that the_posts is executed ...
1
vote
1answer
35 views
How do wordpress hooks respond to user interaction?
Embarrassingly big hole in my understanding!
When I've finished editing a post and click the big blue "Update" button, what happens next? In particular, how does the 'pre-post-update' hook (which, ...
1
vote
0answers
27 views
Hooks are not being removed in child theme
I have a hook file:
function load_admin_package(){
do_action('load_admin_package');
}
/*
* -----------------------------------
* Define hooks bellow
* -----------------------------------
*/
...
0
votes
3answers
53 views
Hook on trash post
I want to perform an action when I delete one of my custom post types, which hook should I use:
wp_trash_mycpt
or
trash_mycpt
My action should run solely when mycpt is in the 'publish', 'draft' ...
0
votes
1answer
12 views
Hooking in to an archive page?
I'm making a custom post type that I want to use in the form of a plugin - all pretty straight forward.
However, I want the archive page for this post type to look slightly different in the content ...
2
votes
1answer
89 views
Issue with get_theme_mod returning a blank value instead of the saved value
I have what seems to be a rather troubling issue with the get_theme_mod function in the latest version of Wordpress. Only on particular servers (of which meet all Wordpress requirements) the function ...
0
votes
1answer
65 views
Alternative to new_to_publish Hook for Custom Statuses
I am looking for the right hook to use for sending out an email notice when a post is inserted. However, I am using custom statuses (in this case 'holding') which doesn't seem to get hit with the ...
0
votes
1answer
32 views
Which hooks are essential for post templates?
Im in the process of building a very custom theme and Im beginning to work on the post templates, but I dont know which hooks are essential for them.
So like, I've seen (but cant remember where)some ...
0
votes
1answer
72 views
Restrict certain actions to plugin-specific admin menu pages only
I'm working on a plugin and want to restrict some things to my plugin-specific admin menu pages only. Therefore, I write the slugs being returned when adding (sub)menu pages into an array so I can ...
0
votes
1answer
67 views
Does the 'nav_menu_css_class' filter accept 2 or 3 arguments?
I've been using the nav_menu_css_class filter in one of my plugins, implemented as:
add_filter( 'nav_menu_css_class', 'wbwcrf_nav_menu_css_class', 10, 3 );
function wbwcrf_nav_menu_css_class( ...
0
votes
2answers
68 views
How to add style to a string of text throughout WordPress website?
I am building a site for a friend, the site has launched, now he tells me he wants his site name to appear green everywhere it appears on the website.
Immediately, I thought of the plugin SEO Smart ...


