WordPress questions and answers


What type to upload image within theme options?

I want to get option to change logo within my option theme. I use this code: array("name" => "Upload Logo", "desc" => "Choose an image", "id" => $shortname."_logo_img", "type" => "upload", "std" => "", ), when I execute on my theme option page, nothing appear. I change that type to ....

Beau Beau: 14 minutes ago


Hide menu items for visitors and filter based on role

In my menu i've got some menu items that i don't want to show to people who aren't logged in. One of these i only want to show to logged in users of a certain roles the other to everyone logged in. So one of them is called 'My Printer'. ....

Alice Alice: 20 minutes ago


Disable single pages and archives and keep preview

TL;DR Does anybody know how I can disable single pages and archives for custom post types while keeping the preview mode? I'm looking for a way to disable the single and archive pages for a custom post type, because the posts will only be shown in the archive of a ....

Addison Addison: 38 minutes ago


Get first URL from custom field, download and set as featured image on post publish

I have a plugin that is adding text and a URL to a custom field when the post is published (not saved as draft). I want to get/make a function or plugin to search within the custom field and sideload the image from a URL, then add that image as ....

Nova Nova: 50 minutes ago


Pages other than Home page not displayed even when URL is good

I installed WordPress on a dedicated server running Debian and each time a create a new page (www.mydomain.com/mynewpage) I can't access it, and when I try I get the error: Not Found The requested URL /mynewpage was not found on this server. Even when I modify it in the WP ....

Nora Nora: 59 minutes ago


Publish a Silent Post without updating Feed

Is there a way to publish certain posts, silently without updating the feeds and those posts also should not appear in the home page. Appreciate your help. ....

Ryan Ryan: 2 hours ago


Strange behaviour with add_{$meta_type}_metadata | add_post_metadata filter

I'm unsuccesfully trying to use the add_{$meta_type}_metadata. This filter is called inside add_metadata function (wp-includes/meta.php:31 in Wordpress 3.4.2). In particular I wanna hook "add_post_metadata" filter among others. My target is to execute custom code to add,update,get custom meta, so I don't break wordpress way to do things. body of function ....

Aaliyah Aaliyah: 2 hours ago


Injecting content with $wp_query->current_post restarts from zero on paged pages. How to inject content after X posts, regardless of pagination?

I am creating a shortcode that outputs a custom loop. Within the loop while, I am injecting certain content after a particular post count. This is done by checking the current_post number. This particular function is quite long (and filled with commented-out code, from testing). Here is a link to ....

Luna Luna: 2 hours ago


Finding and removing unnecessary redirects

I have a bunch of redirects to sites like sharethis, media6, and some random character urls. Most of these are leading to a blank pixel or each other. I know a lot has to do with facebook and needed resources but how would I find out where these are being ....

Zoey Zoey: 2 hours ago


Setting multiple image urls using Wordpress' Media Uploader

I have set up a meta box to hold additional information that my client can put in, and it will appear in a different section of the page. The page shows up at The data shows on the right hand side of the page, but also in this data, ....

Nevaeh Nevaeh: 2 hours ago