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

learn more… | top users | synonyms (1)

0
votes
2answers
34 views

Grouping posts by a custom meta value

I'm trying to output a list of dates that are held in a meta key called event_dates without duplicates. I've also tried a wp_query with a meta_compare but I'm not able to make that work either. Any ...
0
votes
1answer
37 views

Echo out element to another page.

I have a small plugin that displays how many submissions are left on current ninja form. And writes it out as so <p id="submissions-left">hurry only 25 submission left. <\p> And tacks ...
0
votes
1answer
43 views

Including all post id's of a custom post type into an array

For my single.php (products.php), I try to build a navigation via which the user can switch between products based on the meta key "price". I want to put all id's of the products post type into an ...
0
votes
0answers
39 views

Server-side processing of AJAX login

I'm using AJAX to login users on my website to avoid the need for a page refresh when they get their username or password wrong. Everything is done over SSL. My server-side processing: function ...
0
votes
1answer
30 views

Headers for Contact Form are wrong

I am using a simple contact form I created myself that consists of just a script (php) and a WordPress shortcode. It works fine except the headers are saying something like foo@somewebhosting.server54 ...
0
votes
0answers
68 views

White screen after login attempt

In my wordpress site, I built a login area. In my page-login.php I ask the user to enter his login information which after click on submit will be sent to the same page - on top of the page his ...
2
votes
1answer
67 views

wp_signon always passed the password eventhough password is wrong

I am testing to login user via a PHP API, I hardcoded the parameters for the moment: $creds = array(); $creds['user_login'] = 'foo'; $creds['user_password'] = 'bar'; $user = ...
0
votes
1answer
19 views

Insert wordpress tags below posts via functions.php

I'm in the process of building my own Wordpress theme from scratch and my knowledge of PHP is limited. What I'm trying to do is insert tags below each post. I can do this by inserting code into my ...
1
vote
1answer
78 views

Multiple options not staying selected after saving

Problems: The save works, but is only storing one of the options in the database after save. Options not showing as selected after save. The select fields: <select ...
0
votes
0answers
45 views

Would manually deleting the dumping data fix a “#1062 - Duplicate entry '1' for key 'PRIMARY'” phpMyAdmin error?

I'm new to PHP! I'm trying to import an SQL database file into myPhpAdmin for a WordPress I'm migrating, but I keep getting this error message: SQL query: `-- -- Dumping data for table ...
0
votes
1answer
25 views

How to get my [shortcode] rendered on the home page, other pages are fine

I'm using a child theme of Pixlex. The theme has a options panel to let me choose wether I want 2 or 3 columns on the home page and if those columns are to be filled with a post or page. I have one ...
0
votes
0answers
32 views

Changing a link to be translatable in WPML String translation (example included)

I have an specific example. This Title "Filme" / $title in the Sidebar Widget should link to another site - yet be translatable. "Filme" shows up in the String Translation but does not translate. ...
0
votes
0answers
52 views

Custom Menu echo own HTML

I've registered a custom menu and got all that set up, however the formatting of the HTML that the menu uses doesn't fit with the CSS/HTML menus I had previously and want to keep. Therefore I was ...
0
votes
1answer
34 views

Update postmeta after theme switch

I am trying to update the postmeta table when I switch themes. I am updating the metavalue to be template-name.themename.php. However, this only works with the default themes in wordpress. If I go ...
0
votes
0answers
22 views

get_theme_mod return a blank value instead of saved value

