3
votes
4answers
19k views

jQuery UI Datepicker not working

i want to add a datepicker on a custom page but i doesn not work. WP version is 3.2.1. Those are the init string i used on wp code: wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); ...
1
vote
2answers
2k views

Getting rid of the #038; when string replacing content

I'm trying to add some string replacements to the_title() - function format_title($content) { $content = str_replace('&','&<br>', $content); $content = ...
0
votes
2answers
91 views

single category widget with conditional terms

iam working on my first wp theme and iam new to php and wordpress. i need to create a single category widget that displays at least five posts from specific category. inside this post loop i need a ...
2
votes
3answers
1k views

Where can I get Wordpress Version in Dashboard?

On the botton of the dashboard WP proposes to upgrade to next version but it doesn't even show current version: does it show it somewhere else ?
1
vote
2answers
348 views

create a front end post page template withTinyMCE,

there are alot of front end posting suggestion with wp insert post but is it posible to create a front end post submision with TinyMCE, and similiar editor
0
votes
2answers
233 views

Drupal is going Symfony. Would WordPress benefit from doing the same? [closed]

If WordPress would do the same, would it lose much in performance?
0
votes
1answer
896 views

MySQL Query that looks for post with Custom Field, then changes Category

I'm looking for a MySQL Query that will look for all the posts with custom field "meta_key_I_want_to_find", then if the custom field is detected, add a category to that post. The category has already ...
1
vote
1answer
769 views

Custom post type multiple loop by taxonomy term

I would like to create one loop that lists the custom posts for each taxonomy term: Term A: Item Item Item Term B: Item Item Item I would like this to be totally dynamic so if I add a new term it ...
0
votes
1answer
1k views

Wordpress database error: [Query was empty] - using $wpdb->prepare()

I have edited my question, I'm now getting the error about checking my MySQL settings. I changed the $sql_dvalues variable to an array with the values instead of comma spaced values and now it is ...
1
vote
1answer
103 views

How to prevent certain usernames from being registered?

How can i prevent or blacklist a list of usernames that i don't want users to register with? And can I add a message if they try to register with one of those names that says 'this username has been ...
3
votes
2answers
56 views

How can I limit functionality in one version of a plugin?

I am busy writing a plugin with a free version and a paid, Pro version. For our initial release of both versions, I want to keep things as simple as possible, so I would rather defer using a strategy ...
0
votes
2answers
457 views

Add class to last 3 posts in loop

I have this code so far, which adds the classes first, second, and third to every first, second and third post in the loop. It also adds a class to the first 3 posts in the loop. But how can I make it ...
0
votes
1answer
125 views

use custom field value as post category in loop

I have a page template and at the bottom, I want a loop of posts based on a custom field value - store_name This is what I have: <?php global $wp_query; $paged = (get_query_var('paged')) ...
0
votes
1answer
653 views

How to change background image from Wordpress Gallery

I am building a custom theme for a client in Wordpress: She wants the background to change when you click on a gallery thumbnail in a post. It must be a solution, that doesn't involve any coding on ...
0
votes
2answers
731 views

pagination links not displaying

I'm unable to get my 'next_posts_link()' and 'previous_posts_link()' to display. So far I've tried the standard first debug by deactivating all plugins and clearing the cache, I've also tried removing ...
1
vote
1answer
1k views

how to exclude “featured” posts from the main loop?

In a category.php template, I built a function that lists "featured" posts before the main loop. The featured posts are selected using a custom field and get_posts(): function ...
0
votes
1answer
236 views

After installing JetPack, can I delete the WordPress stats plugin?

After running the WordPress stats plugin for many years, I've decided to upgrade to JetPack. The installation went smoothly, I connected and authorized my blog with Wordpress.com, and I'm seeing ...
1
vote
2answers
367 views

Show preset taxonomy description

In educational courses database, institute is used as custom taxonomy. How can I display description of "institute" taxonomy in all related posts as one institute will have at least 50 posts ...
0
votes
1answer
243 views

Duplicate homepage to show posts from 1 category

I'm trying to accomplish the following: I wan't to display all posts from a certain category on a page that has the same layout as the homepage of the actual blog. I found the following online to ...
0
votes
2answers
186 views

Posts 2 Posts plugin: best way to change connection field value?

I have started to use posts-to-posts plugin by scribu, and now I need to change vaues for connection fields. Particularly, I've created 'person' and 'piece', connection 'role' in between and defined ...
10
votes
4answers
3k views

Solutions for generating dynamic javascript / CSS

Let's say you need to generate javascript or CSS code that depends on the current context. For example you have a form on the homepage that fires an ajax request on submit, and a different form on ...
0
votes
1answer
540 views

WP Query get only 1 post (sticky, not sticky etc)

I'm using WP Query & want to only return 1 post in a category. Either the most recent sticky else the latest post. Is this possible? Thanks, George <?php $category1 = new ...
1
vote
2answers
1k views

Adding submit or update button to custom metabox?

I have alot of custom meta boxes, and the user has to scroll to the top everytime he wants to save the meta info. Is there a way to put submit buttons at every meta box that does that same as the ...
0
votes
2answers
1k views

Comment rating plugin for wordpress.

i want to know, which is this comment rating plugin ? used here http://www.smashingmagazine.com/2010/08/10/showcase-of-delicious-coffee-websites/ plz have a look at comment section
3
votes
2answers
1k views

Automatically pull newer posts and append to current page.

I have a page that currently loads posts of custom post type using regular WP_Query. The custom post type are for news articles. Newer news articles (posts) are constantly written, as such there is a ...
1
vote
1answer
614 views

current post with current author

