0
votes
2answers
14 views

Transition Post status not working

I have a plugin which uses the transition_post_status hook, to fire a custom function on post update. But I don't know why its not working. Here is the code add_action('transition_post_status', ...
1
vote
2answers
39 views

Hook to generate a dynamic sitemap with “All in One SEO Pack” Plugin

Besides the urls of posts, pages and categories, I need my site's sitemap to include the urls of various pages that display data coming from an external source other than the WP database (Rails API). ...
4
votes
1answer
65 views

Changing the “Plugin Activated” Message Default

Whenever an administrator in WordPress activates a plugin, upon the reload of the plugin page, a notice will appear upon successful activation reporting "Plugin Activated". Is there a way to change ...
-2
votes
1answer
29 views

How to place plugin hook in a wordpress template

In many WordPress plugins, there are installation directions to add <?php do_action('plugin_name_hook'); ?> in your theme's templates. Where exactly do I need to place this code and what should ...
0
votes
0answers
52 views

Contact Form 7 to web service

I wonder if anyone can help me with something that's driving me crazy. I'm trying to implement a series of forms that will write to a CRM and the data must be passed as XML. I'm not particularly ...
1
vote
3answers
113 views

What are the benefit in adding hook in the init() hook?

I see a lot of plugins using this approach to add a new hook, e.g. add_action('init', function() { add_action('SOME_LATER_HOOK', xxx); add_filter('SOME_LATER_FILTER', yyy); }); Why they don't ...
0
votes
1answer
28 views

change output location of plugin function using a custom hook

I'm running the YouTube Video Fetcher plugin and it fetches youtube videos and displays it on your website. However, instead of displaying the video after the post, I want to hook the code into a ...
0
votes
1answer
17 views

Can my hooked uninstall class function access a global var declared in main plugin file?

My current setup is as follows... In the main plugin file, these two hooks are set (not inside any class): register_activation_hook(__FILE__, array('DG_Setup', 'activation')); ...
0
votes
1answer
27 views

How can I add a Custom Button to Add or Edit post / page next to Add Media?

I'm trying to add a custom button nearby the Add media on the wordpress Add and Edit Post/Page. How can I do that? Thank you very much for your help!
1
vote
0answers
47 views

How can I register a hook for all Custom Post Types that are published?

I'm developing a plugin. I want that when every Custom Post Type is published, a hook is called (where I send an email notification to the administrator). I know I can use: ...
0
votes
0answers
28 views

Cart Discount when applied to the cart doesn't show the correct amount in Order Total using Woocommerce in wordpress [on hold]

I have being creating a new woocommerce plugin that will provide an option to the apply discount on top of the cart page. Now when there are products in the cart, the user will click on the Apply ...
0
votes
1answer
40 views

password_reset hook is not working

I am developing a plugin where a MySQL user is created with username same as WP-username and password is entered by user using form . Now If the user resets its password in WordPress then the same ...
0
votes
1answer
89 views

The Hook registration_errors was not called

I can't validate the custom fields in my plugin. I want to skip some registration on WordPress. My code snippet is here: add_filter( 'registration_errors', 'reg_user_register', 10, 3); function ...
0
votes
0answers
21 views

Plugin constructor called multiple times