when i try this and in colors section , get_theme_mod works well function tcx_register_theme_customizer( $wp_customize ) { $wp_customize->add_setting( 'tcx_link_color', array( ...
0
votes
0answers
28 views

wordpress php show comments only from user AND replies

I'm trying to add a comment section to a user profile, it'll act as a way of communicating between the user and the admin. In the user section I only want to show comments from the logged in user, and ...
0
votes
1answer
50 views

custom url with custom post

I want to change my custom post URL. I want to remove "item" from URL. With the below code and with custom post type url plugin http://wordpress.org/plugins/custom-post-type-permalinks/ my URL is: ...
0
votes
0answers
18 views

get child-ID or attachment-ID of a post

I am trying yo get information of attachments and there type, when ever I publish a post with attachment its information is stored in wp_post with three IDS ex: ID=1, parent-id = 0, post_type=post, ...
0
votes
1answer
653 views

phpMyAdmin error #1062 - Duplicate entry '1' for key 'PRIMARY'

I'm new to PHP! I'm trying to import an SQL file using phpMyAdmin through a GoDaddy cPanel(please don't make fun of me) Here's a full readout -- -- Dumping data for table `wp_commentmeta` -- INSERT ...
0
votes
1answer
44 views

phpMyAdmin displays error when importing database

I'm migrating a WordPress for a friend to a different server. I have already backed up all files and was given a copy of the database by the old server admin. The problem is that when I try and import ...
0
votes
0answers
27 views

Order posts by average

I am using advance custom fields and i have used the custom fields to create an average score. Now i want to order the posts by the average score I have tried to do it but it doesnt seem to work here ...
0
votes
1answer
62 views

Equivalent of admin.php for public pages

I am pretty new to the Wordpress API and can't seem to find what I need. I have been searching for a way to create public pages (accessible to users without admin permission), similar to the method ...
0
votes
1answer
43 views

Why this plugin is not working?

I am testing jQuery in my wordpress plugin. Two files 1. main_plugin.php 2. js_plugin.js (Both in the same directory HelloWorld). CODE: PHP FILE: <?php /* Plugin Name: jQuery Test Plugin Plugin ...
0
votes
0answers
33 views

Get children post mime type using parent post_ID wp_post

Consider parent post_id is 11 for the same post. If I add media, the information about media is passed to the post_id 12 by taking parent_id 11 in wp_post. So, if I want to get media information ...
0
votes
1answer
40 views

Get data from wp_posts of mysql in to variables of wordpress-php script

I want to get post status, media information like the type of attachments added to the post etc in to my program. I tried this but doesn't work well $posts = $wpdb->get_results("SELECT ...
0
votes
2answers
52 views

Multiple URL from Custom post name

I would like to do something special for a website in Wordpress. I have a "custom post type" whose data are all "post custom fields" except the name of the post. I need to create multiple urls for ...
0
votes
1answer
43 views

Adding header function to theme

I changed the theme of my website this weekend but did not see that it wasn't supporting headers... I am now trying to create the get header image function manually, I managed to do someting in the ...
2
votes
1answer
25 views

How can I modify the permalink via a filter?

I would like to make a change to the URL's in my href attribute across my while site when the_permalink is called. For example: <h2><a href="<?php the_permalink()?>" Can I use my ...
0
votes
1answer
18 views

Why isn't my custom function kicking in from my functions.php file?

We'd like to clean some of our WordPress URL's up and have some rewrites in place in the following format: Actual URL: product-one/product-one-guides/ Actual URL: product-two/product-two-guides/ ...
0
votes
0answers
55 views

Revision History for Entire Wordpress Site

I am learning wordpress and am working on a wordpress site where I would like to have a revision history for every single change I make. I understand you can see the revision history for pages and ...
0
votes
0answers
21 views

Admin-area broken through weird issues

Sorry for my bad English - it is not my mother language. Just installed wordpress 3.9. The admin area looks a bit broken all though I have fixed some things with switching the magic quotes to off ...
-2
votes
1answer
64 views

Index showing source code

Suddenly the wordpress showing the source code when I click the url address, and I get this The code is just the site offline plugin i have so i can set the site offline So the problem is that ...
-1
votes
1answer
28 views

What does that mean: cannot use a scalar value as an array [closed]

I've got a theme and when I host it locally on my MAMP server I have no issues, after moving it to a web server get the following issue: Warning: Cannot use a scalar value as an array in ...
0
votes
1answer
32 views

Postmeta not saving

I'm created a postmeta box but it doesn't appear to be saving anything to the DB. I'm check in wp_postmeta and there is nothing there relevant to this metabox. I believe it is something wrong with ...
0
votes
2answers
49 views

have_posts() execution failure

I wanted to create a loop which displays search results in search.php file. I followed all of the instructions in the WordPress Codex tutorial located in here: https://codex.wordpress.org/The_Loop ...
1
vote
1answer
28 views

Loading all files within a directory

I've made this little function which I'm wanting to call all the files within a directory. I don't think the glob() == false would work though. I'm new to this function so not aware of all ...
0
votes
2answers
36 views

Can I use HTTP POSTs? Is there a better alternative?

I am use to php development in general and I am use to getting a lot done by making a POST to a php file. However I have not seen people using $_POST in WordPress. I have seen one discussion about ...
0
votes
1answer
40 views

List of Events with Multiple Dates: Only NEXT Date

I am currently developing a site http://madstheatre.com that will serve as a resource for Performance and Audition information in Madison, WI. A feature that is preventing me from starting to go ...
0
votes
1answer
59 views

solved magic-quotes - breaks admin totally

running wp 3.9 fresh install update - now all is fixed: now - with the new values magic_quotes_gpc Off On magic_quotes_runtime Off On magic_quotes_sybase Off Off left is: local value ...
0
votes
2answers
64 views

Can I list a custom post type within another custom post type in the admin area?

I'm hoping someone can steer me in the right direction. I have a custom post type called 'locations'. I have another custom post type called 'testimonials'. What I'd really like to do is be able to ...
0
votes
2answers
57 views

contact form 7 - cannot run php

I have installed WordPress and the plugin contact form 7 in it. To make it a multi-page contact form I have installed Contact Form 7 Multi-Step Forms as well. Everything works fine until yet. Even ...
0
votes
1answer
40 views

Avoid class name collision when using third party libraries in plugins?

I am currently developing a Wordpress plugin handling very specific behaviours in our new Wordpress website. I started by reading the introduction articles in the Codex, and I also found the Wordpress ...
0
votes
1answer
176 views

Unexpected token ILLEGAL, even on clean install - jquery-issue?

update i get even more issues and errors; POST http://literaturen.org/wp-admin/admin-ajax.php 200 OK 1,39s jquery...=1.11.0 (Zeile 4) GET ...
2
votes
0answers
85 views

Namespacing WordPress project according to FIG standards

I am trying to wrap my head around the namespaces, autoloaders and FIG standards and most importantly how to achieve their integration to WordPress as close as possible. Here is my file structure, ...
0
votes
0answers
12 views

Order posts by how many categories it is assigned to in total

I'm already doing some custom ordering based on various stored custom fields but this latest one has me stumped. I know I can get the count for how many categories a post is assigned to, but this only ...
0
votes
1answer
55 views

How to debug failed changes to posts?

I just rebuilt my server with Ubuntu 14.04, Nginx 1.6.0, PHP 5.5.9 and Wordpress 3.9. I am able to complete the Wordpress install and login to the Wordpress dashboard, however, I can't make any ...
0
votes
0answers
12 views

Default image (logo) for customizer [duplicate]

I want to let users upload a logo. I've tried a few things. Currently there is a broken image until a logo is uploaded. I need to set the default as logo.png in my theme folder. Here's how it stands ...
0
votes
0answers
57 views

How to create custom php script page

I am a n00b to WP I am trying to execute a php script which is located in home directory of Wordpress. For example run.php <?php echo 'i run'; ?> I want to run this page in url ...
0
votes
2answers
67 views

Does wordpress allow me to add a php file to the root directory to execute custom scripts?

Does wordpress allow me to add a php file to the root directory to execute custom scripts? I need functionality similar to functions.php that you put into themes. Are there any work arounds that ...
0
votes
2answers
54 views

Echo array value

I have following query to store data for last week entries in database: for ( $i; $i <= 7; $i++ ) { $val[$i]= $wpdb->get_results( "SELECT COUNT(`order_total`) AS 'Total' FROM vm_orders ...