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

learn more… | top users | synonyms (1)

0
votes
1answer
32 views

How to set a cookie based on a page Get variable?

I am trying to set a cookie, based on a GET variable from a page. The page URL looks like: mysite.com/?my_var=somevalue I'm trying this, but can't see what I'm doing wrong.. // make 'my_var' ...
0
votes
1answer
76 views

Select All not working in a WordPress search filter

I am trying to create a Search Filter within WordPress to filter through all the custom taxonomies within a Custom Post Type. I have created a function that generates the dropdown so I can output ...
0
votes
1answer
21 views

Editing the contents of just one div on a page from wordpress

On the homepage of the design I am integrating into Wordpress, this little area (as highlighted in the attached screenshot) needs to be editable for the client to update whenever needed, now this is ...
0
votes
1answer
18 views

How to show all of aspecific post type that has taxonomy and a specific term

i have a post type called directory_listing, i have a taxonomy called 'place' and I have terms in that tax for place1 and place2. I need to display all the 'directory_listing' posts that use the term ...
0
votes
1answer
56 views

Display PHP within HTML values

What is the correct way to display a value in a link using php? The (Advanced Custom Fields) php works correctly outside of the html. Book on Expedia.com <a class="alignright" href="<?php ...
0
votes
0answers
27 views

Custom field not displaying when category specified in loop/tag

I'm using custom fields (via Advanced Custom Fields) to display particular bits of information. One of them, author (for which there are sometimes multiple entries), displays fine across the site but ...
0
votes
1answer
35 views

Conditional Javascript based on WP Version

How would I go about creating a conditional statement in PHP to load a javascript file dependent on the active version of the WP installation? i.e. if using Wordpress 3.8 load javascript file A, if ...
0
votes
1answer
48 views

How to get comment_ID by post_ID in wordpress

I used get_comment() but its parameter is $comment_ID which I has to enter manually for previous comments from wp_comments instead of that I need to get current comment means last updated comment ...
2
votes
4answers
93 views

Wordpress Ajax Data problem

I couldn't add selected data to a div using ajax. Here is my code: <?php function master_ajaxurl() { $myOpt = $_POST['option']; bringDetails($myOpt); } ...
0
votes
2answers
48 views

Adding nofollow to a PHP generated Nav

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly global $wp_query; if ( $wp_query->max_num_pages <= 1 ) return; ?> <nav class="woocommerce-pagination"> ...
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
44 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
82 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
47 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
34 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
54 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
51 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
719 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
64 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
53 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
57 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
29 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
50 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
41 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 ...