I have plugin with the following structure - class emailPlg { static $tableName; static $pluginDbVersion = 1.0; function __construct() { global $wpdb; ...
1
vote
1answer
51 views

Filter or action hook to insert content on admin pages before </body> tag

I am developing an administrator plugin and want to be able to write some HTML content just before the last body tag . This content will initially be hidden then displayed with javascript when a user ...
0
votes
0answers
27 views

How to re-run the main query based on meta data value?

When a user requests a custom post url like */books/best-book-eva, I want to (with a plugin) hook in before the page is displayed (and the main query run if possible) check that posts meta value ...
0
votes
2answers
38 views

What hook can I use to modify custom post data before it is displayed on the page?

I need to check if a certain value is true in the post_meta right after the wp fetches a custom post from database, If it's false I need to modify/add some data to the post and then display the ...
0
votes
2answers
23 views

How to change value of $menu_class in ep_nav_menu?

How can i change value of $menu_class parameter in wp_nav_menu() so that I can give a special css class to one of items in menu for example "Home"? here is some code but they didn't show me the ...
0
votes
0answers
20 views

How to change style a menu item in plugin?

I want to assign specific style to a specific item in navigate menu like "Home" but in plugin not in theme. I think I must write something like this in my plugin: function change_home(..){ if($item ...
0
votes
2answers
139 views

Reposition Woocommerce Message

I'm trying to reposition the messages in my Woocommerce theme. For example the successfully added to cart message. They appear to automatically be placed at the very top of where the woocommerce ...
3
votes
1answer
61 views

Disallow a user to post in certain categories

I am writing a plugin that will disallow user to post in certain categories. I am trying to display an error message to the user when he tries to post in the restricted category and also want WP ...
0
votes
1answer
133 views

Plugin custom Action Hook not working

I am trying to create one basic plugin where I want to create my own action hook. Here is the code for the same. <?php /* Plugin Name: Demo Plugin Version: 1.0 */ do_action('basic_action_demo'); ...
0
votes
1answer
296 views

woocommerce product attributes

Forgive me if someone has asked this before, but i am trying to get some attributes displayed next to displayed content of product. I see the hook woocommerce_before_single_product_summary that ...
1
vote
1answer
3k views

How to customize woocommerce related products?

I have the following lines of code in my website that will display the related products at the bottom of my single product page in WooCommerce... functions.php: // display upsells and related ...
0
votes
1answer
25 views

How to create and use Custom hooks

I am newbie in wordpress. I have just created contact us plugin for my own project. In my plugin I have used many functions you can take a look of my code. I want to make this plugin based on custom ...
0
votes
1answer
617 views

How to add a new product type on woocommerce product types? [closed]

I want to add a new custom "product type" to woocommerce plugin: Tried to duplicate one of currently exist product type files (woocommerce template structure) as a new file (file name and inside ...
0
votes
0answers
153 views

How to add dynamic text to the product page in Woocommerce [on hold]

I'm looking to add text to the product page aside from the 'short description' text, that will not appear on the category page. I cannot determine the best way of going about this. I thought about ...
0
votes
0answers
68 views

functions.php conditional output for a single plugin

hope I've asked this correctly. Bizarre situation. I have some non-breaking spaces in my titles for typography reasons. They are added automatically where required in place of normal spaces by the ...
1
vote
1answer
39 views

Inserting above the comment template

I want to insert content, just above the comment template.I have tried all the word-press filters and hooks but failed. I want to insert the content above the comment template, I mean above all ...
2
votes
2answers
1k views

Add subtitle to Woocommerce product title

I'm using WooCommerce on a site built with Pagelines Framework. I need to have a subtitle/customisable field appear under the product name anywhere it appears in the site. As it is, WooCommerce ...
1
vote
1answer
86 views

Determine plugin name from within plugin_action_links filter

Is there any way to determine what plugin the plugin_action_links filter is addressing when it processes the filter? I'm trying to add some actions for each plugin on the /wp-admin/plugins.php page. ...
0
votes
1answer
52 views

How to hook into action/filter call

I'm about to create a very simple logging plugin. Every time an action or filter is fired I need to log it to the file. The idea is that we will be able to see exactly which actions and filters are ...
0
votes
1answer
38 views

how to change automatic placing of social plugins below content?

I'm wondering if it possible to change the automatic place below the_content() function; this is becuase I`m displaying custom information fields, but activating the social plugins which have not it´s ...
0
votes
1answer
225 views

WooCommer Product Category Loop - How to change the display order of the rating and price?

I want to do a very very simple thing : To re-order the display of the rating and price information on a WooCommerce product category loop. Now in the product category page I got 5 products, all of ...
0
votes
1answer
192 views

Insert new user with form submit 'init' hook

I'm posting a form to insert a new user and hooking my function to 'init'. This code is in my mu-plugins folder. The user gets inserted fine, but the page is not loaded after wards. My form action ...
0
votes
1answer
79 views

Find out if request is for custom post type archive before query runs

I am writing a plugin that is modifying the RSS2 feed for a podcast that uses a custom post type. After the query runs (on action hook template_redirect; See this question for why), I'm checking to ...
0
votes
1answer
70 views

Quick press publish post hook

To execute a function during publishing post publish_post action hook is used. But what is quick press post publish hook?
0
votes
1answer
28 views

Prevent plug-in scripts on a specific template?

I have a plug-in which is interfering with my Google Map Embed in the template I'm using for my about page. Is there a way to prevent that plug-in from hooking in all of it's script files through ...
0
votes
1answer
235 views

using wp_footer hook in a plugin

I'm using the wp_footer hook into the plugin and it doesn't work, but when I copy the code to the "functions.php" file of the active theme it does work, what is the possible problem in this situation ...
0
votes
1answer
143 views

Flipping Book PHP Code? Any experience?

Hi there guys quick question, using FlippingBook and calling a gallery within a page or post is with something like this: [book id='1' /] but I want to call the gallery directly from my code, so is ...
0
votes
0answers
81 views

Woocommerce - Append custom field after price in content-single-product.php

I need to append a custom field called unit_description after the price on the single product page so it would read e.g. $7.00 per sandwich. I'm thinking it would begin with: remove_action( ...
0
votes
0answers
69 views

Add Media button is not showing ONLY when editing a page/post - shows for new ones

I am aware that this is very likely caused by either the 'Role Scoper' or 'Revisionary' plugin on my installation however I need both plugins so telling me to deactivate them probably won't help much. ...
0
votes
0answers
31 views

Plugin for taxonomy nested-set descriptors?

I'm trying out the Ultimate Taxonomy Manager plugin, and I would like to run "cascading" queries against taxonomy metadata. For example, I'm defining ad unit IDs that can be overridden on a ...
1
vote
2answers
24 views

Is it possible to add an action to the currently running action?

My question is very simple but I haven't found this answer yet. Here's an example: class MyClass { public function __construct(){ add_action('init', array($this, 'init')); ...
0
votes
0answers
232 views

WOOCommerce How to Set Up Check Out Page Custom Field Dropdowns with Auto Complete (like other fields)

I'm trying to set my custom field that I've created to display the same as how Countries and States are set up. I.E With the styling, and where a user can start typing in the first few letters of the ...
0
votes
1answer
138 views

Remove rewrite rules generated by plugin during deactivation‎

I have a simple plugin like the following add_action('generate_rewrite_rules', function ($wp_rewrite) { $wp_rewrite->rules = xxx + $wp_rewrite->rules; }); if (is_admin()) { ...
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 ...
1
vote
2answers
974 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
0answers
175 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 ...