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

learn more… | top users | synonyms (1)

1
vote
1answer
214 views

Checking if Post Title is Unique as Loop Criteria

I'm trying to make a seemingly simple bit of php (it output's to a Gravity Forms field, but that's basically irrelevant). I'm using Gravity Forms to create posts, which I can do easily, however I ...
0
votes
1answer
464 views

How to call the_author_meta and make it work?

I am developing an author badge for my Wordpress site and I am learning how to call meta functions (needs to be within The Loop). The meta functions that I am calling are author bio related, like ...
0
votes
1answer
119 views

Search.php gets metadata from first post

I've got this in header.php in <head> section: $page_color = get_post_meta($post->ID, 'page_color', true); It works fine because it gets correct page_color for posts and pages but when I ...
1
vote
1answer
457 views

Whats the proper way to use a php stylesheet in a wordpress theme? [duplicate]

Possible Duplicate: How can I use WordPress functions in my stylesheet? I have a file, custom.php, thats basically a stylesheet with php variables for the styles. I used this guide to make it ...
0
votes
1answer
120 views

Make table disappear when fields are left blank?

I made a table out of the fields in a custom meta box I created, but now I'd like to know if I could have the table disappear if none of the fields were filled in. Is this too complicated, is there a ...
0
votes
1answer
528 views

Convert function output into string

How can I convert functions like the_permalink() into strings like $permalink?
-1
votes
1answer
49 views

How to post data to a word press site in case of a mobile app

I have a site made with word press. I came across a requirement where a developer tries to log in from an ipad or iphone into word press site. Is there any plugin to achieve this ?. there is a ...
0
votes
2answers
349 views

Commas in Tag Cloud

Using <?php wp_tag_cloud(''); ?> to display tags on my website, how do I separate each tag with a comma but also remove the comma from the last tag?
0
votes
2answers
82 views

What is the most efficient way to manage changes my product comparison tables?

I have a site that features tables comparing products over hundreds of pages. Many of these products appear multiple times and I originally made these tables static, and now need a more efficient way ...
0
votes
1answer
104 views

Display static pages instead of category, in code

I'm very new to programming and not sure how to go about this. The following code returns 3 category names and feature images and then outputs them on the page. <div id="footer"> <div id=...
0
votes
2answers
40 views

Making my first wordpress template

I making my first Wordpress template. I used this code to add only the h1 to the page. <?php $title = get_the_title($post->ID); echo $title; ?> But is there a code. That only add the post ...
0
votes
1answer
161 views

Where are Sessions are being started? [closed]

I have this site here http://www.taranmarlowjewelry.com/, I am using twentyeleven theme and there is a session I need to adjust called 'PHPSESSID' The problem I having with PHPSESSID is that when ...
1
vote
1answer
2k views

How can I randomize a Nextgen Gallery Slideshow [closed]

Been googling for an hour now can't find the answer to what feels like a simple question. I have a very basic slideshow. I am using the shortcode to load it into the template page. [nggallery id=1] ...
1
vote
1answer
816 views

Memory errors with media upload, Wordpress can't use more than 96M (while there's 512 available!)

I'm aware that this is a known problem but I was unable to address it using information found in WPAnswers and Wordpress support forums. In my Worpdress single site installation the media uploader is ...
0
votes
2answers
2k views

How to decrease the max file upload size without using php.ini or htaccess?

There are a lot of people discussing how to increase the php max upload file size... In my case though I want to shrink it from 8MB to 4MB... In my cpanel configuration, if I change the setting, it ...
0
votes
1answer
311 views

Editor capabilities - admin_init

I'm having a little difficulties with roles and capabilities. Editors gets a 'Cheatin uh?'-message when they try to update the custom theme-settings. Can anyone explain why - or maybe even have a ...
0
votes
1answer
476 views

populate select options from extra mysql table data

