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)

0
votes
2answers
29 views

Count Title and Post Characters

I need to get a total count of characters for post titles and post text characters. Are there any build-in WordPress functions available for that? My posts are paginated so the numbers for post text ...
0
votes
0answers
14 views

is_tree not working as expected when ending with “else”

Has anyone run into the problem with the is_tree function - that having an else, it will not work? If I delete the last else statement so that it cannot take on a last variable, it works as expected. ...
0
votes
1answer
13 views

Add Function For Instances of Custom Text in Multiple Category IDs to display in post content

I created an extra content file and inserted custom text for a category (and relevant to that category) to display (on a random basis) in all posts belonging to that category and it is all working ...
0
votes
0answers
6 views

What to know all functions fr displaying content for product page [on hold]

I am developing a custom ecommerce wordpress theme, and the order the contents are ordered are not like the default of woocommerce plugin. So i want to use my own loop to loop through the details i ...
0
votes
1answer
28 views

Help with a function in a widget

I'm new to custom widgets and functions, and need a bit of help understanding how to achieve something. On my bookstore site I need to display links to books on external site using their ISBN ...
0
votes
0answers
41 views

Media not uploaded in buddypress activity wordpress running on google app engine [on hold]

I have deployed wordpress in google app engine. I enabled plugin named buddypress. Everything works fine but uploading media not worked at all. I am not able to upload avatar too. Please help me. ...
-1
votes
0answers
13 views

Games product for hire monthly [closed]

I want to display games products on my wordpress site with hire and reserve button for monthly subscription. Can somebody told me the right plugin or code? Thanks in advance.
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 ...
-2
votes
1answer
20 views

Which action is triggered before final output?

http://codex.wordpress.org/Plugin_API/Action_Reference When I use add_action('init','myfunc'), at that moment the variables (is_404() or other) are not yet detected. When is best time to detect ...
0
votes
1answer
21 views

How can I customize the size of the header of my theme?

