Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

1
vote
3answers
108 views

Hook Widget to Woo Theme in functions.php

Right now I am adding a sidebar above my woocommerce products. How can I hook the sidebar to my theme. Have registered sidebar and it works. register_sidebar( array( 'name' ...
0
votes
1answer
172 views

what is the action hook code to supporting product category condition in single product page of woocommerce?

I want to display product attributes of 2 different product category with the help of conditional tags. But the condition was not working This is the condition that i given ...
0
votes
1answer
55 views

can't access dashboard and showing forbidden page

i cant access my dashboard. after i make true the wp-debug it shows the following error. Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued ...
0
votes
1answer
28 views

Display taxonomy with a maximum number of letters

I'm looking for a function which displays a post's taxonomy with a maximum number of letters. I've achieved with title (How to limit the max number of characteres in the title that are displayed), but ...
1
vote
2answers
84 views

how to limit edit_form_after_title hook to page and post edit only?

heelo, I want to use this great hook edit_form_after_title it was announced on December 1, 2012: http://make.wordpress.org/core/2012/12/01/more-hooks-on-the-edit-screen/ it curreclty hook for : ...
1
vote
2answers
44 views

How can i do something after head like adding a hook for after head but before post

What i mean is i am trying to add breadcrumbs to my blog and i thought of adding it before content or after title but there's an issue with that - on archive pages or category pages the breadcrumbs ...
1
vote
0answers
45 views

Add custom text in the media library image meta area

I want to add some custom text in this area in the media library: Is there a filter I could hook into or how can I add content there? If not, how do we do this using Javascript? I want the text to ...
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
38 views

How To Make Sure That My Action Hook Executes Last

How can I make sure that my_function action hook on 'wp_head' is executing last? One hack, that I'm using, is to give 999999 (a big number) as the third argument. But maybe some other hook on ...
0
votes
3answers
111 views

Add a custom text to admin footer in a Custom Post Type page

I want to customize the footer text in a Custom Post Type admin page. I have a plugin that creates this custom post type and want to add in it a function to customize admin_footer_text. As you can ...
0
votes
0answers
57 views

Problem importing posts (get_categories is empty)

I want to import posts through an RSS plugin and events through a calendar plugin, and then have these plugins set the category for these imported posts. Then, using a hook (see code below), I want to ...
-1
votes
1answer
95 views

How to hook wp_mail to add a custom email as BCC for each sent email?

Is there a way to hook into the wp_mail function to add a custom email as hidden (BCC) copy to each email sent? If so, how? -edit- It's not like I want to send an email with BCC, I would like to ...
1
vote
1answer
80 views

What filter should I use to insert a button inside on Media>Add New

I am adding a new way to upload a media file to WordPress. So I am looking for a way to add a link or a button to the Upload New Media page. What is the recommended filter? Or is there another better ...
1
vote
2answers
479 views

Customize user account activation message

During the process of a user creating a new account, once they click on the link in the activation email, they receive the message on the login page: Your account is now active! Username: ** ...
1
vote
2answers
70 views

remove_action conditionally for Custom Post Type

By default, my theme is showing an author box below my posts. I am using a custom post type, and would like to remove this author box only on this post type. Here is how the theme is calling the ...
1
vote
1answer
51 views

Get current page_id before loop, in functions.php

In the Shoestrap theme, you often change content by using hooks. I want to add the following to functions.php but it doesn't work... // in functions.php if ( is_home() ) { add_action( ...
1
vote
1answer
59 views

How can I find the hook I need to rewrite a function?

I want to change the behavior of a bbpress/Buddypress "create group" page. I found the function I need to rewrite, it's the function create_screen in ...
0
votes
1answer
43 views

Is it possible to track down Actions and Filters?

As far as I know using Actions and Filters hooks is the best approach for developing on WordPress. I have just to ask if there is any way to track down which Actions and Filters are applied on ...
1
vote
1answer
64 views

Question about how do wordpress filters/actions work

I have a question that I'm curious. In WordPress we can add a filter or action like this code: add_filter($filter_Name, $function_will_be_hook); add_action($action_Name, $function_will_be_hook); ...
0
votes
0answers
71 views

Hook custom post type (ai1ec_event) to update transposh language

I'm using All-in-One Event Calendar and Transposh on a website that is designed to import content from websites all over the world, and automatically translate them. Right now any event that is ...
0
votes
1answer
34 views

preg_replace not removed “class”

Use this code to remove the label "class" of the images, but does not work. The label does not disappear in the new post. function the_post_thumbnail_remove_class($output) { $output = ...
0
votes
0answers
48 views

Remove “enqueued” script from array

Im working on optimizing a child theme for a site and the parent "has more than we need" Lots of requests being generated all adds up to performance hits. What I'm trying to accomplish is this effect ...
0
votes
3answers
186 views

How to get url of a post from admin panel

I want to get post url from the back end edit post page, the edit post url is : www.ddd.com/wp-admin/post.php?post=1&action=edit the real post is: www.ddd.com/wp/?p=1 since the user can edit ...
0
votes
2answers
53 views

Redirect returning users to a certain page?

Is there a way to redirect users returning to the site who are already logged in? Assuming something like: function returning_redirect() { //code here } add_action('auth_cookie_valid', ...
0
votes
0answers
49 views

How to hook something before edit_form_title?

It's amazing to use the edit_form_after_title hook to enqueue something just below the post editor's title field. But there is nothing opposite to this like: edit_form_before_title. Searching over the ...
0
votes
1answer
138 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
0answers
41 views

Custom post types ordering & hooks

I have archive-member.php copy/pasted from the archive.php which I use to output the list of all posts with custom post type member taxonomy-meber_type.php file copy/pasted from the ...
0
votes
1answer
328 views

Modify Redux Framework Options in Child Theme

I have a wordpress theme that I am modifying the look and feel by making a child theme. The parent theme I am using uses the redux framework. Im a bit new to using filters and hooks, but I want to ...
2
votes
1answer
137 views

Admin Post Update Redirection to Posts Screen

Is there a hook I can use that when a post is created or updated it goes back to the list/table page of all the posts. If it is also possible to target a post type as well that would be cracking. ...
0
votes
1answer
315 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 ...
0
votes
1answer
55 views

Best hook for a function which adds shortcodes to the system?

I have a plugin released, and one of my customers was reporting a problem where the plugin was outputting ads in the header area of their website. I have a function defined which contains my ...
1
vote
1answer
73 views

Should I use function_exists() and/or add_action() in theme development?

I'm trying to get my theme ready for publication on WordPress.org I got this feedback: function_exist() it is not preferable 3.0 design Now I wonder what I'm doing wrong. In the current ...
0
votes
0answers
12 views

Bulk img-rename images in gallery

I'm trying to add the content of some text-fields to the selected images of a gallery. I found out, how to create the input-fields. My problem is to get the content of the text-fields and write it to ...
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
0answers
67 views

Making Site A Use Site B's wp-content Folder

I'm trying to synchronize two WordPress sites and on my way I've faced few challenges. One of the challenges is to either synchronize the wp-content folder of two sites or make one site use the ...
-1
votes
1answer
93 views

add comments custom fields after user is logged in

I want to add two custom fields inside comments on a CPT after the user is logged in on. This is the code for creating the custom fields: function debate_comment_fields( $fields ) { if( ...
0
votes
1answer
83 views

Is it possible to create an action hook using do_action() within add_action()?

Is it possible to create a new action hook like do_action('my-hook-name'); inside a call to add_action();? I'm aware this code doesn't work, but I was thinking something along the lines of... ...
0
votes
1answer
63 views

comments hooks on custom post type

First, this is what I want to achieve: I want to add a comments hook on a CPT which is asking users to be registered and logged in to be able to post a comment. And after the user is logged in to ...
0
votes
1answer
59 views

How can I add a default description to uploaded files?

Is there a way to add a default description for media files as soon as they are uploaded to WordPress? Specifically, I want to modify the code here to extract the text from PDF files and include it ...
0
votes
1answer
251 views

Add an Outside Wrapper to my Header and Make it Full Width

I did reposition the <header> outside the 'wrap class' class by adding this function in my function.php /** Reposition header outside main wrap */ remove_action( 'genesis_header', ...
3
votes
1answer
1k views

How to create thumbnails for PDF uploads?

I'm developing a website that needs to allow users, within Gravity Forms, to submit a PDF file and have a JPG thumbnail created of the first page of the PDF that is then displayed in the created post. ...
1
vote
1answer
88 views

Lock user information once fields have been filled in

Much like the username is locked down and cannot be changed once it has been registered, I would like to lock down additional fields I have created with Advanced Custom Fields like the person's ...
0
votes
1answer
154 views

How to pass a special CSS class into widget li

I have assigned a Sidebar into functions.php: register_sidebar( array ( 'name' => 'Footer Widgets Area', 'id' => 'footer_widgets_area', 'description' ...
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
86 views

Add content after get_header

I'd like to add content directly after the div#main (end of header.php) and before /div#main (beginning of footer.php). I'm using an own child-template (of twentythirteen), that contains only ...
0
votes
0answers
103 views

Gravity forms - gravity form hook for multi-page forms

I have a multi page form that I would like to hook into. On the final page of the form, after submit, I would like for the confirmation to appear as a lightbox over the contents of the final page, ...
1
vote
2answers
94 views

How to trigger the core WPLANG to make automatically set a language when the theme is activated? [duplicate]

I'm developing a theme especially for Bānglā blog posting, and it'd be under GNU license. I questioned about a Calendar Widget translation with some problems today, and got a comment saying: I'm ...
1
vote
1answer
54 views

How to hook some Unicode texts into calendar widget safely?

I collected a good numerals replacing function for WordPress calendar: function make_bangla_number($str) { $engNumber = array('0','1','2','3','4','5','6','7','8','9'); $bangNumber = ...
0
votes
1answer
672 views

Using wp_ajax and wp_ajax_nopriv hooks

I want to send an ajax request and want to process it if the user is logged in. Therefore I want to use following two hooks, but I am not sure if I am using them correctly. Is it correct to use same ...
0
votes
1answer
23 views

add_action second argument missing

I don't know what is missing here. I have a do_action() and add_action(). Only the first argument passed, to the function: function testing($a, $b) { echo $a . $b; // Here is just get A, and an ...