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

learn more… | top users | synonyms (1)

0
votes
2answers
71 views

search and add in wordpress content

I have a wordpress plugin that displays videos through a shortcode. My problem is it assigns the div's with ID's such as video-1-player, video-2-player, etc. I need to create a function that searches ...
0
votes
1answer
33 views

Cannot Access Console

http://bigpicturepartnering.com I can log into the site. When I try to access the WP console I get the following error: PHP Fatal error: Call to undefined function is_site_admin() in D:\websites\...
0
votes
1answer
345 views

File Upload with Server in safe_mode

When I try to upload an image to a post, I get an error: "The uploaded file could not be moved to /home/httpd/xxxx/xxxx/xxx/wp/wp-content/uploads." My server is set up in safe_mode - is that the ...
0
votes
1answer
271 views

What's the best way to include php code in to pages?

I'm currently creating a bunch of (empty) pages and performing conditionals such as is_page('Blabla') on it, which increases my page.php significantly. I'm already using require_once for different ...
0
votes
3answers
2k views

I want Page titles and excerpts to show up on home.php in certain order

In the functions.php, I have the following code added: add_post_type_support( 'page', 'excerpt' ); This allows pages to have excerpts. The reason I want an excerpt is because I want to call only ...
0
votes
1answer
166 views

Wordpress permalink issue

If i try to access my wordpress page using the native url structure i.e. for instance: www.mywebsite.com/?p=123 I am redirected to my homepage. It doesn't seem to be an htaccess issue for I tried ...
0
votes
1answer
80 views

Any way to hide a blog posts text if it's longer than let's say 300 characters

Is there a way of hiding a blog posts text if it's longer than let's say 300 characters. I don't want it to push the rest of the content below the fold. You know, the show more text thing.
0
votes
1answer
60 views

WP plugin updates [duplicate]