hi guys i am trying to populate a select element with options from the data in one of my sql tables heres what i have so far: <? $SQL = "SELECT * FROM pt_country ORDER BY name"; $rs = $wpdb-&...
0
votes
1answer
77 views

WXR XML import is stripping php tags that I need to keep

When I import my WXR XML file it appears that wp_insert_post (or another function) is applying filters to strip php tags that I need to keep in my content. I have searched the various wp-include php ...
0
votes
1answer
277 views

Trying to change featured image from 180x180 to full width on home page

Right now my theme puts a 180x180 square image to the left of the title on the home page for each blog post. I'd like to change that to be full width of the content area and below the title. I'm using ...
0
votes
1answer
113 views

Showing all post from all post type in admin backstage

I try to create an admin page where to display all posts from all custom post type. It is something like in edit.php, but instead of displaying single post type,I would like to display all posts in ...
1
vote
2answers
359 views

Add custom php database code above <head>

I have a non plugin script that has it's own database and I want to use it with Wordpress. How can I add custom php code that connects to this separate database in my wordpress pages? It needs to go ...
2
votes
1answer
121 views

Wrong links in Wordpress?

I have a project on Wordpress. I would like add an article. In admin panel I click on Post, then Categories and add a new category called article. Next I add a new post and edit title, body and ...
0
votes
1answer
38 views

Or operators in PHP [closed]

can anyone advise what i'm doing wrong here? I'm trying to load a jQuery function IF the page isn't using a template OR if it's not a single OR if it's not an archive. I have the below... <?php ...
1
vote
1answer
2k views

Change slug with custom field

I want to change the slug of a post with a custom field. In example, if the custom field is "keyword" my post link will become: mysite.com/keyword. If the custom field is empty, i want to generate a ...
0
votes
2answers
660 views

Get unique post in parent category

I have a parent category and several child categories. I also have several posts that belong to the child categories. Each post can be belong to several categories. I want to know how to query the ...
0
votes
1answer
413 views

How to use array in function to get only value I want

I am trying to work this function in wordpress theme the way where I can get value only what I want and not all to gather. I am not much familiar with using array in function so I need you expert help ...
-1
votes
1answer
435 views

how to search through plugin in wordpress cimy-user-extra-fields?

I have a plugin clalled - Cimy User Extra Fields. I need to search the content through this plugin. This plugin is in WordPress, and all the content are stored in the database also, like industry, ...
0
votes
1answer
137 views

How to remove parent section in an attachment URL in wordpress?

In wordpress, an unattached attachment URL is http://domain.com/?attachment=$id Once after it's attached to a parent, it goes with parent's URL structure, for example: http://domain.com/parent-...
0
votes
2answers
162 views

How can I open up my administrative panel to everyone?

I'm planning on running a open news site that I want everyone to be able to view the inside of the site without registration. I feel like it should exist a simple check for viewing the WordPress ...
2
votes
2answers
3k views

How to register images uploaded via FTP in media library?

I'm using my own upload.php file to upload images to: $upload_dir = wp_upload_dir(); $targetDir = $upload_dir['path'].'/'; It works like it should with this exception that images uploaded to ...
0
votes
1answer
156 views

Post type Echo code is repeating on homepage

Hi i'm using this php code that allows me to call a div in different post type, but the only problem is when i add a second line instead of it showing only on the post type page it shows on the home ...
0
votes
2answers
470 views

Thumbnails appear to be zoomed

Im using a theme which has my thumbnais set to 150x150px. But after installing plugin (just too check it out) I noticed it displays them correctly, but the default thumbnails are zoomed in. Can ...
4
votes
2answers
2k views

Searching users with WP_List_Table plug-in

I am trying to devlope a plugin that will search and return my users so I can edit some other metatdata that belongs to them. I have been using the plug-in listed on the Codex as my starting point. I ...
2
votes
1answer
1k views

Fatal error: Call to undefined function wpsc_cart_item_count()

