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

learn more… | top users | synonyms (1)

2
votes
1answer
29 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
19 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
68 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
84 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
41 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
38 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
67 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
34 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
38 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
46 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
72 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
1answer
59 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
365 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
96 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
60 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
85 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
96 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
67 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 ...
0
votes
1answer
231 views

Theme Customizer - Dynamic CSS PHP File

I've recently switched over from using a custom class to enable a theme options panel to the built in Theme Customizer in Wordpress. All is going fairly well - I've got live preview working but I'm a ...
0
votes
1answer
58 views

Wordpress function to add text

I m using this simple function to add text to my wordpress site post ! add_filter( 'afip_new_post_content', 'myprefix_change_afip_post_content', 10, 2 ); /* Grabs the image source for the newly ...
0
votes
0answers
42 views

wordpress is_main_query() breaks

After upgrading to 3.9 the function is_main_query() breaks down and doesn't works the way we want The following code add_filter( 'pre_get_posts', 'my_get_posts' ); function my_get_posts( $query ) ...
0
votes
0answers
22 views

Wordpress development PHP errors diagnosis process

I'm spending a lot of time improving my skills with PHP and Wordpress. Occasionally, as I'm working on developing a custom framework I'll upload a new version and it completely breaks, displaying a ...
1
vote
2answers
57 views

Detecting classes, adding widgets, and adding divs in with a Nav Walker

I've been trying to figure this out for days, to no avail. A template I'm building requires a mega menu. The markup for the menu looks like this: <nav> <ul> <li><a ...
0
votes
1answer
106 views

WordPress plugin won't create custom tables

I’m making a plugin that uses custom tables. On my local dev site the tables are being created and everything is working, but when i activate the plugin on a live site the tables aren’t being ...
11
votes
2answers
850 views

How to create custom 401, 403 and 500 error pages?

When a 404 error is encountered, a 404.php template file can be used to render a custom error message. This is documented in the Template Hierarchy article. My aim is to create custom error pages ...
0
votes
0answers
44 views

Update post title from external file?

I have an external script I wrote (for admins only) that loads in the following at the top: require_once('./../wp-blog-header.php'); I'm aware that it can be a plugin, but it's just not right now.. ...
0
votes
1answer
86 views

Including Custom fields within the_content

I’m designing a site for a client and I’m using custom fields for buy links to her books. I only want buy buttons to appear for fields that contain a URL, so I’ve hooked this just below the_content: ...
0
votes
0answers
296 views

WordPress wp_remote_post() sending informaiton to Redmine REST API

I am having a problem using WordPress's wp_remote_post() function with Redmine's REST API. The main issue is that when I attempt to post, i get a 403 - forbidden return. This is the code that i'm ...
-2
votes
1answer
48 views

Get my site session in wordpress?

I am using a custom site build in zend frameword, i also have a wordpress installed in this directory, for example: www.mywordpressSite.com // here is my wordpress site.. ...
1
vote
2answers
143 views

Date archives for custom post type

I have seen many questions/posts regarding this, but have yet to find a decent solution. Basically I am trying to do what wp_get_archives does, but for a custom post type (personally I am unsure why ...
0
votes
0answers
33 views

Create WP_QUERY args with reference to my custom query

Sorry for my some different question. Can anyone help me to create WP_QUERY() arguments with reference to my following custom query? My query is as follows. SELECT SQL_CALC_FOUND_ROWS ...
0
votes
0answers
208 views

Fetching instagram api not working on wordpress

<?php $json = file_get_contents('https://api.instagram.com/v1/users/userid/media/recent/?access_token=accesstoken'); $a_json = json_decode($json, true); foreach( $a_json['data'] as $key => ...
0
votes
0answers
61 views

Remove entry content from homepage index with infinite scroll

I have a WP theme (built on top of Genesis) and I'm having a problem with posts that are loaded on the homepage index with infinite scroll. Essentially, I'm only showing the article title, date, ...
0
votes
0answers
62 views

Wordpress will suddenly stop saving files uploaded by my code (ran in nopriv ajax)

I have some code that uploads a file. I've tried both wp_handle_upload as well as regular PHP code and with both, it will claim it uploaded the files (wp_handle_upload returns an array with "url" and ...
0
votes
0answers
228 views

Check if values exists DB

I am getting nutts with this one. I want to check if the email introduced in the form already exists in the database before creating a new record. But for some reason the email is empty at search ...
0
votes
0answers
32 views

How to automatically trigger a link if user has already been in the page?

I need a solution in php or javascript to make trigger a link to a internal #anchor when the user has visited the page for second time. can you help? the theme is a SINGLE PAGE one that shows all the ...
0
votes
1answer
106 views

Help with my first Metabox helper class

I'm working on a metabox helper class and everything works well, but the radio image field. The images show up, but they aren't clickable. // Print radio_image input. private function ...
0
votes
2answers
41 views

Trying to exclude posts from a category on the home page

I've tried the code below to grab the cat ID for one of my categories (watch-isatv) and exclude all of the posts in that category. However, the posts are not being excluded. What is wrong with the ...
2
votes
1answer
79 views

there's a way to include a minimal WP for check only the current user, its roles (caps?) and then release/free it?

I need to count how many times a file in a particular sub-directory is downloaded and track who downloaded it. I'm using a Php file to do it, it isn't a WP file but I need to include WP to get the ...
0
votes
2answers
277 views

Permanently remove first image from posts

I have around 2,500+ posts on my site where I've inserted images using the traditional method into the post content itself. In upgrading to a different theme, the single post page now displays the ...
0
votes
1answer
30 views

How can I alter this code to accept a slug as well as an ID?

This code is from the codex. /* == If In Parent Category... ==============================*/ if ( ! function_exists( 'post_is_in_descendant_category' ) ) { function ...
0
votes
0answers
101 views

Ajax contact form

I have a custom contact form that I am trying to process via Ajax. I am a bit newbie in Ajax and more using it on WordPress. I have built it but it doesn`t send the email and retrieve "0". Php ...
0
votes
1answer
71 views

“if parent category is” conditional?

I searched through the codex but couldn't find anything helpful. I tried the code below but it didn't work. The default sidebar still shows up for all category pages. <?php ...
0
votes
1answer
60 views

echo variable containing html and the_permalink();

I'am trying to echo a vriable, but the permalink does not work as clickable button. The permalink just displayed outside the button. Here is my code: $perma = the_permalink(); $valid = '<button ...
0
votes
1answer
32 views

Php conditional help needed

I am trying to add conditionals for authorship to show for posts on a specific author id. Would appreciate if someone could give the following a quick look over <?php if is_author ('2') AND ( ...
0
votes
1answer
85 views

Search in particular category in wordpress

I am currently using the JSON API to get the data from wordpress http://wordpress.org/plugins/json-api/other_notes/ The plugin helps to retrieve the wordpress post data in JSON format I notice that ...