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

pagenavi issue on multi wordpress insall

Apologies in advance for my explanation of this problem. I've got one install of wordpress running several different websites. The actually problem is with the pagenavi function. It seems to work ...
0
votes
0answers
41 views

Disabling All in One Seo Pack plugin in functions.php does not work

Here is my code: function my_title($title) { global $aiosp; if ( defined('AIOSEOP_VERSION') ) { error_log( print_r( $aiosp, true) ); remove_action('wp_head',array($aiosp,'wp_head')); ...
0
votes
0answers
11 views

How to link 'Private page' to 'Login' button in login screen

I want to link a private page to the 'Login' button can any one guide me how to link this. Full description: 1) I opened my website 2) Click on 'login' link 3) A new screen opens with username & ...
0
votes
0answers
15 views

Insert retrieved image into another table?

I am retrieving one image from a table name "user_templates" after retrieving ,I have to insert that retrieved image into another table name "ca_woocommerce_order_items" but I am not able to insert ...
0
votes
0answers
28 views

Clean URLs with custom link in WP menu

I've read some articles on here and numerous through Google and I'm still struggling with clean urls. Basically I have a menu where I inserted a custom link which is ...
0
votes
0answers
44 views

Disable Override in WooCommerce

In my WP theme i've created a folder called "woocommerce" and inside that i put all file with my custom code, based on WooCommerce guidelines: template structure All work fine, but is possible to ...
0
votes
0answers
77 views

functions.php conditional output for a single plugin

hope I've asked this correctly. Bizarre situation. I have some non-breaking spaces in my titles for typography reasons. They are added automatically where required in place of normal spaces by the ...
0
votes
0answers
52 views

List all recent post by categories at the front page (WordPress MU)

I'm looking how can I put on the network homepage all recent post of my WPMU Network. I tried that script but there are not so much informations (I want the same presentation such as a normal post) : ...
0
votes
0answers
44 views

How to request login for user but not for bots

I wondering, how to not requesting bots like google crawler or bing crawlers to login since they can crawl my post info, but require user to login if they want to see the posts? I already know how to ...
0
votes
0answers
445 views

Custom password reset using AJAX

I used this (great) tuturial 'WordPress AJAX Login Without a Plugin – The Right Way' to make a custom login form and everything works fine. But I could need some help building the same functionality ...
0
votes
0answers
25 views

How to get a RestFUL URL for a function?