Possible Duplicate: WP plugin updates I wrote a plugin for WordPress which requires regular updates. Is it possible to notify user of new version being available (some of the other plugins ...
2
votes
2answers
2k views

problem with ajax and the path to the php page

i would like to call a php page from an Ajax method : the alert works fine, the code as well has been tested outside of wordpress, but here it seems that the php page is never called. I found some ...
2
votes
1answer
1k views

Using WPAlchemy metabox values in another metabox

I'm building a quite complex custom post type structure and I would need some help regarding my metaboxes. What I want to do: Thank's to the have_fields_and_multi() function, the user enters data ...
1
vote
2answers
119 views

Can anyone offer any help with this function?

I am trying to write a function for my functions.php file. I has to do the following; loop through search results and check the template if the template is 'landing.php' add it to ad array use the ...
-1
votes
1answer
808 views

Adminimize Plugin — Is there an alternative to limiting Editor to 'Appearance > Widgets' only?

Adminimize > Menu Options: I want to grant access to "Appearance > Widgets" only to select users (but not Themes, Editor, Add New Themes; nor Plugins, Settings). Although I have selected this in the ...
2
votes
1answer
245 views

Anything I can add to functions.php to make text widgets accept PHP?

Is there a way I can make text widgets accept PHP? Perhaps something I can add in to functions.php? I'm redesigning my site, and I was wondering why I didn't use widgets at all in my current design, ...
0
votes
1answer
217 views

eaccelerator PHP error

I installed a Wordpress plugin and I'm getting the following error. The weird thing is I checked the plugins' source and I really don't understand why it would need those scripts. [30-May-2011 11:...
2
votes
1answer
3k views

Can't use get_results() in ajax query

I'm using a jquery ajax call to get certain data from wpdb and I'm getting the following message: <b>Fatal error</b>: Call to a member function get_results() on a non-object in <b&...
3
votes
3answers
6k views

Facebook Comment Count

I am a bit of an amateur when it comes to PHP and WordPress but I have rigged up the following code: function fb_comment_count($url = 'some url here') { $filecontent = file_get_contents('https://...
1
vote
1answer
843 views

Wordpress override bloginfo variable

How would I override a bloginfo variable in wordpress? For example, I want to replace this: <?php bloginfo('stylesheet_directory'); ?> to return a custom URL like http://mysites.com/hello/
1
vote
2answers
301 views

Can I install/embed Wordpress on a 'single page'?

I'm building a website from scratch (PHP, jQuery) and want to have full control over the design, implementation, etc. I want to install Wordpress so that when you go to a certain section of the site, ...
0
votes
3answers
1k views

Hide a nav menu item based on get_user_meta results

I'm trying to hide a navigation menu item under certain circumstances. Specifically, if a user is logged in AND has already registered their product bar code, I want to hide the 'Register Kit' link (...
1
vote
1answer
2k views

Create a new usermeta field for users

How do I create a new usermeta field with a drop down selection values? Im want to create a conditional statement for all users with a certain value of the new custom field I want. For example, The ...
1
vote
1answer
429 views

Create own Wordpress shortcode gallery

How I can handle this shortcode: [my_gallery] img01.jpg img02.jpg img03.jpg img04.jpg [/my_gallery] I can't understand how to write a function, to handle image files name.
5
votes
2answers
4k views

Wordpress Custom Post Types with a page as a parent?

I have a lot of custom type items in my new WP project, and for navigation reasons, I want to make the parent to some of them a Wordpress page. The problem is that apparently, Wordpress does not let ...
0
votes
1answer
93 views

Custom Archive Page

I want to create a custom archive page. It will look like this: 2011 January February March April May June... (Months) May (Current Month) Post 1 Post 2 Post 3 ... And clicked one of months (...
4
votes
1answer
226 views

PHP 5+ stream wrappers with the underlying WordPress File API?

I followed the gsoc project last year from Jon Stacey with great interest only to find out that this project was just the 'base' for a working solution. http://gsoc2010.wordpress.com/tag/stream-...
1
vote
1answer
187 views

Is Auto Post recognition a WordPress feature? How to turn it off?

I noticed that if you go to lostlettermen.com/aa, it redirects to a post. Is this a feature in WordPress that can be turned off, or is this done by some type of plugin or custom code?
0
votes
2answers
467 views

Show label for value only when value exists, basic php

I currently have this, <?php $meta = get_post_meta(get_the_ID(), 'rw_agentPhone', true); echo "office:"; echo $meta; // if you want to show ?> Which is fine provided there is a value for ...
7
votes
2answers
5k views

Any guides on creating custom admin pages?

I basically want to create a table (preferably AJAXified) that lets the user enter a line of information, and be able to add new lines of information, and delete selected ones. I've found this post ...
2
votes
1answer
2k views

media_handle_upload weird thing

I am using a front end script to upload images , all works fine but recently i noticed the uploaded images are not saved in proper directory. My settings are to Organize my uploads into month- and ...
2
votes
1answer
2k views

Publish pending article from front end with a button?

Is it possible to take the blue publish button in back end of the wordpress and place it in the frontend near the post in my index.php. I need a way to publish the pending article without going to ...
3
votes
3answers
999 views

Add Useragent to the body class?

I'm looking for a way to add body class depending on the User Agent of the client with php. I'm looking to implement it this way: page.php: <body id="front" <?php ( function_exists ( '...
0
votes
2answers
304 views

Trying to use Ternary operators with WP Conditionals

Hi I am trying to use ternary operators with WordPress condtionals, using the code below, but it's giving me a PHP error, what am I doing wrong? echo is_home() : '1' ? '0';
2
votes
1answer
796 views

Convert imploded plain text into links

I'm completely open on how to do this: I have the line: echo implode(', ',get_field('categories')); Which is outputting this: Branding, Web, Print I have 20 or so options it can output ...
1
vote
1answer
360 views

Match checkbox data with page title to show certain items

I want to show the projects that has had it's checkbox ticked as Branding, if it's on the Branding page (i.e the page title is Branding). To explain the code a bit: This line show's all the ...
1
vote
2answers
623 views

Wordpress - Display array data of a child

I've used the wordpress plugin - advanced custom field and would like to show an array of a child, here's my code: I'm using this code to show the custom fields data from a specific page ID's ...
0
votes
2answers
372 views

How to internationalize header image?

I have in the following code in the template: <img src="<?php header_image(); ?>" /> However, I want to change this image according to the language selected (through GET parameter lang)....
0
votes
1answer
70 views

Is there any wordpress plugin to upload images and captions to multiple pages once

Hi I have a couple of pages that need the same images and captions, is there a wordpress plugin that would allow this on 1 upload?
-1
votes
2answers
6k views

Call to undefined function issue

I know there are other, maybe better ways to do what I want to achieve, but I have to use this solution. I have two stylesheets: style.css - normal stylesheet style-dynamic.php - dynamic stylesheet ...
0
votes
1answer
49 views

Looking for a good way to include php code in posts, but using special include markup rather than direct php code

Ok, bit of a weird one... I want to include php code on one of my pages within the content by adding something like: Welcome to the payment page [paymentform] Blash blah vlha... And then [...
1
vote
1answer
569 views

Query & Order posts by custom fields

I'm trying to query a custom post type "jogos" where the meta value "data_de_lancamento" (launch date) is <= than today's. That field uses the format dd/mm/yy. The returned posts from that query ...
1
vote
1answer
1k views

What's the proper way to use wp_enqueue_script/style?

First, let me tell you how I'm currently doing it. I have this function. It's purpose is to take the the string of a file system path (/root/web/dir/some/path/to/file) and return the equivalent URL (...
0
votes
2answers
188 views

Plugin error after installation

I'm running WP 3.1.2 on an Apche server with the latest PHP installed. My WP is setup for a subdirectory multisite. The themes for the sites are usually a modified TwentyTen theme. After installing ...
2
votes
3answers
1k views

get_transient(), PHP switch(), and comparison operators

Im using a WordPress transient, which expires after an hour, to store a value which is an integer. Im trying to use switch() and multiple case() statements to evaluate if the transient exists or not (...
0
votes
1answer
922 views

How to use multiple check-box values to work in a function and insert values in database

I am working on a custom theme where there is option to upload images . I have certain check-boxes in the form which the users select as per where the image has to go. My form code is as follows : &...
0
votes
2answers
201 views

How to change a specific character in a theme option value - replace a space with a plus sign

I'm writing a theme where I'd like to give users the ability, via a theme option, to specify a typeface for their site with Google Web Fonts. If a user wants to embed a font like, say, News Cycle, ...
-2
votes
2answers
266 views

Is there any way of not using my_init_method in the following code (that creates a custom post type)?

Mike Schindel provided me this code long time ago: <?php /** * Create the Blocks custom post type and the Sections custom taxonomy */ add_action('init', 'my_init_method'); if (!class_exists('...
4
votes
3answers
4k views

Does an activated plugin automatically mean its methods are available to other WP functions?

I made a WordPress plugin like this: Class MY_CLASS { //codes } Global $myclass; $myclass = New MY_CLASS (); After installed and activated the plugin, can I use this class in other plugins without ...
0
votes
2answers
895 views

Custom Field IF/ELSE PHP

Ok so i am trying to use WordPress's custom fields and have them working but now i have some php code i need help with. <a href="<?php echo get_post_meta( $post->ID, '_ct_text_4dc9e9f74d000',...
1
vote
2answers
995 views

Call External Object in Class Function During Callback

I've a class which has a function that check and creates table in database. In order to do so i need to use WordPress $wpdb object. I need the function to run only on first plugin activation, so i ...
1
vote
1answer
291 views

Detect session/cookie variable in wordpress to prevent access to documents

<?php @session_start(); If (!array_key_exists(‘authed’, $_SESSION)) { include ‘not_authed.inc’; exit(); } // go about your business. ?> and i'm trying to add that to this: <?...
0
votes
1answer
840 views

How to fix this PHP warning in WP-Admin after upgrading to 3.1.2?

I just upgraded from 3.0 to 3.1.2 and in the comments column under Posts in the WP Admin, this error keeps appearing for every row: Warning: number_format() expects parameter 1 to be double, ...