Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

0
votes
1answer
43 views

Getting all post/page IDs related to a soon-to-be-deleted tag/cat

When deleting a tag, category or other term I would like to get the IDs of the posts that are related to the term before deletion. Wordpress uses wp_delete_term, which is found in taxonomy.php, to ...
0
votes
1answer
102 views

theme functions (hooks)

This question was already asked in WordPress, but there was no answer for it. Just wanted to try in this forum if anyone knows about it because i have also same question. want to edit my theme ...
0
votes
1answer
37 views

Given a page ID, how to display entire page (header/content/footer/sidebars) from a plugin hook

Given a page ID it it possible to display the page content from within a plugin hook. I would like to know if it is possible to display the entire page given a page ID ...
0
votes
2answers
65 views

Wrapping my head around add_filter

this is a very general question, which I have really researched. Maybe I'm just being stupid, but I can't quite get when I can use a filter. After some messing around earlier, it seems I can take any ...
0
votes
1answer
49 views

What hook to use to redirect based on $post

Trying to add an action to redirect based on if user is not logged in and is accessing certain post types. Problem is, during template_redirect, $post is NULL and other ones the headers seem to have ...
0
votes
1answer
193 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 ...
1
vote
2answers
173 views

How to update WordPress core or themes and still have my child theme hooks work

I made a child theme based on the WordPress twentytwelve theme (i.e., the WordPress 'twentytwelve' theme is its parent). Some of the modification were done very simply by overriding style, using my ...
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
0answers
20 views

How to return a different page than the one requested

