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
0answers
166 views

Display a query with multiple post types and same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback in Wordpress. I have two custom post types called "Clients" and "Projects" and they each pull information ...
2
votes
0answers
49 views

How to show in search results posts with a particular tag in a particular category?

As the home page of my blog I've a static page. There I want to show the navigation of the site. Category1 Sub-Category1 tag1, tag2, tag3 Category1 Sub-Category2 tag1, tag2, tag3 ...
2
votes
0answers
91 views

Prevent “main” WPMU site_url() being returned in functions

I've noticed that in a WordPress MU install with domain mapping enabled, some functions return URIs that don't use the current WPMU site's primary domain name which possibly means they are "WPMU ...
1
vote
0answers
36 views

Multiple Loops Meta Data

I am now trying to figure out how to create the functions/ loops to pull my data from custom post types. I have two post types(keys): And I need to pull the data from both to run my functions. ...
1
vote
0answers
37 views

How to remove custom post type and add category and post name

I have a custom post type called listing and taxonomy for this listing is called listing_cat. At the moment my wordpress permalinks appear in this format ...
1
vote
0answers
37 views

Wordpress PHP Conflicting User Sessions

I'm using the following function to programmatically login users via the frontend: function auto_login() { $username = $_POST['user']; if ( !is_user_logged_in() ) { $user = ...
1
vote
0answers
43 views

Why does `url_to_postid` return 0 when testing `page_for_posts` Page?

If I set Reading Settings > Posts Page (in other words, the page_for_posts option) to a static page, and then attempt to pass its URL through url_to_postid() it will return 0 - why is it? I ...
1
vote
0answers
122 views

wp-comments-post.php file returns a blank page

When i post a reply to my blog, it's return a blank page to me. It seems that happens because of this code in wp-comments-post.php if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { header('Allow: ...
1
vote
0answers
53 views

Configuring a meta query with multiple post types that have the same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback. I have two custom post types called "Clients" and "Projects" and they each pull information from one ...
1
vote
0answers
71 views

Add .htm extention to a custom taxonomy