I want to change the size of my header using the Sparkling theme. In functions.php, right below this: /** * Implement the Custom Header feature. */ I added this: add_theme_support( ...
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
1answer
18 views

pluggable function in theme, to be overridden by plugin

Is it possible to add a function in functions.php like this: // ACF if ( !function_exists('get_field') ) { function get_field() { return false; } } and then let ...
-1
votes
0answers
16 views

Gravity Forms need hook after lead update [closed]

I'm using this Gravity Form List & Edit plugin to show all entries/leads in front end. This plugin has few buttons. Edit/Delete/View Lead. a.e. I found a way to get hook after submit and after ...
0
votes
2answers
22 views

How to arrange PHP files to allow for multiple types of pages

I am new to WordPress development (the most I've ever done on the web design/development side of things is creating basic HTML sites); so this may be an extremely simple question, but I am trying to ...
-2
votes
1answer
31 views

How to hide some options from a select with functions.php [closed]

In page and post editor page Wordpress i've a box provided where i can choose from a select, for example: Select sidebar to associate with this page: <select id="#idselect"> <option ...
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
1answer
12 views

Register a widget area when a theme option has been saved?

Is it possible to register a widget area and sidebars when an option has been selected and saved in a theme options panel? I am using a framework called redux but am not too sure if this can be ...
0
votes
1answer
13 views

Insert a field with PREG_REPLACE – strange behaviour

I'm trying to insert a custom field (from the Advanced Custom Fields plugin), and I need to place it within a div which I'm wrapping around an img, right before the img-tag. So basically this is the ...
0
votes
1answer
18 views

translate the_title() with .po & .mo

i need to translate the_title(). I am using code: <?php _e(the_title()); ?> but not working ... any ideas ?
0
votes
0answers
15 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
1answer
42 views

Blank child theme - functions.php problem

I've created a child theme, and moved all the modifications I had in the parent theme functions.php into the child theme's functions.php. Now if I preview the theme, it is blank. I've got three ...
0
votes
2answers
26 views

Display formatted list of taxonomy terms with last seperator different

I am trying to display a list of event producers, which are stored as a taxonomy. For each event (custom post type) there can be anywhere between 1 and many producers, so I would like to list them, ...
6
votes
4answers
257 views

Cleaning up WordPress to improve performance?

Looking over the current WordPress codebase it's clear that functions are over-used. My count is over 8,100 functions/methods are defined inside the WordPress codebase. That is terrible, and a ...
0
votes
1answer
28 views

Child theme functions.php

I'm not sure how to implement a change in my child theme's functions.php. In the woothemes documentation it says that "The functions.php in your child theme should be empty and not include anything ...
0
votes
1answer
20 views

options.php problem - data not saved

I've created a custom menu page with some fields. I want to store these settings to use elsewhere. The form with the fields should save and POST data using action="options.php" but every time I hit ...
2
votes
1answer
32 views

Limit function to specific post category

I have a function that wraps images in a custom div. It's placed in functions.php and modifies all posts. I'd like to know if there's a way to only apply it to posts in a certain category. Here's ...
0
votes
0answers
34 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
1answer
37 views

Wordpress Website with Login system

I am new to WordPress but have been developing in PHP (CI specially). I stumbled into problem when I have to integrate a website developed in CI with a WordPress website. This wordpress component is ...
0
votes
2answers
28 views

WP Theme Development, Adding Content Areas to Custom Page Template

I am not sure how to ask this, which is why I have been having trouble finding anything via google searches. I am hoping someone here will understand what I am looking for and be able to direct me to ...
0
votes
1answer
46 views

Backstretch.js and thumbnail sizes to reduce loading time

I am using backstretch.js to set a featured image as a full size background image (as per this tutorial). I would like to combine this approach with different thumbnail sizes in order to reduce ...
0
votes
1answer
37 views

Why does “get_option” pull in the older value in options.php, rather than the newer value, on submission of a form?

I'm building a simple post order "plugin" through my theme's functions.php. The function updates the value of an option in options.php on submission of a form. So, for instance, when "1" is inputted ...
0
votes
1answer
21 views

Automatically Populate Post Taxonomy Data Based on Post Author Meta Data?

I'm trying to use author meta data to automatically populate a custom taxonomy on a given author's post(s). Currently, the taxonomy is visible on the post page, but I intend on hiding it from the ...
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
2answers
46 views

Function to pull data from user meta not working

So I am attempting to create a series of functions that calculate a price based on a client level I have set for each customer. Some customers may have a special deal. To do this, I created a custom ...
0
votes
1answer
21 views

Fill empty custom field with other custom field

i have a product listing website, all products are uploaded from csv. i have a two custom field named "old_price" and "new_price". Sometimes there is no discount (new_price) , so the field be empty. ...
0
votes
1answer
19 views

Copy and delete a directory with WordPress functions

I have successfully used copy_dir() to copy a directory to a new location. How can I delete a directory using WordPress functions?
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
1answer
16 views

Force changing the Site Title and add link

I have the function below, but it's not actually changing the site title where it is called in my theme. function blog_filter($string, $show) { if ( $show == "name" ) { $string = ...
0
votes
1answer
43 views

Allow the access over wp-login.php

I created a maintenace template, and redirected to the folder where it is located via the functions.php file inside the theme folder; this is the code: function maintenance_redirect(){ if( ...
0
votes
1answer
23 views

Simple/basic use of get_current_screen

I would like to load a stylesheet on only 3 admin pages: post.php?post=7&action=edit post.php?post=10&action=edit post.php?post=18&action=edit I was trying with admin_enqueue_script ...
0
votes
1answer
21 views

Is it possible to be more page/post specific with admin_enqueue_script?

I am using this code to load a stylesheet in the admin, but only on post.php related pages: function my_enqueue_for_post_pages_only($hook) { if( 'post.php' != $hook ) return; ...
0
votes
1answer
25 views

Meta Box value not been pulled in

Here is the code that creates my metabox on my CPT named clients it displays fine and seems to keep the value input upon clicking update. The problem is with displaying the value saved within the ...
0
votes
3answers
45 views

Include files in child themes, declare in functions.php

I'm using a child theme. I want to make a change to a file which currently resides in: mybasetheme>includes>sf-content-display>sf-post-layouts.php So I copied the exact same file structure into ...
0
votes
1answer
20 views

How to Add Image to Wordpress RSS-Feed with no Plug-in?

I have searched for adding featuring image to rss feed with no plug-in for WordPress. I have found some examples and applied how it was instructed. But All I have got now is nothing. Still can't ...
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 ...
3
votes
1answer
47 views

Autogenerate wordpress shortcodes using array?

I was create a shortcode which automatically generate shortcodes with given array key and value. Function names does not generate dynamically. Note: Array KEY = ShortcodeName and Value = Wordpress ...
0
votes
1answer
27 views

Redefine function arguments before rendering

How to change args values before function output (filter default values before call) wp_function($arg1,$arg2 = false){code} change to wp_function($arg1,$arg2 = true){code} without php runkit!