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

learn more… | top users | synonyms (1)

1
vote
1answer
38 views

Wordpress Scripts Being Loaded in Footer

I've bought a theme for a Wordpress site. I noticed that the theme author has added the javascript to the footer for load time, but as I use Gravity forms, I understand that some of scripts need to ...
1
vote
1answer
27 views

Correct folder permissions?

I just recently installed PHP and wordpress on our coldfusion box and wordpress is throwing me an dialog saying I need to input FTP information so wordpress can alter the files. I read up on this and ...
0
votes
1answer
102 views

Troll the hackers by redirecting them

My website is getting somewhat popular, and with the it's increasing popularity there's an increase in the hackers. Last night I visited my security logs and found that everyday approximately 10 ...
1
vote
0answers
64 views

Add .htm extention to a custom taxonomy

I need to add '.htm' to all my urls on a new site - client requires that, as I am converting a old static site into WP. (I use Remove Taxonomy Base Slug to hide the slug of my custom taxonomy "topic" ...
1
vote
1answer
23 views

Why do Wordpress rewriites seem to work differently for posts vs pages?

I am creating some simple rewrites in my functions.php file in my WordPress installation: add_rewrite_rule('product1/faqs/?', 'index.php?name=product1-faqs', 'top'); I've noticed that if you hit ...
0
votes
0answers
23 views

Saving plugin data returns “You do not have sufficient permissions to access this page.”

I'm developing a quote plugin which will save a quote to the WPDB using a form to input the quote. I've created half this code and got the other piece from another programmer on here. I'm looking to ...
0
votes
1answer
37 views

Image not displayed

I am using the following inside images-options which is linked to functions.php.When clicked on submit button it crashes in wordpress admin <th scope="row">Image 1:</th> <td> ...
1
vote
1answer
46 views

Performance impact of rewriting WordPress URLs

I'm currently rewriting author URLs in WordPress. I've removed the author base slug /author/. Please note I have total control over page slugs so can guarantee there will be no conflicts. I've added ...
0
votes
0answers
55 views

How to select from a WP table every 10s in a class (OOP)?

I'm trying to select records every ten 10 seconds from columns message and messagetwo from my WordPress table wp_userlogin, but the code is not being executed. I'm calling wp_schedule_event when my ...
0
votes
1answer
34 views

Not sure why this template for custom post type posts isn't displaying anything. What's missing?

<?php /** * Template Name: Movies */ ?> <?php get_header(); ?> <div id="container"> <div id="content"> <?php $type = 'movies'; $args=array( ...
0
votes
1answer
54 views

server-moving causes funny issues in template

while moved from with a beta install of wp from a subfolder of mydomain to mydomain main folder i get funny things a. the template looks a bit buggy and when i want to login - with i ...
1
vote
1answer
31 views

I want to select the from values from database in WordPress? [closed]

Here is my code: $sql = 'SELECT * FROM ' . $wpdb->base_prefix . 'item WHERE uname = "'. $_POST['login_name'] . '" '; $result = $wpdb->get_results($sql) or die(mysql_error()); foreach($result as ...
1
vote
1answer
108 views

Saving Plugin settings to the database

I'm not a complete novice with php or wordpress but am wanting to approach this problem the most efficient way so believe asking here will help. I've got a plugin that randomly generates a quote - ...
0
votes
1answer
347 views

Ajaxurl suddenly not defined

I am developing a wordpress plugin where I use an ajax call to submit form data, it was working fine and then all of a sudden I get a console error saying that ajaxurl (the url passed to the ajax ...
1
vote
2answers
54 views

What is the correct way to write this conditional statement?

I'd like to remove auto formatting 'wpautop' from specific pages. Here is what I've got, but it doesn't appear to work: if ( is_page ( 'services' ) ) { remove_filter( 'the_content', 'wpautop' ); ...
0
votes
2answers
50 views

PHP in CSS file?

so I have this in my CSS ... #mainnav li:after { content: url('images/nav-divider.png'); } obviously I need to have it link to 'bloginfo('template_directory'); /images/nav-divider.png' instead ...
0
votes
1answer
118 views

Handling an Ajax form submit

I am developing a wordpress plugin that will create a contact form and then submit the details through an ajax request. jQuery.ajax({ type:"post", dataType:"json", ...
1
vote
1answer
97 views

Execute a shortcode when clicking on a image

I asked this in stackovorflow under javascript and was informed not possible so I trying here I have a shortcode for a opt-in form and I want it to pop up when a image is clicked I tried the ...
0
votes
1answer
52 views

Why does WP_Query show only the same post even with different categories and endwhile?

I have 3 divs that WP_Query with 3 different categories and end it with the php endwhile,but it only shows the same most recent post query three times over. Do I need to hard reset the query loop ...
0
votes
0answers
21 views

Parse Error when trying to access Products -> Categories

Whenever I try to access the Categories or Tags tab under Products on the WP dashboard, I get this error message: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in ...
0
votes
0answers
71 views

Post Rating System with wordpress

I'm using a Post Rating System with wordpress and jQuery, i followed this tutorial for that. ` jQuery(document).ready(function(){ jQuery("a.like:not('.voted')").live("click",function(){ ...
-4
votes
1answer
46 views

Echo get_option displays as text

I am trying to use some code that is stored as a settings option in WordPress. When I try to use the following code below however, it show up as plain text instead of executing. The option I have ...
2
votes
1answer
352 views

White text on white background in TinyMCE when wp_editor is called in WP 3.9

One of the features of my plugin is to add a TinyMCE editor instance inside a meta box on the Edit Post screen. This has worked great up until 3.9, and I'm not clear as to what's going wrong. Here ...
4
votes
3answers
318 views

Plugin update error message

I'm working on a client website where the framework requires a specific plugin version to work properly. With the follow lines of code in my functions.php file, it stops the plugin from updating ...
0
votes
1answer
40 views

How can i make a search box to search by custom field

Hy i am trying to make a search box for a week to search for post that have a specific custom field. I have a post_type - produse with 2 custom field CF1- culoare / alb,maro,verde CF2- ...
0
votes
1answer
68 views

display user input using ajax in wordpress

I want to display user input with ajax . but still is executed function fail in js file. I dont know where the problem might be. I read http://codex.wordpress.org/AJAX_in_Plugins and I saw ...
0
votes
0answers
114 views

WordPress theme options settings not saving

I have problem with my theme options settings saving. My settings is to saving to permanently , its just only save when you stay on the theme options page after saving the settings. But when I go to ...
0
votes
2answers
77 views

Headers already sent in Pluggable.php / homepage and wp-login error

After migrating site to another account on same host, I started to receives strange errors. Firstly I encountered an error where at the login page I was asked to turn on Cookies. And after I deleted ...
1
vote
1answer
77 views

Link posts to pages for breadcrumbs

Is there a way of linking custom post types to pages. I am looking to create breadcrumbs for the posts. The posts are summarised on individual pages e.g. golf, tennis, football etc.. So the ...
0
votes
1answer
210 views

PHP code to call image Caption, Alternative Text, and Decription?

Is there a Wordpress PHP code to call an image Caption, Alternative Text, and Decription? I have several images with Titles, captions, alt text and Description fields filled and would like to display ...
0
votes
0answers
60 views

Problem with checkbox using custom field archive

How can i get archive base a custom field. I try this but my hosting say there is a problem with my code, the code make manny select in the database.. I have 1 post type, and 2 custom field ...
2
votes
1answer
40 views

How is WordPress manipulating the posts like there are folders?

As you know, a WordPress post can usually be seen going to a link similar to this: myblog.com/2014/03/27/sample-post/ There is no folder named 2014, 03, 27 or sample-post in the blog. Until now, I ...
0
votes
0answers
48 views

How to: Get the first image from the next and previous post in single.php? (5 posts)

I know I can call a function below but it works in loop at index.php only. function catch_that_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = ...
0
votes
0answers
35 views

Create a author subpage

I want to create a author subpage, that looks like this www.example.com/author/user/subpage I read the Wordpess codex about how to create subpages. You can link a page with another page in the page ...
1
vote
3answers
86 views

Rectangle avatars

I'm using get_avatar() to output images of my users. Ref: https://codex.wordpress.org/Function_Reference/get_avatar The optional size parameter lets me specify a size. However, this makes a square ...
1
vote
2answers
128 views

Load wordpress content in other domain

I've made some researches on google but can't get the right answer. I need to get my wordpress loops outside a domain using php file. For example: I have a website hosted with www.mysite.com using ...
0
votes
2answers
55 views

Wordpress displaying content from sub pages

Im trying to pull in content from the 'sub pages' onto the homepage, I used the below to pull in content from the 'child pages' but unsure how to do this for the 'sub pages' Does anyone know how this ...
1
vote
0answers
17 views

theme_root returning a truncated URI

I'm unable to access the theme editor via the control panel, receiving 'Sorry can't edit files with .. in the name....' and after trying to trace back the cause, I've found that the theme_root is ...
1
vote
1answer
57 views

$wpdb->wp_users returning empty value for

I have a code Example: function custom_func(){ global $wpdb; $wpdb->flush(); //tried with and without this line $getTest = 'SELECT * FROM $wpdb->wp_users LIMIT 1'; ...
0
votes
2answers
65 views

Make the text field in search form optional

I've added some custom fields to my search form, which will be used more frequently than the original text field (<input name="s" />). However, the text field seems to be required to perform a ...
0
votes
1answer
23 views

How to SELECT number from table and use in calculation . Unsupported operand types

This is the PHP part of an ajax request. The user enters two numbers, via two fields. I can add these two numbers together & display the total in a field, this works OK. However, I would also ...
0
votes
1answer
159 views

Add Wordpress to Meteor js site

I have a Meteor app that I want to add Wordpress blogging platform to. There doesn't need to be any integration, just: http://example.com/blog/ Anything behind blog/ belongs to WP. How would I go ...
0
votes
3answers
383 views

Wordpress plugin: render only page content using ajax call

I'm writing a plugins that renders json data from an API request and I need to implement an infinite scroll in a content page. The problem is when I render the content with an ajax call, it renders ...
0
votes
0answers
33 views

Echo post content from archive page

I am trying to pull the latest post content in a archive page into the meta description, this is what I got: <?php } elseif (is_tax()) { ?> <meta name="description" content="<?php ...
0
votes
1answer
190 views

How to call Shortcode categories for custom post types?

Hi I'm trying to do something rather tricky in my Wordpress Theme I'm more of a designer front-end developer so its a bit of a guess work with php. Anyone have any ideas why this code only displays ...
0
votes
1answer
51 views

Add filter multiple times using only one master function

Is it possible to use add_filter with lets say an array of different values? to achieve something like the following: foreach($templates as $name) { add_filter( 'single_template', function ( ...
0
votes
1answer
64 views

How would I use this filter to change the output of the date format to “Twitter time”?

I'm using a plugin called Latest Tweet Widget to display the latest tweet. The tweet date gets displayed by the month and day (Mar 22). However, I want it to be in "Twitter time" meaning words like "3 ...
-1
votes
1answer
839 views

How to have a custom display for both woocommerce archive and product-category pages? [closed]

So far Hi there, I understand my question is very closely related to a common question about 'woocommerce'. I have been using a variety of woo hooks, filters and creating copies of original woo ...
0
votes
0answers
45 views

Attach form output as TXT-file in notification email

(How) Is it possible to attach the form output (contact form 7 or similar) in a TXT-file with the notification email to the admin? Is it possible to make a template for this TXT-file with only some of ...
2
votes
1answer
212 views

How do I enable HTML5 prefetching on this page?

Site example: http://www.ianstuart-bride.com I currently have this bit of code in header.php, but it does not work as desired: <?php if (is_archive() && ($paged > 1) && ...