I have a basic custom function which accept GET/POST requests, and process them upon request. Just simply (Lets say GET now): function miccheck() { echo "Hello, Mic Check 123! ". ...
0
votes
0answers
50 views

Username with hyphen getting error in member page

I want to allow usernames with ‘-’ (hyphen) symbol. But now i face some errors with buddypress. I am using Buddypress + Facebook login. So when user try to login using facebook then it will get ...
0
votes
0answers
41 views

Rewirte the theme URLs

I was trying to implement the rewrite system of Roots on my theme. I followed this tutorial. In my functions.php I put the following: include_once(THEME_LIB . '/rewrites.php'); And created the ...
0
votes
0answers
229 views

How to make woocommerce a private catalog

Are there any tutorials/functions/custom code that I could utilize to make my entire shop pages completely private to users? I need a private shopping experience for logged in users only. My client ...
0
votes
0answers
109 views

Call wp_create_user function from external?

I want to create New Users from external. I've found this is function in wordpress: wp_create_user( $username, $password, $email ); So how can i run this function from external call please? I ...
0
votes
0answers
88 views

All “Featured Images” not displaying after Wordpress update

After updating to the latest version of WordPress today, I noticed that all "Featured Images" on my website are no longer displaying. After trying to figure the problem out for hours, I added the ...
0
votes
0answers
36 views

Create user from external file

I have this little script for create user from page of template i use in wordpress template page : $user_name = "usertest"; $user_pass="123456"; $user_email="myemail@domain.com"; wp_create_user( ...
0
votes
0answers
48 views

WP Function still having effect after being deleted

I wanted to hide the add to cart buttons in Woocommerce so I created a custom plugin and added the following code to it: function remove_loop_button(){ remove_action( ...
0
votes
0answers
32 views

global vars in wordpress no works fine

I have 2 global vars defined inside funtions.php global $ruta_path; global $ruta_db; I want send the value of this global values to function in comments but no get works Inside comments.php i have ...
0
votes
0answers
95 views

Site is not updating because something is wrong with custom code. How to fix it?

I really didnt know what a proper title for this question could be. Anyways, I have this code in functions.php which is breaking my site function wp_show_post_views(){ global $post; $postid = ...
0
votes
0answers
47 views

using enqueue_script in a shortcode isn't working

I'm new to wordpress and I'm trying to get this to work by following the wordpress codex but I feel like I must be missing something obvious. I have a child theme based off of a parent one, and I ...
0
votes
0answers
227 views

Display default WordPress login/registration form into a modal window

hope someone can help me with this. I need to display the default WordPress login/registration into a modal window. I followed this tutorial in order to create the modal box and it is just exactly ...
0
votes
0answers
286 views

How to fix Warning: call_user_func_array()?

I modified my theme metabox.php to fit my needs, and I got this eror Blockquote Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mytheme_add_box' not found or ...
0
votes
0answers
46 views

How to structure plugin in to functions?

So I have customized a few plugins before, but never developed one from scratch. One thing that I have struggled with is structuring my functions. I found the following snippet and wonder how YOU ...
0
votes
0answers
78 views

Submit password to Ushahidi Platform using gform_after_submission

OK basically I run Wordpress as CMS and Ushahidi for collecting information from different area. All I want is a registration form that send data to 2 different platform. I used Gravity Form ...
0
votes
0answers
97 views

Add CSS Classes Field to Media Uploader

I need a functions.php hook that will allow me to add the standard CSS Classes field to the "ATTACHMENT DISPLAY SETTINGS" section of the Media Uploader modal. I know the css class field can be ...
0
votes
0answers
53 views

Update members data daily by a function

I use a function to update data (likes, +1, views, point, posts..v.v.) for all members on site Once Daily. So it may be can not run with >2000 members and >5000 posts. Only display a blank page. The ...
0
votes
0answers
32 views

the_content() function in loop-single.php

i need to show to different layout based on featured_image size for that how on can the_content() as per that. if featured_image .size =={ the layout would A } else{ the layout would B } how does on ...
0
votes
0answers
73 views

Adding result from PHP function into an input field

I have the following PHP code which is a template page for a wordpress site: <?php /* Template Name: Calculator Form */ get_header(); ?> <div id="content" class="grid_7 suffix_1 <?php ...
0
votes
0answers
184 views

php dynamic function when using wp super cache

I'd like to start using wp-super-cache on my website to improve page load times, but I would also like to keep at least one of my dynamic functions working. Basically when ever a user visits a single ...
0
votes
0answers
143 views

Functions.php not working in 2013 Child Theme

I have created a child theme base on the new twentythirteen theme. I made a style.css file and put a few styles in it. I've selected the child theme and my css styles are working. No problem there. ...
0
votes
0answers
62 views

How to add html div´s inside wordpost?

I need some help. The problem is, I decided to build a match stats which i want to insert in the proper wp posts.I build it with html and css.The issue is when i add the code of it, which contain div ...
0
votes
0answers
159 views

HTTP_HOST changing in functions.php

I have getting variable results from the $_SERVER['HTTP_HOST'] variable in the functions.php file of our child theme. Let me explain our setup and then I'll explain the issue. We are running WP ...
0
votes
0answers
54 views

Using jQuery Effects in Theme Template Files

Im currently working on a child theme, creating a single-*.php file for one of my custom content types. The end result is that it will be using some jquery for links generated on each single page of ...
0
votes
0answers
180 views

Dynamically generate a sub-page for each ACF repeater field created

I've created a custom post type in my functions file and am using an ACF repeater field to generate custom fields, one of which is an repeater field for events. I'm trying to get Wordpress to ...
0
votes
0answers
53 views

Using array page name together with page id to deregister script

If I use this: if (is_page(array(blabla-test-page, 20726, 20720, 38881))) {wp_deregister_script( 'gdsr_script' ); } the blabla-test-page looks like it overrides different pages, even if certain ...
0
votes
0answers
98 views

What code do I use in the functions php file to make an image auto update in a container box?

Is there a way to make an image autoupdate in a container by using code in the functions php file? This is probably a dumb question and I'm probably not asking it right. Basically, I want a box above ...
0
votes
0answers
138 views

Show post last modified date twentyeleven theme

Here is the code snippet i'm using to display last modified date in my twentyeleven child theme since i frequently update my posts but the problem is search engine is not displaying my post last ...
0
votes
0answers
166 views

Changing /author/ link to something else: what is a better way?

Is there a better way than this snippet I am using? function change_author_permalinks() { global $wp_rewrite; // Change the value of the author permalink base to whatever you want here ...
0
votes
0answers
187 views

Full size image option removing problem

I have removed the Full size image option from the media upload window see Code: function theme_t_wp_set_image_size_options( $sizes ){ $sizes = array( 'thumbnail' => 'Thumbnail', ...
0
votes
0answers
408 views

How to add a class name to the ancestor <li> of a post?

I've asked this question before with a different Question Title over at Stackoverflow. At that time, I was not yet aware that a function of the theme is adding a class name called current-menu-item. ...
0
votes
0answers
57 views

syntax error unexpected '}' at 364 line

I am getting this error on my website and am not able to access admin dashboard. The error occurs when I am a new theme on my website. Can you please help me to find this error. Parse error: ...
0
votes
0answers
46 views

get_post_meta no longer working

I am trying to use get_post_meta to return a value from the post meta, it was working completely fine then suddenly stopped working. I've tried and checked everything and i cannot seem to get it ...
0
votes
0answers
50 views

Highlight posts currently being edited on multiple editor site?

I have a custom page that uses the Cleverness To-Do List plugin to display multiple posts on a page. My site has multiple editors, and if a post is currently being edited on the custom page (not the ...
0
votes
0answers
74 views

How to delete in the pages the pre tag added automatically by Wordpress

i have been looking around but there is not a specific answer to my issue. I have set up a slideshow by Wordpress, then i paste the short code in the page where i want to display. The slideshow is ...
0
votes
0answers
22 views

New theme crashing site

I have recently recreated a theme on our site. I took the old theme as a base and started messing around and trying to be more efficient with our code and what it was doing. And it all seemed to ...
0
votes
0answers
245 views

Get User Login Data (date, time… )

I did my best looking for information about this subject. Your guidance is appreciated. My goal is to perform some actions based on the number of user logins on my website per month and login days ...
0
votes
0answers
195 views

Can't preview custom post - Redirected to home page

When I click on preview in custom post types I get redirected to home page. But when I visit or view the page that have all the Custom posts in I can see all of them. I cant figure out what or why. ...
0
votes
0answers
75 views

How to get dynamic data in page hierarchy?

I'm trying to mimic the page hierarchy rules of WP. I'm checking for the existence of certain files, then requiring them if they exist -- in the same order as I understand the hierarchy rules. Here's ...
0
votes
0answers
43 views

Run function from parent on child site

I'm running a Multisite WordPress installation and have a couple of child sites. I'm trying to run a script from the main page on one of the child sites. It can be a shortcode [pro_display_zone ...