A function is a sequence of program instructions that perform a specific task. It is packaged as a unit that can be used wherever the according task should be performed.

learn more… | top users | synonyms (2)

2
votes
1answer
2k views

Add meta data to the menu

I encountered this problem what i thought to be one of the worlds simpliest things, I wanted to add a subtitle to the menu somethin alike this http://img4.imageshack.us/img4/7816/unled10b.png . Then i ...
1
vote
1answer
107 views

Featured Image Thumbnail Creation

What function or script creates the hard-cropped feature image when a post is saved? Regardless if I stipulate a size when saving the featured image in the media library (like the medium size), a new ...
-1
votes
1answer
295 views

Integrating custom API for post content into Admin interface & Public Website [closed]

EDITED question to be more specific and added bounty in hopes someone has a solid coded solution: So, here is an interesting task I have been trying to find a solution for. I have added a bounty ...
0
votes
1answer
1k views

wp_enqueue_script() not working

I'm trying to add this social-network button: <a href="http://svejo.net/submit/?url=[your url]" data-url="[your url]" data-type="compact" id="svejo-button">Add in Svejo</a> ...
3
votes
1answer
4k views

Get menu object from theme_location

I'd like to get a menu object from its theme location argument. My goal is to output separately the menu name and its items name, url and description. Example of what I'm looking for : $menu = ...
0
votes
1answer
2k views

Simplest Way to Build Custom Archives Page?

I am looking to create a page in Wordpress to output links to all of our posts from every month since we launched the blog. I have seen the archive.php template file in Wordpress, but this seems to ...
0
votes
1answer
907 views

Unable to use get_page_by_title() more than once per page?

On one of my page templates I need to include the contents of several other pages. For example, if my page template is called Fruit, I need to pull in page content from pages named Apple, Pear, ...
2
votes
2answers
1k views

wordpress custom login successful redirect hook

I am using a custom login form imported on my theme's home page through jqModal. In that, when i successfully login it redirects to the same page. I want to redirect based on the logged in user role. ...
-2
votes
2answers
622 views

Getting URL of Resized Image

I have a Wooframework specified question. I'm using Bueno theme with WooFramework 4.5.4 . I'm trying to get url of image which resized with Dynamic Image resizer of WooFramework on single.php. I'm ...
0
votes
1answer
377 views

Filter for replacing the WP_query object for a given category

I'm looking for a action/filter to replace replace a category archive page with the contents of a page. I'm thinking of testing the category ID, and replacing the WP_Query object with a new one ...
2
votes
1answer
1k views

How Can I Access a PHP Variable in Another PHP Function

I'd like to use the $atts variable from the lax_google_map_maker() function in lax_google_map_init(). How do I access it? I tried to 'globalize' it, but for some reason it didn't work. function ...
0
votes
1answer
767 views

Including inline Custom Fields info with add_filter in functions.php

I have a function set up to place some standard text in each post for a Custom Post Type. However, within that standard text I want to pull some unique text from a few custom fields. Not sure what is ...
1
vote
3answers
323 views

Manipulate Permalink

I'm using WPML to translate a website. The only major issue I have with WPML is that you cannot have a page in different languages with the same slug. Therefore www.example.com/contact/ and ...
0
votes
3answers
96 views

Custom user role still showing up after deletion, ideas?

I previously created a new user role called "Owner" which worked fine, however I decided to delete it afterwards from my functions.php since I found it to not be as useful for my project after ...
0
votes
2answers
458 views

Insert content into <title> head tag with function

Is there a hook available that lets you append or prepend text to the <title> tag in the head? I've seen lots of posts about customizing the <title> tag, but they all involve manually ...
1
vote
1answer
513 views

Pass variable to hook. Its possible?

I have this hook created to retrieve user password when he register or update his pass. I dont want my client to touch wordpress core so i was planning to use a hook in wp-includes/user.php All this ...
3
votes
1answer
352 views

Hard Code Pages into a Theme for a Network (multisite) Installation

