Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

0
votes
0answers
186 views

Get User Login Data (date, time… )

I did my best looking for information about this subject. Your guidance is appreciated. My goal is to perform some actions based on the number of user logins on my website per month and login days ...
0
votes
0answers
61 views

personal_options hook on Wordpress multisite

I have a working script that hooks to user profile. This is my hook: add_action('personal_options', array(&$this,'show_bounce_email_warning_to_user'),10,1); As you can see it will show bounce ...
0
votes
0answers
184 views

How to hook into drag-and-drop / collapse-funktion from backend?

I am building a free theme for knowledgemanagement. At the frontend i want to drag and drop and collapse the elements (articles, widgets, ...). I look a lot of time to several tutorial but can't get ...
0
votes
1answer
70 views

Variable scope in plugin outside loop [closed]

OK so I'm trying to use the plugin "adrotate" outside of the loop for my frontend. I can access all the WP functions I need for everything else using ...
0
votes
0answers
127 views

Can't update an option when the publish_post action is fired.

I'm using Tom McFarlin's Plugin Boilerplate, and I'm facing this huge problem where I can't update an option when the publish_post action is fired. I have a function that hooks into the publish post ...
0
votes
0answers
40 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
0answers
19 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 ...
0
votes
0answers
65 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 ...
0
votes
2answers
69 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 ...
0
votes
1answer
177 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 ...
0
votes
3answers
393 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
0answers
228 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 ...
0
votes
0answers
50 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
1answer
33 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 ...
0
votes
1answer
49 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
2answers
206 views

How to use the 'comments_number' filter?

I'm not sure how to use this filter. Could someone show me an example? I'm trying to change ('0', '1', '%') to ('0 Comments', '1 Comment', '% Comments'). I'm using this function to get the comments ...
0
votes
1answer
34 views

Meta boxes not showing up

Okay so I'm trying to render a meta box. This is what I have so far, trying to keep it as basic as possible: add_action('load-post.php', 'ad_templates_callback' ); add_action('load-post-new.php', ...
0
votes
1answer
130 views

Wordpress image resize hook

Any relevant help will be appreciated. I want to make rounded cornres on images off certain image size. For example I have add_image_size('xx', '320', '320', true); Can I hook to this function and ...
0
votes
3answers
89 views

How to hook into publish_posttype?

I'm trying to hook into WordPress publish. The code below is what I'm using, but it doesn't appear to be running. I have it in a plugin file that I deactivate/reactivate each time I make changes ...
0
votes
1answer
162 views

Incorrect data after modifying post using backlink from wp_die