I need to add '.htm' to all my urls on a new site - client requires that, as I am converting a old static site into WP. (I use Remove Taxonomy Base Slug to hide the slug of my custom taxonomy "topic" ...
1
vote
0answers
17 views

theme_root returning a truncated URI

I'm unable to access the theme editor via the control panel, receiving 'Sorry can't edit files with .. in the name....' and after trying to trace back the cause, I've found that the theme_root is ...
1
vote
0answers
49 views

Wordpress Custom field Colors

I came across this code and would like to use it in my project. It works fine, but the problem is, I need to change those colors in the array to instead pick transparent images from url since I am ...
1
vote
0answers
105 views

Need help setting default setting value for radio button in theme customizer

I need help figuring out how the radio button saves it's value in the theme settings. In my theme I added Radio buttons in the theme customizer. So far they are working great. Although I have one ...
1
vote
0answers
131 views

Add term to custom post type on draft

I'm trying to automatically add a custom taxonomy term to custom post type when the custom post type of property is created. The action is firing but it is not adding the term. I know it is firing ...
1
vote
0answers
170 views

wp_get_archives custom function broken since upgrading to WP 3.7.1

I've upgraded a site I'm working on to the latest WP, but it appears the function I wrote for splitting wp_get_archives() into years is now broken and I can't find out why. I've turned on debugging, ...
1
vote
0answers
67 views

Custom taxonomy widget in admin area

I have a custom taxonomy set up on a custom post type and the box it uses is the same as categories, except I wanted to make it easily searchable using a filter script and then also allow the user to ...
1
vote
0answers
124 views

Query Pages and post excerpts dynamically

I have a custom home page, a blog page which includes a dynamic preview area of the latest 5 blogs, and some other miscellaneous pages. Im trying to design an "events" page where the main page has a ...
1
vote
0answers
101 views

Add button to kitchen sink toggle

I have created a simple function along with a shortcode, my goal is now to add a button in the sink toggle of wordpress so that the user doesn't have to type anything. Is this hard to achieve? how ...
1
vote
0answers
104 views

Ajax : Call undefined function plugin_function() … can't call any plugin function

I use a Ajax query to show some content, but I can't use any of my plugins functions. Javascript : $('#load_more').click(function() { var data = { action: 'load_more', id: ...
1
vote
0answers
90 views

Way to add captions to gallery images by code

I am creating posts by using wp_insert_post function. It works fine as I provide values in array required. Sometimes it is required to create a post having gallery. Without any problem, it also works ...
1
vote
0answers
71 views

next_/previous_post_link() `in_same_category` appears to fail when true

I'm using the Modernize theme's custom Portfolio type page. In the single-portfolio.php template, I call next_ and previous_post_link(), which correctly display links when in_same_category is set to ...
1
vote
0answers
152 views

get_terms not returning any custom taxonomies

I have a custom post type called project with custom taxonomy called tagportfolio I use this code to generate both: add_action('init', 'project_custom_init'); /*-- Custom Post Init Begin --*/ ...
1
vote
0answers
447 views

jQuery Plugin to use Wordpress functions in AJAX request

I'm using Chained Selects jQuery Plugin to create multiple chained selection fields. I'm using the remote version of the plugin to build the related options by means of AJAX request from a separate ...
1
vote
0answers
92 views

Multisite 404 on pages - rewrite error breaks database

After updating my reading settings on my multisites, I get 404 errors on all my pages. The only way to fix the issue is by reverting the database to previous version, that is the only way it can be ...
1
vote
0answers
190 views

Wordpress functions.php - Execute plugin specific user online

One Trick Pony posted a great script that I'm trying to adapt to my needs. Registration in my website is restricted. There is only one user, a editor. The idea is to have a Chat Plugin, and it would ...
1
vote
0answers
180 views

wp-admin won't load after setting wp-login custom url

I changed the wp-login.php url to /login/ so all links in registration and forgot password emails have /login/ rather than wp-login.php. The problem now is that when I visit /wp-admin/ or click on ...
1
vote
0answers
66 views

Need help enqueueing webfonts

I am attempting to enqueue web fonts that I am loading in via the WebINK font library. (This service is similar to Typekit). This service works by generating a unique CSS link for each unique site. I ...
1
vote
0answers
105 views

Insert a “view all ” option on wp page navi

Is it possible to/how can I add a view all function to my wp-pagenavi? For example : 1 2 3 >> View All >> Currently I just have the 1 2 3 >> but would like to give my visitors to option to 'View ...
1
vote
0answers
434 views

Skeleton Child Theme Add Icon Bar to Header Flex Grid

Skeleton Child Theme Version 1.6 WordPress Version 3.4.2 Child Theme installed on main Multisite: public_html, wp-content, themes. My CSS, PHP Coding skills = NOVICE What I've done: Using the ...
1
vote
0answers
45 views

Showing errors from processing function on form

I use a function from my functions.php to process a front end post form. I store the errors in the variable $output but need a way to show it on the post form after submit. How can I do that?
1
vote
0answers
80 views

Difficulty with PHP function that displays a post's format in WordPress

I am working on a WordPress theme using Bones. I would like to be able to show some text just above the title of each post if the post is either featured, password protected or private. So far I came ...
1
vote
0answers
67 views

register_taxonomy() take much queries

Sorry for my poor English, I'm russian. I have a problem by adding a lot of taxonomies. When I added about 80 taxonomies, I get the following results(without caching): before: 44 queries 0.352 ...
1
vote
0answers
91 views

Function to update post_meta based on existing post_meta

I have a custom post type for addresses on a Google Map. One meta field is for the address, but I want to convert that address to longitude/latitude. So I have a meta field for longitude & one for ...
1
vote
0answers
50 views

How to call a function from a plugin from within a different plugin's admin options panel?

I have a basic plugin admin options panel for events. I want to call a function that is from a different social media plugin (Mingle). I can call Mingle plugin functions in the theme, but not within ...
1
vote
0answers
94 views

Events: Check for other event with same start date and category

I am using The Events Calendar and (correct me if I'm wrong) there is no checking to see if an event has a time conflict with another event that's already been entered. For example, if there is ...
1
vote
0answers
379 views

bbPress plugin: forum lists not showing in correct order?

I'm running Wordpress 3.3.1 and bbPress 2.1 (plugin, not standalone) my forums are are not being listed in the front page archive or forum summary pages in the correct order; I double checked many ...
0
votes
0answers
13 views

How to display a custom built field on wordpress default gallery

I created a custom field for the media I can upload on my wordpress website, by adding this code to functions.php: /** * Adding a "Copyright" field to the media uploader $form_fields array */ ...
0
votes
0answers
7 views

How to modify Genesis core function?

I am trying to modify a Genesis framework core function. I want to remove strip_shortcodes() from the function get_the_content_limit(). Here is my code: if ( wp_get_theme( 'genesis' ) ) { // replace ...
0
votes
0answers
8 views

Move captions under gallery images in twenty fourteen theme

The new twenty fourteen theme will only show captions on top of gallery thumbs. Is there something I can do in the functions (or copy from twenty ten) to make them visible all the time and show up ...
0
votes
0answers
11 views

Increase Comment Author Gravatar Size On WordPress Default Comment Function

I am new to WordPress theme development. I am designing a new theme and using less codes and file as I am starting from basic. I am adding comments and comment form in my single.php using <?php ...
0
votes
0answers
15 views

Random text changing to weird icons in both admin & front end

Has any body had this sort of problem before. The text mainly in input field descriptions turns to weird icons see image. I have deactivated all plugins and changed themes several times but same ...
0
votes
0answers
14 views

Wordpress Create pages on theme activation - add child pages using this function

I am using this function to add new pages on theme activation: /************************************************* ** Add home page *************************************************/ if ...
0
votes
0answers
33 views

How to customize the WordPress excerpt?

I searched the web and the available plugins, but I couldn't find anything that is easy understandable for a noob like me to do the following: I learned how to create a "Continue Reading" link and ...
0
votes
0answers
28 views

Rename filename to post title. Post Title not being fetched

function new_filename($filename, $filename_raw) { global $post; $post = add_post_meta( $post_id, wp_get_attachment_url($attachment_id)); $info = pathinfo($filename); $ext = ...
0
votes
0answers
37 views

How to echo Widget Title in Custom Frontend-Template Box

I've created a custom Widget with the help of following code: // Creating the widget class wpb_widget extends WP_Widget { function __construct() { parent::__construct( // Base ID of ...
0
votes
0answers
26 views

How to add submenu to Wordpress plugin in the same Directory of main Plugin?

I have created a plugin and now i want to add a third party plugin inside of the Main Plugin menu, so it can be submenu. How do you make the second plugin appear? Directory Setup: ...
0
votes
0answers
6 views

How to call a FB function from an admin bar action?

I am using FaceBook's SDK inside of my wordpress application. I need to set up the application so when a user clicks log-out on the admin bar, it will fire facebook's log-out function. in order to ...
0
votes
0answers
22 views

Working widget does not show up in appearance->widgets

I try to add a custom widget for use outside of a normal sidebar. For that I have created class myfirst which extends WP_Widget and with appropriate function overrides. namespace widget; class ...
0
votes
0answers
14 views

Automatically create featured image on post publish

I know how to make an image display IN PLACE OF a featured image if the post has no featured image, however, as far as the database is concerned, the post still has no featured image. In my theme, ...
0
votes
0answers
43 views

Problem loading wordpress functions outside of wordpress

I´ve just finished setting up my first ever website and blog, so please be gentle ;) . I am having a problem using some functions outside my wordpress installation (blog.example.com). To be ...