I'm creating a multisite network and I am looking for a way to have it so new blogs that are created have a couple of standard pages set up automatically. The purpose of these pages will be to ...
2
votes
2answers
2k views

Get password when user registers and save it sha1 into database

im working on a website where the users can connect with iphone to some functions of it by using a sha1 encrypted password. In other words the plain password of wordpress encrypted in sha1. In the ...
0
votes
1answer
1k views

Having problems loading Jquery in functions.php

I'm trying to add some Jquery scripts to my Wordpress site, and unfortunately I cannot link you to the site as I'm working locally. It seems that the Jquery file is being loaded, as well as the ...
0
votes
1answer
4k views

How to save Uploaded image in custom option panel?

I'm trying to add a custom option panel to a new template following a tutorial found on NetTuts. I saved all the code for the option panel inside a file called optionpanel.php (LoL) and everything is ...
1
vote
1answer
398 views

Linking text within textarea of custom meta box

I'm using 'Meta Box Script for WordPress' to create custom meta boxes and everything is working great...except the following: We have a textarea that we want to act, basically as another WP ...
0
votes
1answer
72 views

Numbering lines of code with the <code> tag?

The wordpress tag is used to display code on a page (refer to: http://themeforward.com/demo2/2011/09/12/code-tags-in-post/) but I am having a hard time finding a function that will number the lines ...
0
votes
1answer
5k views

Help me to understand wp_header() and wp_footer() functions

hi everyone please help me to understand the hook functions wp_header() and wp_footer() What does it mean hook functions and what to do
0
votes
2answers
546 views

“Headers already sent” while trying to add a CSS file to my login page?

Every tutorial I've seen on this subject is out of date, so I'm hoping someone here can help me. I want to style my wp-login.php page with a CSS file. But I'd like to do it in a way that won't get ...
0
votes
1answer
87 views

2 small questions: How to redirect to a created page & show that pages title in wp, bp

im trying to redirect the loggedin user to a page i created on the backend, i want to use my index to do so so, i added a do_action wrapped in an if statement is_user_loggedin() to call my function. ...
2
votes
1answer
2k views

How can I tell if I'm on a login page?

There are functions for is_home(), is_blog() is_single() etc... What's the best way to tell if I'm on a page that is requesting that I login? I guess that would just be the wp-login.php page.
1
vote
1answer
32 views

Which file of wordpress manage plugins functionalities?

Which file of wordpress manage the plugins functionalities. For example if a have to insert another rule in a plugin functionality where i go to modify?
0
votes
1answer
42 views

How to know when an user is loged in?

Hello i have this simple problem: when the user is logged an podcast player is shown, other case no. How verify when the user is logged? Im wordpress and php newbie. Thankx
0
votes
1answer
156 views

Do I Need to Prefix Variables Inside Functions?

Sorry, this is a noob question. But, I want to follow the best practices. I read that functions and global variables should be prefixed in plugins. So, for example, myfunction(), should be ...
3
votes
1answer
4k views

How to override function in functions.php of parent theme?

I have created child of theme twentyten. I tried to override function written below /** * Returns a "Continue Reading" link for excerpts * * @since Twenty Ten 1.0 * @return string "Continue ...
0
votes
1answer
401 views

Change default comments form title [duplicate]

Possible Duplicate: Change comments form title on a page by page basis I'm looking to change the comments form title (my theme defaults this to "Leave a Comment" or "Leave a reply to"). I ...
0
votes
1answer
71 views

Removing the custom_image_header from wp_head

I am looking to remove the custom_image_header from the wp_head. I would like to use this in a more manual way throughout my theme. I understand the general approach for this is to include CSS in the ...
0
votes
1answer
831 views

functions.php and conditional tags

I'm having the following issue: some conditional tags do not work on the functions.php file. For example I'm trying to do the following: if ( is_home() ) : wp_enqueue_script('accordeon_setup', ...
0
votes
1answer
3k views

overwrite a plugin function in functions.php

need to customise a plugin function but would rather not edit the plugin itself so updates wont remove the custom changes. function iss in a class called UserAccessManager and the function is; ...
0
votes
2answers
312 views

Fix My Custom Function: Remove Automatic <p>

I want to remove the automatic paragraph tag that goes around my excerpts, which are being outputted by a custom function. I'd really appreciate if you could tell me what to add to my code. I'm ...
17
votes
1answer
12k views

How to override parent functions in child themes?

I've been reading around and trying to figure out how to do this, but for some reason I can't seem to override parent functions in my child theme. I'm using TwentyTen as a parent - can anyone tell me ...
0
votes
1answer
3k views

get_term_by not working when in functions.php

I have an odd issue with get_term_by(). It's working fine when I use it inside a template, but when I use it in functions.php it just returns false. $term = get_term_by('slug', 'some-term', ...
0
votes
1answer
156 views

How do I create pages within a Wordpress post?

I run a music blog and I want to do a countdown of our top 50 tracks of 2011 so far. There's no way that I want to add 50+ images and Audio Players into just one post, and I don't want to break the ...
0
votes
1answer
123 views

Code in custom widget queries all posts, when it should only query the current post

I have a query in a custom widget (my first one!) which, if it's of custom post type book, retrieves the post ID. This then gets used in a WP_QUERY to retrieve data about the page. This works ...
0
votes
1answer
41 views

Isn't the way posts are displayed very unefficient?

I'm pretty much a WP newbie, and I've noticed that in a lot of themes, there is the exact same code for displaying posts in three different places (single.php, archive.php, index.php etc) This just ...
1
vote
2answers
3k views

Best way to pass arguments to another page in Wordpress

What is the best way to pass arguments to another page in wordpress. I did it this way : <a href="get_permalinka(id_of_page).'/&i=2&j=3&k=4'">Link/a> I get this arguments with ...
4
votes
1answer
606 views

Can I turn off write-in tags/taxonomies?

One of the big problems my site staff has had with tags is the overwhelming number of similar or duplicate tags, due to the write-in ability. I'm about to add new custom taxonomies to my site for ...
1
vote
1answer
11k views

Override plugin with functions.php

add_action('wp_head','add_gpp_gallery'); function add_gpp_gallery() { if( ( is_single() || is_page() ) && ( !is_page_template('page-blog.php') ) ){ remove_shortcode('gallery', ...
1
vote
4answers
2k views

wrong php date()?

hey guys, it's weird and I've never experienced that before. I've created a new blog and a custom theme. I'm using <?php echo date("H:i"); ?>in my theme. The time that's put is 2h earlier. ...
1
vote
1answer
151 views

Help with Wordpress Query

I'm sort of a noob when it comes to Wordpess; I've only recently started building themes and I've run into a wall. I'm trying to feature 3 different articles at the top of my site using wpquery and ...
1
vote
1answer
67 views

How to validate this deprecated function

I want to validate this deprecated function: add_filter('user_has_cap', array(&$this, 'filter_user_has_cap'), 10, 3); It needs to use roles or capatibilies, so I guess 10 is the admin level, so ...
0
votes
1answer
161 views

How to change a meta value (of a published post) after X days.?

I have a custom field. I would like to change the text of that custom field after x days. I want something like this: if ( published post is more than 90 days old ) { echo "your post is more ...
0
votes
1answer
175 views

Latest Foursquare Checkin function

Does anyone know how to display the latest Foursquare checkin for a specific account on a WordPress blog? Ideally I would like to add the function to the theme rather than use a plugin but i'm open ...
2
votes
1answer
836 views

If function exists, and array is met, echo function?

I have a function like the following: <?php echo my_custom_function( array( 'category_url'=>'My Special Category' ) ); ?> It pulls data from the "My Special Category" and displays it. I ...
0
votes
1answer
1k views

Error after editing functions.php

I was making minor changes to functions.php file but just as I made the changes I got an error, I used FileZilla and undo the function I added but now I am getting the following error, Fatal ...