-- I've just done a fresh install of Wordpress 3.4 -- I've downloaded and uploaded this new free eCommerce wordpress theme suggested by smashing magazine. { http://www.smashingmagazine.com/2011/10/...
18
votes
5answers
17k views

Sending the reset password link programatically

I have this manually created page: $user_login = sanitize_text_field( $_GET['user_login'] ); if ( username_exists( $user_login ) || email_exists($user_login) ) { ?> <!--Everything has been ...
2
votes
1answer
1k views

Add a Custom Class to Admin Menus

I am looking for a way to add some custom classes to the admin menus using PHP. For example, here are the li tag for Posts and Pages: <li id="menu-posts" class="wp-has-submenu wp-has-current-...
1
vote
1answer
224 views

Sort by page information by Ascending Numbers

Basically I have a problem that I have details being pulled from advanced custom fields and I currently have them ordered by page title in ascending order. However, instead of ordering them Ascending ...
1
vote
1answer
131 views

Where to put snarfer.php?

I followed these instructions: http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates My understanding of those instructions was that the file snarfer.php needed to be in the folder '...
0
votes
1answer
917 views

Apply class to every third list item? [duplicate]

Possible Duplicate: How to mark every 3rd post I'm trying to give a class to every third list item on my page. I know how to give a class to every item, but not to specific items in a row, or ...
2
votes
1answer
1k views

Use ajax to update_post_meta

2 days ago I asked this then I tried to work on my code to be able to understand how ajax and php work and now I have a new issue that, probably would be easily solved. These are my codes: <?php /...
2
votes
2answers
806 views

How to get all events from 'All in one Events calender' plugin in JSON format?

I am using All in one Events Calendar plugin to add the events. It works fine in CMS. I would like to display the events data in mobile version. for this i used JSON-API for obtaining web-services in ...
1
vote
1answer
5k views

get current category ID php

I'm trying to get category ID of the current archive displayed. I tried: // category (can be a parent category) $current_cat_ID = get_query_var('cat'); // print_r ($current_cat_ID); It doesn't ...
5
votes
1answer
618 views

Wordpress URL Rewrite not working

I'm trying to create a custom url rewrite for my wordpress plugin. function insert_plugin_rewrite_rule($rules) { global $wp, $wp_rewrite; $wp->add_query_var('update_slug'); $ret = $...
4
votes
3answers
974 views

Rename files on upload

I have been trying to rename my images on upload and only piece of code I found was the one that uses a 32char hash. function make_filename_hash($filename) { $info = pathinfo($filename); $ext ...
3
votes
2answers
1k views

How to insert PHP code in a WordPress Post

I need to insert into post a simple form handler, but WordPress' engine deleted my code after saving. how can I fix it?
0
votes
3answers
2k views

Display WordPress Post Content in 3 Columns

How can I display WordPress Post Content in 3 Columns and in order using WP_Query(); ? For example, <div class="1column"> Post-1 Post-4 </div> <div class="2column"> ...
0
votes
1answer
616 views

update_post_meta not working

Making a plugin to make my life easier at creating over 3000+ pages. Take a look at the code I have so far. if (isset($_POST['action'])) { $one = array( 'post_title' => $_POST['title'], '...
5
votes
2answers
5k views

How do I directly access a PHP file located in my themes folder?

I have a file in my theme's folder called "test.php". If I go to www.mysite.com/wp-content/themes/my-theme/folder/test.php the theme loads which I assume is a 404 error handled by WP. If I change the ...
0
votes
1answer
506 views

Validate emails in array using foreach

How do I validate an array of emails from a textbox before sending them to the wp_mail function? $emails = 'test@test.com;test2@test2.com email3@email3.com,email4@email4.com, email5.com'; $emails = ...
0
votes
2answers
882 views

Remove the <ul> Tag from wp_nav_menu

I want to remove the <ul> tags from the wp_nav_menu. I already found different posts about it here but they don´t seem to work for me. Here is what I did: First I registered the menu in ...