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

learn more… | top users | synonyms (1)

0
votes
2answers
631 views

Dropdown Menu for Query_Posts

I can successfully query post results using query posts like so... <?php // The Query query_posts("gdsr_sort=rating"); // The Loop while ( have_posts() ) : the_post(); ?> <?php ...
0
votes
2answers
129 views

Limit checklist by the current user

Bare with me as I explain this. I'm adding an Assistant Editor feature to my multiple author platform. In the box that appears in post-edit page, the Editors can tick which task that they have done ...
0
votes
1answer
40 views

Stuck with sidebar registering

I tried to add a custom page to my Wordpress template. That part is good. What I´m stuck with is a common sidebar that appears although I registered a custom sidebar for it. I am calling the ...
0
votes
1answer
157 views

Wordpress get_avatar function not correct working

My code doing this, listing which author have posted in the current category. But get_avatar function not correct working. Im Using Simple Local Avatar Plugin. It is working author.php don't have any ...
6
votes
2answers
1k views

What is the correct way to build a widget using OOP

I am working on a simple search form widget, with a built in autocomplete capability (You can download the current version here). The plugin is working, but I am currently rewriting all the code using ...
-2
votes
1answer
116 views

Pagination not working properly

I have a list of posts from a category as seen here in this example. The problem is, if you scroll down to the bottom and click older, you'll see that the posts on the page have not changed at all, ...
0
votes
2answers
382 views

Transform php code into a widget?

how can I create a widget out of a php code? It's just a disqus code that I would like to place in the sidebar. I could just paste the code in the widget section (my tag), but then I would not be ...
0
votes
1answer
705 views

Wordpress SQL JOIN query

Hi Im trying to run 2 querys in the same query call. // send the query global $wpdb; $commentQ = "SELECT * FROM $wpdb->comments " . $whereClause . $orderBy; $comments = ...
1
vote
1answer
304 views

If meta_value = 'yes', then add class?

meta_key=_jsFeaturedPost meta_value=yes I have posts where some have meta keys/values and some don't. I would like to target the ones with the meta keys that have a value of 'yes' and add a CSS ...
0
votes
2answers
2k views

How do I remove a category from a wordpress loop>

I have a question. I need to have, in my archive.php file, a exclusion of a specific category. given what I have now, how would I make that happen? Here is the code: <?php ...
0
votes
1answer
51 views

Is this plugin safe to run?

