The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

0
votes
1answer
1k views

Slow site initial load time

for some reason my website www.gcprive.com takes a very long time to respond initially but then loads all of a sudden. Any ideas why this happens? I am trying to optimize speed in general but this is ...
1
vote
1answer
408 views

Add custom image sizes to media uploader

I want to add custom image sizes to the media uploader: In order to do this, I use the following code (comments are there for convenience): // this function adds the custom image sizes to the ...
2
votes
1answer
181 views

New Plugin: Post update pushes a copy as a revision

I've been working alot with editing of posts after they've been published. I know I can hit update on the post to just update it, but I want to have the journey of revisions available for users to ...
0
votes
2answers
137 views

Check IF single OR multiple custom data has been entered

I'm building a single template right now for a custom post type. I'm wondering if there is a way to check if either at least one or multiple of the custom values has been entered so I can display the ...
1
vote
1answer
86 views

How does WordPress determine which multisite the user is on from the URL?

What is the file and line where WordPress determines which multi-site the user is on from the URL? I've been looking through the code all afternoon and can't figure out where it turns mysite.com/...
3
votes
2answers
888 views

wp_mail function timing out

I have the following function. This is part of a membership-based site. When a post of the type "message" is moved to Publish status, it should send an email to all users who belong (custom user meta) ...
0
votes
1answer
499 views

Understanding Post Formats/Custom Post types Etc

I don't understand what "Adding Post Type Support" is for when we have "Adding Theme Support"? For different post-formats this is the way I was shown before. This is then how I did it for the project ...
0
votes
1answer
1k views

Link a lightbox thumbnail to a post instead of opening the lightbox

On my website portfolio I use a heavily modified version of the Swatch theme from Woo Themes. The theme makes the thumbnails for my portfolio pieces link to the lightbox. I want the thumbnails to ...
-1
votes
1answer
497 views

Class for Selected Menu using wp_nav_menu

I create Widget for Vertical menu Now I am trying to get selected or current menu using wp_nav_menu Any one know how to Add current class when selected in wp_nav_menu
0
votes
3answers
2k views

Get Admin Email Address From External PHP page

I am setting up a "built in" contact form that I need to pull the administrators email address from an external php page. For instance, my form action="path/to/process_form.php" Within that ...
14
votes
2answers
11k views

Getting only direct child pages in WordPress with get_pages

