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

learn more… | top users | synonyms (1)

1
vote
0answers
282 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 ...
-2
votes
1answer
132 views

Header location [closed]

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
885 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
157 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
159 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
244 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 ) { ...
4
votes
2answers
1k 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
174 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
1k 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
639 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
214 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
724 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
401 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 ...
2
votes
6answers
3k 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
360 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
1k 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( ...
2
votes
2answers
53 views

A Specific Blog post to be assigned as the landing page of my wordpress blog

Is it possible for a specific blog post (in wordpress) to be the landing page? For example my domain name is www.overflowingstupidity.com and I have this blog entitled post "How to burn your house ...
2
votes
1answer
306 views

Audio tags around Mp3 URL in content

I have an audio player than uses the following syntax to display its player: [audio src="http://somedomain.com/wp-content/uploads/2013/01/songtitle.mp3"] The thing is, I'm pretty sure I can show the ...
0
votes
1answer
131 views

Widget HTML Display Problem

Hi I have created a plugin that places a Google Translator into a text widget in Wordpress. I have setup shortcode to do this - and the shortcode seems to be outputting the correct HTML, except that ...
1
vote
1answer
224 views

Get post meta in enqueued js file

I am writing a plugin in which I have a js file. I enqueue it with wp_enqueue_script. In this file I have some functions. The functions are triggered by an onclick event of a button. The button is ...
1
vote
2answers
2k views

How can I Add a variable PHP in the Menu Nav

I want to add a variable in the Menu, for passing a value in all my page. The purpose is to retrieve a value for transport to another web site (from my website links) to the tracking, this value ...
2
votes
1answer
3k views

Rename image uploads with width in filename

I am attempting to change the name format that Wordpress uses to rename uploaded files. For example, when I upload an image with filename "cat-picture.jpg" Wordpress will create scaled versions and ...
0
votes
1answer
24 views

Wordpress blog set up

I plan to launch my website with multiple blogs plugged into it, with a main index page for all posts. I currently have the index running from the root and two blogs running within their own folders ...
-1
votes
4answers
666 views

Insert into db with foreach problem

I have no idea why this foreach it`s not running. When i post the article, only inserts once. Should make it at much as needed. Do you see any problem? $array_produse = array(); for($i=1; $i<=8; ...
0
votes
1answer
43 views

Trying to put a search page on site

i'm trying to put a search page on my site. I thought it would be simple, but I am having no success. I have put a form in my header.php (which I call in my search.php page (include "header.php")) ...
1
vote
1answer
48 views

Pull the content out of a page

I wanna pull the data from this area "see the red area on the image below" Out to a specific template I have a page template named page.php <div class="contentholder"> <?php ...
0
votes
1answer
352 views

How to have different header.php based on the user logged in?

I’ve a created wordpress membership site using wishlist member plugin. But I want to have different header.php based on different logins. Eg: Users are: Print, Web and Free When Free user logs in – ...
0
votes
2answers
502 views

I don't have comments.php… how do I customize my comment fields

My page in question is here. I have tried to add a comments.php to my custom theme so I can remove the website field and so I could edit the default values of the fields and remove the labels. When I ...
0
votes
1answer
111 views

Stop header code from showing in category page?

Hi I'm using the code below to show different header images in my custom template archives. Only problem is that it is also showing the headers in the category templates. go to ...
-1
votes
1answer
130 views

Use php array outside his function

any ideas why my function print_r $arr with lot of elements, but only retain cat and dog when it comes to print_r $stack? I need to have $arr used outside the function, function ...
0
votes
1answer
525 views

How do I use CSS or PHP to customize Wordpress Form Manager Plugin Table?

I'm using Wordpress Form Manager Plugin to design a table to display race winners for an athletic event. <table class="fm-data"> <tbody> <tr> <td ...
-2
votes
1answer
463 views

wordpress illegal string offset 'parameter' error

I am getting the error illegal string offset when creating a checkbox in the admin. my code look like this. <input type="checkbox" id="slideThre" name="custom_settings[checked]" value="1" ...
0
votes
1answer
78 views

Post Views Code Hacks

// Post views function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ ...
0
votes
1answer
53 views

Custom Links in Walker Class

I am creating a custom walker class. I need to identify the custom links that will be added to the menu from Appearace > Menu > Custom Link so that they will have a different format to the page/post ...
0
votes
1answer
1k views

Displaying Overlay images over thumbnail of category type?

How would I place an overlay image over a thumbnail of a certain category. For example. I have the category "Videos" how would i place a playbutton image over the thumbnail, while making it all link ...
0
votes
1answer
98 views

WP_LINK_PAGES Generating Unnecessary </p> Tag

This is the current output for my WP_LINK_PAGES, notice the unnecessary </p> tag at the end. My code for my custom WP_LINK_PAGES can be found here. <div id="link_wrap"> <span ...
0
votes
1answer
39 views

Closing WP_LINK_PAGES DIV ID w/After Argmuent

In my code below I need to close the div "link_wrap" which I created with $args['before'] = '<div id="link_wrap">'; When I try to paste $args['after'] = '</div>'; above return $args; it ...
0
votes
2answers
598 views

Dropdown Menu for Query_Posts

I can successfully query post results using query posts like so... <?php // The Query query_posts("gdsr_sort=rating"); // The Loop while ( have_posts() ) : the_post(); ?> <?php ...
0
votes
2answers
127 views

Limit checklist by the current user

Bare with me as I explain this. I'm adding an Assistant Editor feature to my multiple author platform. In the box that appears in post-edit page, the Editors can tick which task that they have done ...
0
votes
1answer
39 views

Stuck with sidebar registering

I tried to add a custom page to my Wordpress template. That part is good. What I´m stuck with is a common sidebar that appears although I registered a custom sidebar for it. I am calling the ...
0
votes
1answer
151 views

Wordpress get_avatar function not correct working

My code doing this, listing which author have posted in the current category. But get_avatar function not correct working. Im Using Simple Local Avatar Plugin. It is working author.php don't have any ...
6
votes
2answers
1k views

What is the correct way to build a widget using OOP

I am working on a simple search form widget, with a built in autocomplete capability (You can download the current version here). The plugin is working, but I am currently rewriting all the code using ...
-2
votes
1answer
112 views

Pagination not working properly

I have a list of posts from a category as seen here in this example. The problem is, if you scroll down to the bottom and click older, you'll see that the posts on the page have not changed at all, ...
0
votes
2answers
367 views

Transform php code into a widget?

how can I create a widget out of a php code? It's just a disqus code that I would like to place in the sidebar. I could just paste the code in the widget section (my tag), but then I would not be ...
0
votes
1answer
612 views

Wordpress SQL JOIN query

Hi Im trying to run 2 querys in the same query call. // send the query global $wpdb; $commentQ = "SELECT * FROM $wpdb->comments " . $whereClause . $orderBy; $comments = ...
1
vote
1answer
290 views

If meta_value = 'yes', then add class?

meta_key=_jsFeaturedPost meta_value=yes I have posts where some have meta keys/values and some don't. I would like to target the ones with the meta keys that have a value of 'yes' and add a CSS ...
0
votes
2answers
1k views

How do I remove a category from a wordpress loop>

I have a question. I need to have, in my archive.php file, a exclusion of a specific category. given what I have now, how would I make that happen? Here is the code: <?php ...
0
votes
1answer
51 views

Is this plugin safe to run?

This is an extract of code from a wordpress plugin. Is it safe to run despite the variables not being filtered? Also does the wpdb class filter to prevent any injection? list($email_id, $user_id, ...
14
votes
4answers
773 views

Why have <?php and ?> on every line

I've seen this convention pretty much everywhere, and, at times, it comes close to driving me nuts: <?php //The loop ?> <?php while ( have_posts() ) : the_post(); ?> <?php ...