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

learn more… | top users | synonyms (1)

6
votes
1answer
8k views

Menu Items Disappearing

I'm running WP 3.5.1 and I've a menu with about 100 items. When I add new items to the menu older ones disappear. I'm not running Suhosin or similar stuff. What can be the cause? Note: I'm on a ...
3
votes
6answers
24k views

How to stop form resubmission on page refresh

Hi I have a form that adds attachments to a post, however when the form posts it obviously doesn't show the post with the new attachment echoing "your file has been uploaded". When the user refreshes ...
0
votes
1answer
791 views

Get post meta retrieving wrong value

I created a custom meta box with a textbox where the user can enter a custom value in as an additional identification tag. I thought I had it right but when I try to retrieve the value it is giving me ...
1
vote
0answers
140 views

Using window.onload with Ubermenu

I am using a plugin to place this code on specific pages. But it is not firing correctly. Has anyone had experience working with Ubermenu, WP and jQuery? Do I have to call jQuery into my ...
3
votes
1answer
5k views

Displaying a WooCommerce product via PHP

Having a hard time composing a searchable query, so I apologize in advance if this has been covered. I know you can add WooCommerce products to a page or post via short code, but I have one section ...
0
votes
0answers
2k views

How can I clear the theme mod settings?

Ideally I am looking to add a button to the theme customizer that allows the theme to reset to default settings, although that may be asking for too much in one question so I am wonder if anyone knows ...
3
votes
2answers
753 views

How can I add dropdown widget/box to admin post page?

I am trying to figure out how to add a dropdown widget to the post page. The reason I ask is because I would like to be able to have a few different post classes that the user can select while making ...
1
vote
2answers
307 views

A solution to set metatags with my page generating plugin?

I have a plugin which generates a page automatically. Is there a way I can add functionality to this plugin which would allow me to set the meta description, keywords, and title for the page? I've ...
-1
votes
1answer
7k views

Woocommerce price including tax with formatting from options

Af first, I'm not a programmer. In Woocommerce I need to display both product prices, including tax and excluding tax. Code in price.php <?php if ( $price_html = $product->get_price_html() ) : ...
0
votes
1answer
171 views

Different Subdomain changes page content

I know it seems to be a strange ask here but hear me out. I have a client who has several subdomains for different countries, such as us.example.com and uk.example.com. I want to change one or two ...
0
votes
1answer
360 views

Add “alt” Attribute to GD Star Rating <img> Tags