Description of the problem I am now developing a plugin whose purpose is to change the contents of the page a user requested depending on different variables (like, for example, user's location). By ...
1
vote
2answers
143 views

How to pass arguments to add_action() [duplicate]

I declared an action for a single event in Wordpress which accepts an array as an argument: $asins = array(); //I had to declare this since I'm getting a notice of undefined variable if I don't ...
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?
1
vote
1answer
203 views

Post Content, Special Characters and Filters

I added a hook to the_content. add_filter('the_content', 'edit_the_content'); function edit_the_content($content){ return $content; } Pretty simple right? However, when it output $content from ...
12
votes
2answers
267 views

How do filters and hooks really work in PHP

How does filters and hooks actually work in WordPress? I'm asking about something advanced. How is it implemented in PHP? E.g how does it collect all the hooks from the different plugins and "attach" ...
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
0answers
45 views

How to handle change the appearance of 'categories' box on dashboard?

I have a site with hundreds of categories, and when I come to edit some menu on wp-admin/nav-menus.php it is really difficult, because in the categories box there a few pages, with something like 20 ...
0
votes
0answers
16 views

Turn off xml rcp for certain users

I built a web app with wordpress that receive inputs via ifttt.com. Ifttt uses the xml rcp protocol to send messages to a worpdress based site. Specifically, ifttt creates a new post when certain ...
0
votes
1answer
124 views

Capture post content before page renders

I'm trying to mesh Mustache Templating Engine with WordPress. So far, I have been very successful using the_content as a filter to parse my template tags e.g. {{ something }}. However, if let’s say, ...
0
votes
1answer
74 views

Hooking get_posts()

On a site this is a plugin that uses get_posts() to make a list of pages. The list is used to create a list of pages and create next page and previous page links. ( ...
-1
votes
2answers
137 views

Hook with jquery script is not working in wp-admin [closed]

This is the hook and script Im using, the jquery script itself is working as you can see in this fiddle: function my_custom_admin_footer(){ echo ' <script ...
0
votes
1answer
40 views

How to center oEmbedded content

I understand you have to paste the link that you're embedding without any code wrapping around it, but how do I force the embedded content to be centered? Currently, the default is aligning to the ...
0
votes
1answer
238 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 ...
1
vote
1answer
1k views

Custom Blog Post Listing in Genesis Sample Child Theme

I want to add several images and divs and also customize the look of my Blog post listing... But i can't find the way to do it. Here's the Blog Template code <?php /* WARNING: This file is ...
0
votes
1answer
77 views

admin_notices after register_uninstall / deactivate_hook

I've successfully added admin notices to display on register_activation_hook, and when the plugin updates, but I'm not seeing any way to display admin_notices after the uninstall or deactivation ...
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 ...
2
votes
2answers
416 views

How to create notification on frontend using heartbeat api for multiple custom post types

How can I get correct action hook on publish_posts for multiple custom types ? I have a following problem, I can use this hook for posts or single custom post_type, but I don't know correct hook for ...
0
votes
1answer
275 views

contact form 7 :create shortcode usable in email message

i have this (test ) function that adds a redirection bouton function bouton($atts, $content = null) { extract(shortcode_atts(array( 'lien' => '#', 'couleur' ...
0
votes
0answers
548 views

Add jQuery Validation in Gravity Forms Form

So I have some jQuery functions that adjust my column layout on window load and window resize. They are inside a file called bp-columns.js that looks like this: jQuery(window).load(function () { ...
1
vote
1answer
160 views

How do I successfully create a hook for an email override?

I'm creating an online apartment rental application using Visual Form Builder Pro. I need to have completed forms go to certain managers based on the property selection. Once a user selects a ...
0
votes
1answer
71 views

How to conditionally add a widget via a hook in functions.php

I'm trying to add some widget areas to the homepage only using functions.php - so that the client won't be able to accidentally destroy shortcode when editing the page. I've registered the widget ...
0
votes
1answer
244 views

Wordpress: Apply filter/hook to a particular sidebar widgets?

I'm developing a theme that has more than 5 different sidebars and I want to apply a function to a particular one of them for styling purposes. Basically, the function will modify it's params using a ...
0
votes
0answers
126 views

Replace Short code in Visual Mode - WYSIWYG editor

I write a code in functions.php to make shortcode [template_url] and [site_url] in WYSIWYG editor. Its works fine for front end. add_shortcode('template_url', 'replace_shortcode_template_url'); ...
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( ...
1
vote
1answer
136 views

How can I replace an oEmbed URL in post with actual embed HTML

What I want is to get the output of the Twitter oEmbed system into my actual posts. IMHO the embed output itself is high-quality, semantic HTML and I'd rather have it inside the post than in the embed ...
1
vote
2answers
115 views

ajax, right way to do it and make it works?

I'm new to wordpress but have knowledge in php and javascript. I read a lot of blogs about ajax call in wordpress. I also read some posts on this forum. However, I still have some difficulties making ...
0
votes
1answer
78 views

What filter or action to replace comments or add new comment system

I am looking to make a plugin for my site, which either replaces the current comments in a post or adds an additional comment system. I am getting the comments from a custom RSS feed from my forum ...
0
votes
1answer
324 views

List posts based on First letter of Posts

I want add a Pagination [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] .......[Z] Easy Post Title - By Admin on 2013 post content....bla bla bla... Example Post - Another Test ...
0
votes
0answers
68 views

Conditionally enable autoplay when using oEmbed in a custom widget

I'd like to have all oEmbed urls (youtube, vimeo, soundcloud, etc.) behave as they usually behave, with one exception. In my theme I've created a widget that gets data from a given post. The post ...
0
votes
1answer
31 views

Does update_comment_meta hook exists?

Its been 3 days now I am fighting to resolve the issue here: An action hook where a comment meta is updated I am pretty sure, even if I am a beginner, that the hook update_comment_meta doesnt ...
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
1answer
92 views

An action hook where a comment meta is updated

By analogy to the hook on post meta update, I use the following code for hooking when comment meta value is updated. My comment meta key is "consider" and can have 2 values: 0 and 1. My Goal is to ...
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
1answer
41 views

read more, even if excerpt not trimmed

I am using the excerpt field (Not the tag, because the excerpt also serves as a lead paragraph). I altered the "more"-link to be an arrow >. function fabs_excerpt_more( $more ) { return ' <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
47 views

why the same code got different results when using query_posts in functions.php and index.php

I am using WordPress 3.5, and my blog sites have many registered users. After they log in, I want them to see just their own posts, not others. So I added this to my functions.php, but I get a blank ...
0
votes
1answer
209 views

Hook in a sidebar widget and add some markup

I'm looking to hook into a sidebar widget, this one in particular loads the members. All I'm looking to do is add a link into the widget, I managed to get a result but it's not quite right. It ...
0
votes
2answers
204 views

!is_admin() condition turns true in admin pages

I need users to redirect to login if not logged and once they are, redirect them to backend if they try to see front end pages. This is my code: add_action( 'template_redirect', function () { ...
0
votes
2answers
115 views

after_setup_theme is called three times

Trying to find an issue with my theme that is not related with this question, I've started the debugger and enabled a breakpoint to the first line of a function hooked to after_setup_theme. Here I've ...
1
vote
2answers
141 views

Add site options UI in Multisite Sites > Infos page

I want to add meta fields for the sites in my network (such as a thumbnail and a category). I know how to do this using get/add/update_site_option, but I'm wondering where I could put the UI to manage ...