I have hook: function myHook( $post_ID, $post ) { $data = get_post_meta($post_ID, 'data', true); if ($data) { _log('data:' . $data); /* here some checks and validation */ ...
0
votes
1answer
87 views

How do I replace title with my plugin?

I am developing a plugin for WordPress 3.5. My blog's default title is "Test". Here is some code of my plugin: add_filter('wp_title', 'my_replace_title'); function my_replace_title(){ return ...
0
votes
1answer
76 views

Function is Missing an Action Hook

I have tied an action into a status change, which works on the backend. However,using a frontend button for updating post status does not trigger the ...
0
votes
1answer
221 views

frontend show edit profile with selected custom options

So I have many custom user profile fields. When I use do_action( 'show_user_profile', $profileuser ); hook it displays all custom user profile fields.. But I would like to show only certain fields. ...
0
votes
2answers
143 views

Query author's posts & posts that have author's id as meta value

I am trying to get posts with an author's ID as a meta value in the author.php template using additional request parameter. For example I want posts with john's ID as a meta value using a request ...
0
votes
1answer
402 views

Add custom fields after post/page title

I am using the Headway theme, and I need to add custom field code to page & posttitles. This is what I need to be able to do. The red button will be added through a custom field. It needs to be ...
0
votes
1answer
227 views

How to access variables in the function where apply_filters() is called?

I am trying to filter some data based on whether a variable from within the function that calls apply_filters() is equal to specific value. That variable is not passed to the apply_filters() ...
0
votes
1answer
75 views

Looking for Hook that is fired after a plugin or wp upgrade is installed/updated

I'm trying to write some code to sms me whenever someone updates/installs a plugin, or updates the WP core, but I can't seem to find a hook that gets fired when this happens. Does anyone know if there ...
0
votes
1answer
248 views

How to use the password_reset hook to validate new password and display error

When a user resets their password via the link in the password reset email, I know I can use the password_reset hook to get the user object and the new password. I want to validate the new password to ...
0
votes
1answer
71 views

Hook when new CPT published AND postmeta inserted

I would like to know if there is a hook that fires when a new CPT is published and its postmeta has been inserted. I was using publish_mycpt but found that the postmeta wasn't being saved at that ...
0
votes
1answer
258 views

Plugin init hook

Is there a plugin init hook that runs whenever the plugin is being loaded? I'd like to link the functions for requiring files and defining constants to such a hook if it exists.
0
votes
1answer
151 views

Force resize for all video content

I'm looking for a way to force all video content on my site to scale to 100% width and I'm hoping to avoid using any additional javascript. Is there a filter or function that I can use to accomplish ...
0
votes
2answers
62 views

Which hook should be used in this case?

I'm using the enter_title_here filter to modify the 'Enter title here' text in a custom post type, question is what hook should I use to trigger this function? I have used admin_enqueue_script as a ...
0
votes
1answer
410 views

How to display message (with switch_theme hook) after deactivating My theme?

I'm able to display a message by activation of my theme with the 'new' after_switch_theme hook this way: function themeActivationFunction($oldname, $oldtheme=false) { $msg = ' <div ...
0
votes
1answer
323 views

Get user logged in status from within a plugin. $current_user not defined

I'm writing a plugin which adds a class that creates an endpoint for third party software to make API calls to and check if the current user is logged in. Here's a stripped down version of what I'm ...
0
votes
1answer
250 views

Redirect back to origin page after using get_delete_post_link()

I need to implement frontend and backend redirection after delete specific post using get_delete_post_link(). Which hook i can use? Any advice would be appreciated. Something similar to : <?php ...
0
votes
1answer
241 views

Create action running on trashed_post hook to modify post_meta value

I have a custom post type that always do math operation to its post_meta and other custom post type post_meta. For example: post-type 1 = cpt_product_order post-type 1 post_meta = ...
0
votes
1answer
64 views

Checking url from plugin

I'm trying to change the login url from wp-login.php to simply 'login'. I'd been looking through another plugins source to find ways of doing it. Some of the applicable parts that I've got so far: ...
0
votes
1answer
193 views

OOP Plugin: Where should I place the action hooks in the class?

Where in my admin class should I place the action hooks for adding css, scripts and the add menu page? In the __construct? Or should they be placed in a method?
0
votes
1answer
196 views

Fire a hook programmatically

Is it possible to fire a wordpress hook programmatically? Specifically I'd like to have control of wp-insert-post.
0
votes
2answers
377 views

Unhook the comment form in Buddypress

Im trying unhook the comment form found in the functions.php of the deafault buddypress theme so I can change it a bit. I placed this piece of code into my child theme functions.php but it didn't ...
0
votes
1answer
1k views

NextGEN Gallery: Adding drop-down menu widget to gallery view without modifying plugin code

In NextGEN Gallery, I am able to add a dropdown menu that lets users filter a gallery to only show images that are tagged with a specific ngg_tag, simply by adding this to view/gallery.php in the ...
0
votes
1answer
117 views

Where should I hook into admin?

Where should I hook into the admin backend to check and see if the user is "active" as defined by the Membership Plugin. Or in other words, where can I hook into the WP admin header to check an ...
0
votes
1answer
230 views

Why does hook priority affects admin menu permission error?

On this answer, there was this final comment For future readers, Roland's issue was a hook priority issue. Changing priority from 10 to 11 fixed it in his case The answer seems already closed, ...
0
votes
1answer
72 views

Change Title Type

I'd like to change the title field of a post in admin panel. I'd like this field was "textarea" instead of being "input type='text'". Would it be possible through any hook in functions.php? Thanks ...
0
votes
1answer
344 views

Filter dashboard custom post listing by user

Did some research, but I was unable to implement it after all. I have a custom post type accessible only by a new role. I want to filter the post type listing so that each user should see only his ...
0
votes
1answer
507 views

Is it possible to Hook/Filters Attachment Creation?

Is it possible to hook or filter the attachment creation process? More specifically is it possible to hook into the attachment creation so that I may parse the attachment’s filename, populate the ...
0
votes
3answers
574 views

How to retrieve the postID in a “image_send_to_editor” hook function?

Here is my function: function insert_img_rel_attrib( $html, $id, $caption, $title, $align, $url ) { $postID = ??? $rel = "<a rel='shadowbox[".$postID."]'"; if ($url) {$html = ...
0
votes
1answer
390 views

How to display a link in the footer section

i'm using the BAAP Mobile version plugin and the footer link that switches between desktop and mobile version is being displayed outside of the wrapper>footer divs. Is there a hook or a method to have ...
0
votes
3answers
655 views

What hooks to hook onto for automatic cache clearing

I have a WP-site with not that many writes, but quite a few reads and a few specific hotspots in the templates that I'd like to cache pretty aggressively with my own PHP-caching mechanism. I could ...
0
votes
1answer
44 views

save_post not working

In order to create (or update, whenever a post is updated) a unix-timestamp meta, I used following code to fire on save_post. I pasted this code in functions.php. But I believe this is not working, ...