I have try over a week to validate 4 images that are retrieved by a code with GD Star Rating plugin This is the code i have: wp_gdsr_render_rating_results(array('template_id' => 49, 'rows' => ...
0
votes
0answers
216 views

Cant get theme to change footer color through theme customizer

I am having an issue trying to configure the theme I am working on to allow the footer color to be changed. So far all of my other options work so I am geussing it is an issue with the way I am ...
0
votes
0answers
139 views

Wordpress not showing full text in feed

I have been reading around and I cannot figure out why (even with the full text option checked in settings) that my feed will only display excerpts of posts instead of full posts. Any ideas? here is ...
1
vote
2answers
536 views

Additional image sizes are not being generated

When I upload an image through the admin interface, the image is only saved at full-size. The other sizes are configured to their default values in Settings > Media. The automatic resized versions are ...
0
votes
2answers
439 views

Theme not calling Jquery properly

I am developing a theme and I have called jquery along with other JS files from a theme-enqueue.php file. For some reason only the Jquery file that is hosted on googles servers is adding the theme URL ...
1
vote
1answer
38 views

3 blogs same installation, without WP MU

I've to create 3 blogs (different DOMAINS) on the same wordpress installation (I cannot use WP MU, unfortunately) so I came out with the idea that I could use categories, instead, so... every blog has ...
2
votes
1answer
568 views

wordpress custom post type remove duplicate menu item

I've registered a new content type with following - register_post_type('news', array( 'labels' => array( 'name' => __( 'News'), 'singular_name' => __( 'News'), ...
0
votes
2answers
239 views

customize wordpress database error page

UPDATE Initially I suspected this was related to the Wordpress framework I'm using (Genesis) or to my child theme functionality, but turns out that's not the case as I was able to get this to work in ...
0
votes
1answer
64 views

How to show a users bio on a page

I'm fairly new to Wordpress. I have users that create profiles on my site and one of the sections is their bio. How can I take this information and display it on lets say a "users profile page". ...
0
votes
2answers
74 views

Removing the comment function within wordpress

I'm using wordpress for my company website but I want to remove the comments function completely so not just by unchecking a "alow comments" within every page. I did some googeling and the said I was ...
1
vote
1answer
290 views

Maximum file upload limit in php.ini have no effect on wordpress

I have changed the upload limits in php.ini sudo sublime-text /etc/php5/apache2/php.ini upload limit, post limit and something else, I restarted apache2 the phpinfo shows me both upload and ...
0
votes
1answer
368 views

calling admin-ajax.php from admin-ajax.php

I'm writing a plugin that calls the output of another plugin's ajax, which is set-up at wp_ajax_ I would have called the functions directly, but limitations in the plugin make that a non-option. To ...
0
votes
1answer
117 views

How to use a variable as a function name?

I'm trying to loop a function that will let users create a few custom posts, but I have a problem with the function name. Here is an example: How can I write this: function ...
0
votes
1answer
268 views

PHP code rendered in HTML

I'm trying to find out why any template different than index.php doesn't work. I've created a category-news.php file (also tried with category-4.php and mostly all alternatives), but when opening ...
0
votes
1answer
398 views

How to break up php code to avoid echo

I have this php code I am using to list all post (titles) with the taxonomy categories names, and its working fine however I will like to break it up and avoid using echo within the php code so that I ...
1
vote
2answers
5k views

Is it possible to disable a function of a parent theme?

I was wondering whether it is possible to completely disable a function that is called in a parent theme's functions.php and if so, how? (Of course without deleting the function. Rather by adding ...
1
vote
1answer
358 views

Remove class that has been added by parent theme

My parent theme generates the following class in body: style-cupcake. I don't want that. The best way to get rid of this is by adding my own functions in a functions.php file in my child theme, right? ...
0
votes
0answers
740 views

How to make my plugin insert text into a custom div?

I'm making my first plugin, and after following a couple of tutorials, have managed to make a custom admin page, that allows the editing of the custom text I'd like to have inserted homepage. It ...
0
votes
0answers
302 views

For loop logic for combinations

I have WP E-Commerce installed and I'm moving whole it's dashboard to frontend. I have everything ready and am on the last part. In fact I thought this part was ready, until I added two variations, ...
2
votes
1answer
126 views

Am I not understanding plugins?

So I am trying to make it so that you can load a class from a child theme, theme or plugin using the following: class AisisCore_Loader_AutoLoader{ protected static $_instance; protected ...
1
vote
1answer
233 views

Wordpress plugin for nicer looking slugs? Have multiple pages named the same but they get different slugs

This wordpress site I'm touching up has a page hierarchy which is responsible for the urls. Basically the urls look like page1/subpage/subsubpage etc. The problem is, this site is for a recurring ...
2
votes
1answer
290 views

Restrict access to post if it is currently being edited

On a platform with many Editors, the problem that I am experiencing is that two editors proofread the same post simultaneously (and disregarding the warning notice about someone else currently editing ...
0
votes
0answers
62 views

MySQL Engine vs. Charset

I am attempting to have my plugin create a new table. I am fairly new to SQL. I have found two different method for creating tables: Method I $table_name = $wpdb->prefix . 'cool_table'; $sql = ...
0
votes
1answer
272 views

Creating Database Table vs. Adding MetaData to Post & User

I am creating some event functionality for my wordpress site. Each event will have a set of tickets associated with it. A user who is purchased at least one ticket will additionally have a set of ...
0
votes
0answers
66 views

Permalink of Custom Post Type

I am trying to create a custom post type called an 'event' and have it's permalink structure be as follows: www.domain.com/events/238 where 238 is the post ID. However, when I navigate to the page, ...
2
votes
2answers
3k views

Plugin.php: PHP Notice: Undefined offset: 0 in

I moved a WordPress site from one domain to another and there were a lot of white spaces that needed to be removed. The only problem that is left are the following errors: PHP Notice: Undefined ...
1
vote
0answers
886 views

How to edit php files in Child Theme?

I created a child theme and i want to edit a php file. So i copy and paste the php file into the child's theme folder and then i edit it. But it seems that nothing changed in the site preview! In the ...
4
votes
1answer
749 views

Hide custom image sizes from media library

I want to hide a few custom image sizes from the media uploader: The following code (posted here) works only for the default image sizes: function remove_image_sizes($sizes) { ...
0
votes
0answers
218 views

add conditionals to a displayed external xml feed

I found the following code online and customized it to pull the xml feeds from our online calendar software and display event information on several different WP pages. function otpl_add_class_feed() ...
0
votes
2answers
68 views

Adding code to the function file

I would like to move my large php functions out of the index or template files and into the function.php file. Would it be something like this? function grab_code(???) { ??? .= '<div>some ...
0
votes
1answer
1k views

Where can I create a normal php file?

I have a wordpress site and I want to create a normal php file. If I put it anywhere in my wp-content folder, I always get a page not found error when I try to access it. For example, I create a file: ...
0
votes
2answers
58 views

Post's ID pattern?

Each post has an ID and I would like to know how they were assigned. Is there a pattern? Why are the ID's not being incremented by 1 every posts? It would be easier..My ID's go from 9867, to 9869, to ...
1
vote
1answer
108 views

comments_number display outside specified span

I want to display the number of comments a particular post has, so i thought i'd use comments_number, however when i use this the comment number gets printed outside of the span it's supposed to be ...
0
votes
1answer
2k views

Woocommerce getting top level category parent and make all sub categories have the same template and menu

I want to get the top level category parent which is "wedgwood" so i give it a different menu and different template that what i wrote so far but it dont apply except on ‘wedgwood’ category wegdwood ...
2
votes
1answer
1k views

Adding a custom line of text to php code

The below code is used to pull in my Tweets and post them as individual blog posts on my Wordpress site. I would like to add a "Follow me on Twitter link" after the tweet when it is displayed in the ...
0
votes
1answer
49 views

Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax

I have CPT "Dealers" and a custom tax of "States" where each post in the CPT is associated to one state. The hope is to create the header for the state then list each post in that state taxonomy under ...
6
votes
1answer
2k views

Allow Editors to edit pending posts but not draft ones

I have a large number of users with Editor Capabilities that help to go through the post submissions. This is my current setup for this role: As you can see, they are allowed to edit_posts and ...
0
votes
1answer
159 views

Conditional Content Display

I"m trying to replace the string "Something Nice will show up here" in the block of codes below with WordPress loop but it doesn't seem to be working. I'd like when Link1 is clicked on, let the post ...
1
vote
0answers
662 views

Unique key for each row in a repeater field

Is it possible to have a unique key for each sub fields in a repeater field? I don't want to use the array index, because the array index can be changed, when adding new rows between existing rows. I ...
1
vote
2answers
2k views

Custom image upload

I'm trying to setup upload for for attachments for my custom post form. At first I add to my form tag enctype="multipart/form-data" For testing purposes I have two upload forms, but in future I'm ...