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

learn more… | top users | synonyms (1)

0
votes
1answer
79 views

Dynamic Menu drops pages?

I've created a Dynamic Menu that highlights the selected page and colors for example the blog page "red" while the other links (home, about, contanct) remain white. My question is how can I make the ...
0
votes
2answers
151 views

Is the 404 page automatically displayed if a loop returns nothing?

If you have an index.php with a loop such as: if(have_posts()){ while(have_posts()){ the_post(); } } And nothing is returned, you would generally do a: if(have_posts()){ ...
0
votes
1answer
211 views

Custom Meta Box If Else Statement

I have created a custom meta box for posts and I need to display said data. I have been using the below method to display the data, But I am in need of a slightly different solution. <a ...
2
votes
1answer
114 views

Set a User as Author of all 'New Posts' posted

An Author 'XYZ' is need to be set as the Default author of all New Posts. Irrespective of the actual Author posting the content, the post should be saved by this author 'XYZ'. Is there a Plugin or ...
0
votes
1answer
975 views

Add multiple JavaScript files to template header [duplicate]

I have multiple JavaScript files that I want to load. Some of them in my header.php and the rest in the footer.php. These are the files: <?php <script type="text/javascript ...
0
votes
1answer
35 views

Reusing the page name class that Wordpress adds to body tag

When viewing my blog in the browser, the body tag (on the index page) has the following class: <body class="home"> On other pages (for this example, a page that pulls in posts that are within ...
4
votes
2answers
2k views

PHP unit testing WordPress?

Given how WordPress is written and how it interacts with a database and given how its not very much OOP oriented, is there a way to unit test a theme? is there a way unit test a framework (not a theme ...
0
votes
1answer
68 views

Can't insert files in other inputs

I'm trying to allow multiple images to be uploaded to the media library where I can then take the URL of the image and insert it into a custom page on the website but for some reason, when I click on ...
1
vote
0answers
363 views

Single Multisite Signup Page [closed]

I'm trying to turn the WordPress multsite signup page into a one step process instead of two. I'm wanting people to choose their username, email, password and a confirmation of their password, along ...
0
votes
1answer
31 views

Static pages not being allowed

I followed the directions for creating a static front page and displaying the news on another page. I have done this before with success but now I am having a problem. When I go to mysite.com/news I ...
1
vote
1answer
494 views

get_posts meta_value is serialized array, how can I grab specific posts with combination of meta_key/meta_value[0]->is_featured?

I've a postmeta key saved in DB: mediSHOP_product_extras It's value is Unserialized: Array ( [0] => Array ( [is_slider] => 0 [is_featured] => 0 [in_stock] => 0 [video_url] => ...
1
vote
2answers
313 views

Custom gallery in wp3.5

I used a tutorial I found for a slick little custom gallery in 3.4, but upon upgrade to 3.5 it no longer works. I'm trying to learn php still and can't seem to get this working again, as I either get ...
0
votes
1answer
3k views

Get URL Parameters from referer

Not 100% sure if this one classes as a php question or is specifically Wordpress... I'm implementing the Wordpress Settings API with a tabbed settings page. I've added a 'reset tab' button, but since ...
1
vote
1answer
270 views

Getting movie and serial on actor page

I'm building a cinema site, I came with a problem, let me explain: Movies- are stored in Post's Actors- are stored in Post Type - persoane ( taxonomy= lista) Serials - are stored in Post Type - ...
1
vote
1answer
1k views

Login/logout in header

I am looking to move the login / logout / my account / register details currently situated under my menu bar to above the menu bar. Essentially I want to add the details just after the header. What ...
0
votes
1answer
171 views

Adding a 'style=' bit to image_send_to_editor output

The best thing I liked about the new v3.5 media manager was being able to insert images to a post hosted by an external site like photobucket using "Insert from URL". I normally format my image ...
1
vote
0answers
64 views

Need help enqueueing webfonts

I am attempting to enqueue web fonts that I am loading in via the WebINK font library. (This service is similar to Typekit). This service works by generating a unique CSS link for each unique site. I ...
1
vote
1answer
30 views

How do I access the media settings

I have been trying to find a way to access the the maximum width of a large image as set on the media settings page? In my theme I am grabbing images from a server and have the ability to specify the ...
0
votes
2answers
168 views

Is the wp_enqueue method efficient?

I had a quick question regarding how you are supposed to load in scripts with Wordpress. I am developing a theme and I know that the best way to do this is to use the ...
2
votes
1answer
483 views

fetch_feed: retrieve entries in the appearing order, not chronologically

I'm using WP function fetch_feed to retrieve a feed and display its items. <?php /* include the required file */ include_once(ABSPATH . WPINC . '/feed.php'); /* specify the source ...
1
vote
1answer
88 views

Unique session WordPress

I want to allow only one session at the time across browsers and PCs. I want to "disconect" or log out to the old session if a new session starts in Wordpress.
-3
votes
1answer
69 views

$_html is empty when var dumped

So I have run across a bizzar issue, in which I know is working as i expect it to in terms of the array values, yet the _html variable returns something like string(29) " " which to my knowledge ...
0
votes
1answer
753 views

Add Adsense code in index.php

My wordpress blog homepage has thumbnail gallery. I want add adsense image ad code to 5,10 place. Below code from my index <?php if (have_posts()) : while (have_posts()) : the_post(); ?> ...
0
votes
1answer
129 views

Limiting the amount of posts retrieved by the loop

I'm using a theme which has its own homepage which is created using the theme options (i.e. so can't add content under Pages) so I'm trying to add the latest posts on the page, I have copied the code ...
0
votes
1answer
870 views

PHP Warning: preg_match() expects & PHP Warning: strip_tags()

I got this error log, do you know what is this and how can i fix this? [31-Jan-2013 22:01:25 UTC] PHP Warning: preg_match() expects parameter 2 to be string, array given in ...
1
vote
1answer
330 views

Random Default Avatar Function

UPDATE! After a little help from the wordpress.org forums, I made some progress with this code: // Custom Default Avatar if ( !function_exists('fb_addgravatar') ) { function fb_addgravatar( ...
0
votes
1answer
270 views

Remove read more

I'm using 3.5.1 and WP UI plugin. When i create a post, add automatically Read More button. Like this: <p class="wpui-readmore"><a title="Read more from NEWS" ...
2
votes
1answer
168 views

Archive dropdown styling not applied

I am trying to add a custom dropdown for archives but struggling with couple of mistakes that might be the reason why it doesn’t work. The CSS only gives my dropdown the width, not the other styles ...
0
votes
1answer
87 views

Limit the number of child pages

I have this html structure: <home> <Web> <web 1> <web 2> <web 3> <web 4> <web 5> <web 6> <web 7> </web> <Print> ...
1
vote
1answer
71 views

WP & Server Speed [Teacher Question]

I'm a teacher and have used multisite WP for two years now as a resource for completing assignments. This spring semester, I have the most students that I've had on my site (30). Prior to this ...
0
votes
1answer
107 views

Shortcode displaying at the top of the page [duplicate]

Possible Duplicate: The result of a shortcode appear BEFORE page content short code output too early I got this shortcode for display my blog posts on my page, but the EXCERPT and the ...
4
votes
1answer
198 views

Custom query to get post names beginning with a digit

I'm implementing an A-Z index for a custom post type. I've got my links printing out the page and the query working for the letters. However, the numbers are tripping me up because I don't want them ...
1
vote
1answer
1k views

Using wp_get_image_editor in a standalone script

With WP 3.5, they updated the image resizing scripts with wp_get_image_editor. Currently, in this standalone script that is accessed with Ajax, I have included wp-load.php so I can access all of the ...
1
vote
0answers
238 views

Wordpress wp_unregister_GLOBALS causing 100% Apache CPU Usage [closed]

I've been testing the Wordpress (by making about 5 requests/s) CMS, but the problem is that Apache is constantly using 100% of the CPU. Lately I've had enough of that and I've traced down a problem to ...
-1
votes
1answer
125 views

Header location

I am editing a plugin, and I need to make it so that this line <h4><span><strong>100%</strong></span> which ends up making a circle with a number in it, show up in the ...
3
votes
1answer
660 views

Wordpress admin never finishes saving page on site with large page count

I have a Wordpress install with a very large amount of pages (a few hundred thousand), and over time it has gotten to the point where editing a page takes an extremely long amount of time. It would ...
0
votes
2answers
2k views

Image Upload “exceeds the maximum upload size for this site”, but php.ini is correct

I'm getting an "file.png exceeds the maximum upload size for this site" error. It's saying the upload limit is 1MB when trying to upload an image that is 2.5M on WP 3.5. It is setup in multi-blog mode ...
-1
votes
1answer
116 views

Millennial Media PHP Setup ( Code Integration )

I know this going to be very easy question for people with good PHP knowledge. I have a WordPress website self hosted. I designed it for mobile devices and I would like to install Millennial Media ...
3
votes
1answer
147 views

Search widget breaks when using multiple loops?

I have created wordpress template that uses two loops via WP_Query object. Everything works fine except Search widget. I've been pulling my hairs out for three days now Googling like a madman,but ...
0
votes
2answers
191 views

Custom Fields Not Showing

I have this custom field for a post: key: price value: 2000 I've added this to my loop: <div class="buyitnow"><?php $price = get_post_meta($post->ID, 'price', true); if ( $price ) { ...
2
votes
2answers
956 views

Hide main div if wp_nav_menu is empty

I want to hide the div class "navmain2" if the menu is empty. See code below: <!-- Start main navigation --> <div class="navmain2"> <div id="logo"></div> ...
1
vote
1answer
145 views

Namespace spl_autoload problem in Wordpress admin

I am experimenting with PHP namespacing within Worpdress plugins. The plugin includes a loader file which sets up the spl_autoload functionality and then instantiates a different controller depending ...
0
votes
1answer
985 views

Custom Post Type Taxonomies -Posts not showing in Category or Tag pages

I have a made a custom post type called "Member Resources" the posts under this CPT have a few taxonomies such as categories and tags. Tags = "Diversity" Categories = "Guidance" When I go to the ...
1
vote
2answers
505 views

Saving metabox repeatable fields

This is a code that I'm adapting from https://gist.github.com/2057532. The problem is that I'm not being able to save the content from the new fields that I created. I had checked the other questions ...
0
votes
2answers
185 views

Can i show items based on the day with php?

I have a code on my site that displays different headers for different post types using the if ( get_post_type() == 'post type here' ) { code but is there a way i can do this for days of the week? ...
0
votes
1answer
518 views

check if .min.css stylesheet exists

My plugin displays its output into a thickbox 'window', the contents of which are generated in load-edit.php. This is a completely bare page, but I want to use some of the admin css styles so that it ...
2
votes
0answers
315 views

Adding dropdowns to the tinyMCE editor

I'm new to php and wordpress but I've managed to figure out both pretty easily thanks to the community, forums and blogs. I'm close to figuring out what i want to do here, but wasted hours without ...
3
votes
5answers
2k views

How to attach a uploaded video to post from front end

Hello am building a user generated content sharing theme This is my code for video submission from front end But this code only allows to add videos from a url How can i allow them to upload ...
1
vote
1answer
282 views

Add relevant tag to search results

Tags are a major part of my platform. Using the default search, if the search term matches a tag, on the results page, I want it to display: <p>Are you looking for our <a ...
0
votes
2answers
854 views

Can't get options with $data['variable']

Can't get options with $data['variable']. (I'm use SMOF - Slightly Modded Options Framework) For example in the header.php (index.php, footer.php, etc.): global $data; $logo_type = stripslashes( ...