This is an extract of code from a wordpress plugin. Is it safe to run despite the variables not being filtered? Also does the wpdb class filter to prevent any injection? list($email_id, $user_id, ...
15
votes
4answers
794 views

Why have <?php and ?> on every line

I've seen this convention pretty much everywhere, and, at times, it comes close to driving me nuts: <?php //The loop ?> <?php while ( have_posts() ) : the_post(); ?> <?php ...
1
vote
2answers
211 views

What difference does it make including the @package annotation or not?

I am somewhat familiar with the concept of packages in Java, but I'm new to Wordpress and PHP. In a template file such as header.php, what is happening when you include the @package notation? ...
0
votes
2answers
77 views

WP Login Button for current domain

I want to make a link that goes to wp-login.php for whatever domain I'm at now. Something like: <a ...
0
votes
1answer
610 views

Aspx/Rss feed - failed to open stream: Redirection limit reached

I have this issue ive been stuck with now. Its when i load a page that have a feed. I put the feed in wp-admin , this usually work with other feeds but not sure why its not working with this kind of ...
2
votes
2answers
2k views

Knowing the total number of posts before to get into the loop

Is there a way to know the total number of posts before the loop starts? I'm thinking in use two loops. The first will do the counting, while the second one will handle the content. However, I don't ...
1
vote
2answers
5k views

Inserting Gravity Form checkbox values into Advanced Custom Fields [closed]

I'm trying to feed checkbox values from a Gravity Forms form (which creates a new post) into an Advanced Custom Fields field. I've had a read around and found some info in a post (at the bottom of the ...
0
votes
1answer
41 views

Adding an Unlinked Space in a Custom Function

This question has been a pain in my side for the last few days. I am using a function to display page numbers and next/previous links with WP_LINK_PAGES. The code I'm using (below) is a shortened ...
0
votes
2answers
184 views

Strip hashtag off permalink with php

I use the_permalink() to pass the current page to the facebook like button. But when one goes directly to a comment link with a hashtag, such as example.com/post#comment1, it's considered a separate ...
5
votes
3answers
5k views

is it possible to run some php code within a wordpress page?

I'd like to access a DB table and render it in some data grid format using php on a dedicated wordpress page, accessible to members of a certain group. Is this at all possible with wordpress or is ...
0
votes
1answer
128 views

Which version of PHP-FPM is necessary to work with WP 3.5?

I'm trying to establish a blog with NGINX and PHP-FPM. I wonder if my version of PHP should work with WordPress /usr/bin/php-cgi -v PHP Warning: PHP Startup: magickwand: Unable to initialize ...
-2
votes
2answers
2k views

How do I remove blog entries from home page Twenty Eleven child theme?

I have been wrestling with this for some time. I've read the documentation about creating a separate home page and posts page, and so on, and I have managed to create a landing page, and a blog. ...
1
vote
1answer
159 views

Displaying custom field according to date

I am not sure whether this is an Advanced Custom Fields-related question, or a general PHP question, so I have also posted this to the ACF support forum, for those of you who are also looking for ...
1
vote
2answers
173 views

How to simultaneously access the same MySQL database in the main column and sidebar of Wordpress?

I've wrote some basic custom PHP code for my Wordpress site. The code basically access a MySQL database (a different database from the wordpress database) and displays the information. In addition to ...
2
votes
2answers
350 views

How can I access the “description” of a menu item?

Where you can add your menu in under appearance > menus, I have descriptions in. In my page, I want to be able to echo out that description. Not in the menu, but in my page. How can I access this ...
0
votes
1answer
281 views

How can i count the post added in relationship field, theme display

How can i count the post added in relationship field. The relationship field is a plugin (http://www.advancedcustomfields.com/docs/field-types/relationship/) In my admin i have a MetaBox i create to ...
0
votes
2answers
96 views

exclude custom post type from running a function

I have the following code in my functions.php file to display post shortlink in my posts (I prefer not to edit theme files if possible)... function add_post_content($content) { if ( is_single() ) ...
0
votes
1answer
1k views

is_singular won't call my functions?

Hi i'm using this code to call for a different stylesheet for a single post type but the problem is, It won't call the stylesheet. It's in header.php, i also tried placing it in single.php <?php ...
1
vote
1answer
301 views

How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)

I've created my own theme based on a very lean template. My theme is not parsing the [caption]...[/caption] markup to the correct html. It's just showing the text without any markup around it. Here ...
0
votes
3answers
290 views

Display a custom field rating system in the front end

I have added a content rating system to my platform where the authors can select which audience their post is appropriate for. Currently, these options are available: Unrated G PG ...
0
votes
1answer
201 views

Hide content from Post Preview

Is it possible to hide content in Post Preview (that is not hidden when the post is published)? I have customised single.php quite extensively and there are a few elements that I do not want my ...
0
votes
1answer
71 views

How can I fix this code [duplicate]

Possible Duplicate: Stackoverflow type of badge plugin giving warnings in Wordpress 3.5 I'm getting an error on my site that says: Warning: Missing argument 2 for wpdb::prepare(), called ...
6
votes
2answers
247 views

How to check if image is already stored in a site's post database? (network)

I currently have configured Wordpress so that a post can be copied to other sites within a Wordpress network. However, a post may be broadcast more than once, and I want to check if the image is ...
1
vote
2answers
635 views

Trying to get property of non-object “ wordpress ”

My WP theme got these notice on description menu function my code : http://www49.zippyshare.com/v/89513423/file.html /* Discription Navigation Menu, Credit to Christian Kriesi */ class ...
-1
votes
1answer
709 views

Open WordPress Page from selected option dropdown

Code/process to get option dropdown menu selection to open page in WordPress with php? Tried all kinds of plug-ins, widgets, but none will make menu that fits requirements of project so far. ...
-1
votes
2answers
121 views

Fix incorrect related posts code snippet

Can anybody fix this incorrect related posts codes snippet? function related_posts() { if (is_single()) { global $post; $current_post = $post->ID; $categories = get_the_category(); ...
0
votes
1answer
257 views

Changing Link Attributes for Wp_Link_Pages

I'm wondering if there is any way to change the actual link itself for wp_link_pages. So right now, I have a simple code to display the pagination for a post, it looks like this: <?php ...
0
votes
2answers
34 views

Custom PHP-coding in MU installs

I have a WPMU install with a couple of sites on it. I'd like to add some subdirectories that are not wordpress blog pages but do contain working PHP code. They do not use any of wordpress's ...
0
votes
1answer
267 views

Post from one loop in different containers?

Is there a way to output posts from a single loop in multiple containers? Ideally I'd like to have the posts title/meta/content etc alternate between first-container and second-container, but I can't ...
0
votes
1answer
170 views

Taxonomy term description with style, only if the description exists?

I am attempting to add a conditional function to my index.php that will return the description of a term in my custom taxonomy on the page for that term above the list of posts only if the description ...
0
votes
1answer
192 views

Link blogname and blogdescription to the Options Framework

I'm putting together a Theme Options page, where the user(s) I'm building this for would like to be able to edit a few settings directly from this page, including of which - the Site Title and ...
0
votes
1answer
271 views

WordPress Pages into Sections edit.php PHP hack

Im currently working on a Theme for a WordPress website. The theme affectively splits the website up into three sections. http://url.com/section1 http://url.com/section2 http://url.com/section3 ...
4
votes
2answers
621 views

Wordpress the_content() return only one image from a specific category

I am working on a Wordpress website and I am using a loop to get all the posts that have title and body contain an image. But the problem is that it returns me all the titles but not all the images. ...
2
votes
1answer
607 views

Site Title and Tagline in Theme Options Page

I'm using the Options Framework Theme to put together an options page. The user(s) I'm building this for would like to be able to edit a few settings directly from this page, including of which - the ...
1
vote
1answer
532 views

Choose To Display Post Views With An Options Panel

I have post views enabled and I'm attempting to make an options panel option to allow users to choose if they would like to display post views in each post. If they choose 'Yes," then they will be ...
0
votes
2answers
506 views

iframe not showing in post (with “allow php in posts” plugin activated)

$width = 560; $height = 315; $code = "I8M_uCnxhwY"; $homepage = "/"; $currentpage = $_SERVER['REQUEST_URI']; if($homepage!=$currentpage) { echo '<iframe width=".$width." height=".$height." ...
0
votes
3answers
684 views

How to store accumulate multiple option values in a single array using Options_API

I have created an option array that stores a series of options, along with their values. The problem is that I want to ACCUMULATE these options and store them in the options database. Meaning I would ...
3
votes
2answers
2k views

Shortcode to insert <!--nextpage-->

Since wordpress does not have a menu icon (aka "user friendly) way to add the command to a post or page, I'm trying to create a shortcode to do it. However, as logic would have it, its not that ...
0
votes
2answers
76 views

Liking a facebook page from wordpress website?

I have added a button that links to a facebook page at the left of my website, I would like to be able to let people like the page directly from my website. How can I do that? Right now I added the ...
0
votes
1answer
111 views

Using custom tables for old posts

I have a site with about 24,000 posts and 200 posts daily and the database will get huge soon. So I plan to transfer the old posts to custom tables to reduce the database load. There's no need to show ...