I am trying to fetch all direct children of a page. But I am getting all children and grand children as well. Any ideas? PHP Source: $args = array( 'child_of' => $post->ID, '...
0
votes
1answer
102 views

Set active class in a Php foeach

I have the following code to display a list of taxonomies in Wordpress. It works and my only concern is the active class (li class="active"). Err, how do I go about making it dynamic? <ul ...
0
votes
3answers
2k views

How to Create a Directory in a Plugin Folder?

I am creating a plugin in WordPress Version 3.4.2. When the administrator submits a form, a new folder is created inside my plugin directory and a file saved in this new folder. But it gives me the ...
3
votes
2answers
1k views

queries inside of a class

I'm building a plugin and I'm quite new to wordpress I have a class what has couple of methods what should execute database queries. The class look as it follows class MyClass{ private $...
0
votes
1answer
617 views

AJAX function not working [closed]

One person on the site wrote a function, but I do not know why it works. This function displays a random quote. The functions implemented the ability to download new quotes via AJAX (link New Quote), ...
3
votes
3answers
102 views

reason of splitting theme files to multiple files

I can create my theme without splitting it into separate files. Why do theme developers split WordPress theme into a few single files like header.php sidebar.php and etc?
1
vote
1answer
242 views

Send email on Job Dispatched from WP e-commerce [closed]

I sell a product using WP e-commerce that is downloadable only after I check some information that the customer sends me. After checking the information I would like to go to the WordPress dashboard, ...
0
votes
3answers
5k views

Show content if parent page has children

Using this piece of code you can show content depending if it's a child-page or not: <?php global $post; if ( is_page() && $post->post_parent ) : ?> This is a child-page. <?php ...
1
vote
2answers
113 views

Why does running get_the_excerpt() when generating JSON file take 28 seconds vs. 599 milliseconds without it?

I am using the following code to generate a JSON feed. I need to extract the excerpt from posts, but when I run get_the_excerpt() it takes 28 seconds (yes SECONDS!) to run on my local server versus ...
0
votes
1answer
398 views

JQuery prepend a function

I am trying to see where I went wrong with this code. I was trying to prepend the avatar and user meta above the admin menu. I get header already sent messages as well since the code is just right ...
1
vote
1answer
775 views

Adding a slider captcha to the comment system

QapTcha is a draggable jQuery captcha system. I have been trying to create a plugin to make it work on the Wordpress comment system. I found a plugin that is already doing this but it is outofdate and ...
1
vote
2answers
8k views

How to add a php custom page to Wordpress

I want to create a custom page for my Wordpress blog that will execute my php code in it, whilst remaining a part of the overall site css/theme/design. The php code will make use of 3rd party APIs (...
2
votes
2answers
1k views

If in parent category

I have this structure Category > Subcategory > Post I´m trying to display some content if the user it´s on a specific category, or in it´s subcategory or post. I´m using this code but it only works ...
0
votes
3answers
1k views

How to display different widgets on specific pages, hide from other pages

I want to display a dynamic sidebar on all pages, and a different sidebar on the homepage. There are also particular pages where I don't want to display either of them. This code is not hiding the ...
1
vote
2answers
812 views

Bridging TinyMCE js and Wordpress PHP?

I'm updating my wordpress plugin to use a custom TinyMCE button. From inside the TinyMCE button javascript, I'd like to interact with wordpress data--ie set custom post options inside the plugin ...
0
votes
1answer
643 views

More gentle way to hook Wordpress custom url

I have written a plugin named foo, and I want when user typed url /hello and it will display the string world There is an existing post which uses the following code if ($_SERVER["REQUEST_URI"] == '/...
0
votes
1answer
489 views

xmlrpc how to check for errors

I am trying to post to wordpress with XMLRPC using this tutorial:http://wp.tutsplus.com/tutorials/creative-coding/xml-rpc-in-wordpress/ the problem is that tutorial does not have any kind of check ...
-1
votes
2answers
374 views

Get URL from shortcode tag

I am running a wordpress site and I need the correct regex syntax to get a URL from some shortcode that is returned inside the_content(). When I use the_content(), it will return something like ...
4
votes
1answer
4k views

Check if post of title already exists

I'm writing a plugin that takes an xml feed and posts it into WordPress using wp-cron Everything is working dandy, except it keeps adding the same posts over again. So, I'm working on a system to ...
1
vote
3answers
7k views

WooCommerce - Fixed quantity of a product [closed]

I am trying to accomplish a thing on WooCommerce that I can not find any information about. It is like the following scenario: I sell screws and have 1500 in stock. I would like the customer to ...
1
vote
1answer
138 views

Why isn't admin_notices displaying my text? [Simple Plugin, Beginner]

Here is some code that is the result of four days of studying Wordpress and PHP. Unfortunately, it's not working the way it's supposed to. Nothing displays at the admin_notices bar. Originally, I ...
0
votes
3answers
6k views

Single.php back button to parent category

I want to add a back button that goes to the parent category of the actual single post that the user is viewing. How can I do that? <h2 class="link"><a href="#">Return</a></h2>...
0
votes
2answers
3k views

Custom single.php files for different post formats

I have 3 custom post formats. One is for image, one for video, and, one for gallery besides the default post and they each have a view comments link on the bottom right corner at the end of the post. ...
0
votes
1answer
747 views

Loading a post's content, into a div outside the loop, when it's title is selected in a list

I am building a site in wordpress where at a certain part there is a container that has a list of post items (see it as a menu/sidebar), and an empty space where I will load content. When you click on ...
0
votes
1answer
251 views

Pulling sub-site content into specific pages

I'm working on a school website. The design calls for a collection of largely static pages, but for each class to have a blog which will be updated every few days. I know nothing about WordPress or ...
0
votes
1answer
391 views

Call plugin with php function

This plugin only works as widget. I need call this plugin with php function. How to modify this code ? <?php /* Plugin Name: AJAX Calendar Plugin URI: http://urbangiraffe.com/plugins/ajax-...
0
votes
1answer
2k views

Set WordPress Default Template

I'm using the Options Framework Theme to put together my options page and would just like to know how would I set up/call the Default Template - for whichever one the user has selected. For example, ...
0
votes
1answer
278 views

Does WordPress cache get_user_meta() results?

If I call get_user_meta() to retrieve a value, does WordPress cache the value? If I call get_user_meta() to retrieve the same value, does WordPress have to query the database again or is it stored in ...
2
votes
2answers
1k views

Renaming wp-content folder dynamically

Is it possible to rename the wp-content folder dynamically? I am building a custom framework to use on themes and it would be nice to set it up where it does everything on its own. I am using this ...
1
vote
1answer
735 views

Limit the Excerpt field in WP-Admin in words

Is it possible to limit the Excerpt field on the post page in words? Note that I am aware that it's possible to echo the excerpt and limit it in words, but I want the field itself to limit the amount ...
0
votes
1answer
48 views

Wordpress create new <section> on site when a new page is added

I'm trying to create a single page wordpress theme. Whenever I add a new page, I want a new to be added to my Single page theme. I'm currently using this code: $pages = get_pages( array ( '...
0
votes
2answers
468 views

How do I define a lookup table that will work across all PHP elements of the template?

I'm using a lookup table to define a few things for the qTranslate plugin Table $trans_home = array('en' => 'Home','it' => 'Home','de' => 'Home','zh' => '首页','es' => 'Página de inicio'...
4
votes
1answer
405 views

List latest posts in WP-Admin

I run a multiple author site and I have created a plugin in wp-admin where authors can connect and collaborate with each other. To enhance it, I want to display a list of latest posts, this list ...
0
votes
1answer
94 views

Cloning add_settings_field() with jQuery

Is it possible to setup one add_settings_field() in an options backend and then use jQuery clone function on the front end and be able to create multiples of whatever and save that in an array? I've ...
0
votes
2answers
374 views

Page Options Saving But Not Updating In Backend

I have created a custom options page for a slider that you can upload slides to. Everything works great except when trying to save the data. It will get saved and I can use it on the front end. But ...
3
votes
1answer
933 views

Rewriting search and pagination base

After trying for weeks now how to find a working solution I got rid of most of my functions and trials and just left the pagination function underneath in my functions.phh file: /** * Pagination ...
0
votes
1answer
1k views

Adding Meta Tags to a Post using its Tags, Excerpt and content

I run a multiple author platform where I have added conditions that force authors to add tags to their post. To improve SEO, I would like to add Meta Tags to the posts. Ideally, with a light solution (...
1
vote
2answers
844 views

Reordering Buddy Press profile navigation [closed]

I am using this code to reorder the positions of the menu items for BuddyPress profile. I am using the xprofile (not sure if that makes a difference). Here is the code that I am trying to use: <?...
1
vote
1answer
67 views

custom fields wordpress

I am trying to add a value assigned in the custom field by doing a post in these following steps: I make a new post, add a new custom field where i specify a name and a value. PHP I add the ...
4
votes
7answers
261 views

Plugin or mod for wordpress to make content publication SUPER easy

Well, im making a wordpress web page for my dad, a psychiatrist, who barely knows how to check his email. He wants to put content regulary but the actual admin interface of wordpress is way to complex ...