how can i check if the current post belongs to the current author? this is my basic code; ` if($curpost) { wpuf_edit_show_form($curpost); } else { $error = ...
1
vote
1answer
142 views

How do I insert an already uploaded video file into my Media Library?

I'm having problems with the WP uploader (hosting issue); WP is pooping out after uploading files that are relatively large (> 32MB). My idea was to upload the video file via SFTP to the server and ...
5
votes
1answer
828 views

how to group custom post types

hi wanted to know do i group my custom post types to appear together in a group in the wordpress back end menu bar like this below in the picture what code do i have to use in my functions.php so that ...
0
votes
1answer
175 views

wp_list_pages bug in “number” parameter

I'm trying to build a list of the first subpage out of 10 pages. So my page structure is this: Page A Page A1 Page A2 Page B Page B1 Page C Page C1 Page C2 Page C3 And I'd like to display ...
2
votes
1answer
1k views

Translate Navigation Menu & Sidebar Widget Titles

Is there any plugin to translate navigation menu & sidebar widget titles ?
1
vote
1answer
38 views

widgetlogic and permalinks

I'm trying to use widgetlogic to conditionally display menus on certain pages. Each menu uses a tag like is_page(array("Page Name", "Page Name 2" ...)), and works perfectly until I try to change ...
-1
votes
3answers
1k views

Is it possible to use github:gist with Wordpress? [closed]

I have a wordpress blog i.e. bruno.wordpress.com I would like to use github:gist. I paste my code in gist and get a link like: https://gist.github.com/1323748 Is there a way to show this code in my ...
8
votes
2answers
668 views

Are Nonces Useless?

This is probably a noob question BUT hear me out - isn't the point of using Nonce to protect from things like scrappers (phpcurl scrappers etc.)? But my Nonce prints out in the head of the document ...
0
votes
2answers
2k views

get_permalink() always returns empty

I suddenly have a bug in my plugin, and I don't know what on earth could be causing it. This code is failing because get_permalink() is returning empty at all times: $select = "SELECT * FROM ...
0
votes
2answers
905 views

How to force “remember me” users to login again?

My question is how to force the users that are auto-logged in because they previously checked "remember me" to log in again? It may be something with cookies, but is there anything I can ...
0
votes
2answers
76 views

Log Author Actions

Is there a place where actions like post creation/deletion, page creation/deletion, modification, etc. is saved? Is this stored in the Apache logs? If this is not saved, is there a way (plugin?) to ...
1
vote
1answer
212 views

Widget translation on my plugin

I am adding i18n to the widget on List Category Posts. I've correctly created the pot file, and po and mo files for Spanish and English. All of the Strings are being displayed with _e() on the form ...
2
votes
2answers
6k views

How to get attachment caption (get_the_excerpt gives parent post excerpt) ?

I am displaying the attachments on the parent post page with this code : $args = array('post_type' => 'attachment', 'post_mime_type' => 'image', 'order'=> 'ASC', 'numberposts' => ...
0
votes
1answer
205 views

Hide featured post from second page

This is my category page code <--Featured Post start--> <?php $count = 1; if (have_posts()) : while (have_posts()) : the_post(); if($count == 1) : ?> <a href="<?php the_permalink() ...
1
vote
1answer
440 views

WordPress custom options storing?

I have a theme with around 500 custom options, their code looks like this: <form method="post" action="options.php"> <?php wp_nonce_field('update-options'); ?> <input type="text" ...
0
votes
1answer
791 views

What does the Global Variable $s represent?

What does the $GLOBALS['s'] variable contain? It looks like an empty array, but what would it normally hold? I've encountered it in a tutorial: The WordPress Theme: Single Post, Post Attachment, ...
7
votes
3answers
2k views

WordPress local development environment

Everything on WordPress is primed for a production server, and hardly mentions info on development stuff. I want to setup a WordPress blog locally so that its good and ready before it goes live. Are ...
0
votes
1answer
231 views

Can I change the “Home” text in the menu?

I’m pretty sure this can be done with a filter or some kind of find and replace, but I’m not sure how. I have a page called “Home” like so: When the link is displayed in my template it says ...
0
votes
1answer
425 views

save radio button selection in post-meta on submit

Right now I'm reading tags from the tag box, and putting them in a form with radio buttons so the user can choose a "main tag" from the tags they just typed in: function write_tags(){ var rawtags ...
1
vote
2answers
214 views

Applying OO patterns and principles to plugin development

I'm busy writing my first plugin, using PHP 5.3.5. I come from a C# environment, and I must say I'm more than happy with the level of support for good, solid OOP techniques in PHP. However, I'm a ...
0
votes
2answers
40 views

I need to find which is the file that checks the DB for correct login (username, password)

I let users to register in my page, however I want to improve the password security that is saved in the DB. For this I need to find out which is the file that makes the query where pass=pass and ...
0
votes
2answers
275 views

meta_query and strange orderby behaviour

this is my problem query, which picks all future or pending events. Note that some posts only have _startdate without _enddate (1-day events). $args = array( 'post_type'=> 'events', 'meta_query' ...
4
votes
2answers
1k views

How to use WP_Error $data argument?

The Call $error = new WP_Error( $code, $message, $data ); The Output Say I added three messages (msg A, msg B, msg C) to the code my_code and with the last message I added "Data" as $data, which ...
1
vote
1answer
119 views

Why do plugins that cause 'unexpected output' create AJAX problems?

I just had to fix an AJAX failure in the admin area (the search/attach dialog box in the Media Library wasn't working) and tracked down a plugin that was the culprit. On activation, this plugin was ...
0
votes
1answer
160 views

How to add post of custom type to a category with custom type capabilities

I have created a custom post type 'shows'. And I am using the capabilities argument to create my own custom capabilities. My aim is to have a user (show_manager, say) who can only edit/create shows ...

15 30 50 per page