question
stringlengths
0
34.8k
answer
stringlengths
0
28.3k
title
stringlengths
7
150
forum_tag
stringclasses
12 values
What action or filter do I have to check or compare against $pagenow? In the admin area, I need to let non admin and editor users only to access: <code> index.php (dashboard) upload.php (attachments management) media.php (attachments management) media-new.php (attachments management) </code> Thanks in advance.
that depends on if you want to redirect users away the you should use <code> init </code> hook since no output or headers are sent before that hook. or if you want to display a nice "You Don't have the right permissions to access this page" message then you can use the <code> wp_head </code> action hook: <code> //displ...
Restrict access in wp-admin area?
wordpress
What is the best practice for adding google conversion tracking code to a specific page?
User needs it in his footer so I think you should use conditional page logic . Something like: <code> If ( is_single(postID)) { //insert tracking code } </code> You can also use the post title or post slug, but id is the most reliable. Old Answer I would consider writing a shortcode . Add the following to your function...
google conversion code
wordpress
i have a custom post type name 'business' and taxonomy 'business-category'. now i want to show posts for some specific terms suppost, term1, term2, term3 etc. The following code is working for me but for only one term. <code> $args=array( 'taxonomy' =&gt; 'business-category', 'term' =&gt; 'term1', 'post_type' =&gt; 'bu...
I believe the array will work using terms, rather than term (plural) http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters Has a lot of useful info for mutiple terms/multiple taxonomies but basically look into the tax_query item, specifically AND or OR operators. It's all explained there pretty wel...
Showing posts by collection of specific terms and texonomy
wordpress
It's been a while since I've done a bounty challenge, so here's another. Same basic rules: 1 answer per person, most creative/useful/helpful/entertaining answer wins. This time around, the award will be 50 reputation points via a stackexchange-url ("Bounty"). This challenge is for my in-development plugin, Crossfire . ...
Ricochet After all, this custom post type is kind of rebounding off one network site to another. Plus it's a bit of a play on words based on your plugin's name.
The Great Plugin Nomenclature Contest of 2011
wordpress
I'm trying to create a plugin that alters the Add New Post page so the Visibility field says "Private" by default: <code> Status: Draft Visibility: **Private** Publish immediately [Publish] </code> ...as opposed to what WordPress normally assumes: <code> Status: Draft Visibility: **Public** Publish immediately [Publish...
since you're developing a plug-in, I assume you don't want to touch any files outside of wp-content/plugins or ../themes for that matter. However, if that's not the case, follow along: Go to wp-admin/includes/meta-boxes.php and find: <code> $visibility = 'public'; $visibility_trans = __('Public'); </code> Now change it...
How can I make it so the Add New Post page has Visibility set to Private by default?
wordpress
Hey Guys, I'm trying to build a right aligned, wrapping capable wp_nav_menu powered menu. Is there a way to have it rendered backwards, so that float: right; would work and not mess up the order? I was hoping for something like this: <code> &lt;?php wp_nav_menu( array('sort_order' =&gt; 'DESC' )); ?&gt; </code> Thanks!
I just found this handy little function that ads the ability to reverse the menu output order. it might come in handy: <code> /** * Enables a 'reverse' option for wp_nav_menu to reverse the order of menu * items. Usage: * * wp_nav_menu(array('reverse' =&gt; TRUE, ...)); */ function my_reverse_nav_menu($menu, $args) { i...
wp_nav_menu sort order?
wordpress
Using BP theres a way to: <code> 1. On login redirect to member profile. 2. On logout redirect to facebook.com </code> Thanks in advance.
heres how you login to the profile page. <code> /*Add a filter to filter the redirect url for login*/ add_filter("login_redirect","bpdev_redirect_to_profile",100,3); function bpdev_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user) { /*if no redirect was specified,let us think ,user wants to be ...
BuddyPress - Redirects on Login and Logout
wordpress
I am using WordPress Custom Menus . I have links like Home - Rendered using <code> home.php </code> Blog - Rendered using <code> page-blog.php </code> with <code> WP_Query </code> to get blog posts Services - Page Portfolio - Rendered using <code> page-portfolio.php </code> to get all posts of the Custom Post Type "Por...
for category: li.current-category-ancestor li.current-cat for menu: li.current-menu-item for page: li.current_page_item li.current-page-ancestor for post: li.current-post-ancestor For more details: http://codex.wordpress.org/Dynamic_Menu_Highlighting
Determining the "current_page" in WordPress Custom Menus
wordpress
I read that you can use session_start() in config.php, but that it is not recommended. I have a form where a user fills out their name and submits. On confirmation of the submission they land on a new page that says 'Thank-you First Last.' What is the preferred way of passing this information from page1 on to page2?
I would recommend using <code> $_GET </code> or <code> $_POST </code> variables ... the same way you submit the form. This has nothing to do with session. Basically, when the user fills out the form, you're populating <code> $_POST </code> with information. When the user submits the form, you process the information in...
Can you keep session data for visitors?
wordpress
I'm wondering how to do make a multi-site network with wordpress. The best example I have is the cheezburger network.
http://codex.wordpress.org/Create_A_Network Have you looked through the basics? You can set up subdomains, site.domain.com or subdirectories domain.com/site Or you can even route domains to the sub sites. Check out that stuff first, as multisite is built in to WP since 3.0 If you had more specific questions you maybe r...
How do I create a multi site network?
wordpress
I've got page with metabox called "something". It can have two values "value" and "value2". I'm using a shortcode at this page and want it to display something's value. The problem is I don't know how to access global variable in a shortcode? Example, I have this in page.php: <code> if($something == "value") { global $...
Meta data is save in postmeta table and to get them you can use <code> get_post_meta($post_id,'meta_key_name',true); </code> so in your shortcode function globilaize $post object and get you value like that <code> if($something == "value") { global $post; $one = get_post_meta($post-&gt;ID,'value_name'true); $two = get_...
Wordpress global variables?
wordpress
One of the sites I currently maintain have approximately 2000 individual pages, broken down into departments and other such categories. Some of these pages contain "dynamic" content, such as a list of documents that are updated or added to on a monthly basis. We're thinking of migrating to WordPress for this site, but ...
Just take a look here: http://vip.wordpress.com/clients/ http://wordpress.org/showcase/
What are examples of large sites running WordPress?
wordpress
I wonder if its a good idea to use <code> add_image_size </code> or is it just a convinence feature. I say this as I think <code> add_image_size </code> creates images of various sizes regardless of what the usage if the image maybe eg. I may want a thumbnail of 500x200 in my portfolio pages only. but WordPress will cr...
For image formats that are only used for a small fraction of the images, I suggest using an on-the-fly image resizer. Preferrably one that caches the images so that you only have to resize them once. I use TimThumb for a number of projects, and it's been good enough for me.
add_image_size creating lots of images (of various sizes)
wordpress
I am having a problem where my markup is rendered incorrectly (more space because of <code> &lt;br /&gt; </code> ) as WordPress adds <code> &lt;br /&gt; </code> everywhere theres a line break eg. <code> [x] [y]Hello world[/y] [y]A test[/y] [/x] </code> In the handler for <code> x </code> the <code> $content </code> loo...
before you register your shortcode, add the filter to the content for unautop: <code> add_filter( 'the_content', 'shortcode_unautop' ); </code> Do this also for the areas, maybe excerpt or widget, when your shortcode add to this areas.
WordPress adds br in between my shortcode
wordpress
I have different widget areas. One is a horizontal area that may contain eg. 4 widgets next to each other. My Question is how would i add a different eg. <code> $param['widget_title'] </code> to widget number <code> $n </code> (via a filter)? I already tried using <code> wp_registered_widgets(); </code> function and te...
The <code> dynamic_sidebar_params </code> filter is called before each widget is displayed, so multiple times in the same sidebar. It filters the <code> $args </code> and <code> $instance </code> parameters that will be passed to the widget. If you only want to execute it for the third widget of a specific sidebar, you...
Widget Area: Modify $param['xy'] from widget-$n
wordpress
I want a separate production and test/dev instance. Is it possible to have two installs of wordpress multi on the same server, using different databases or do I need 2 servers, one for test and one for production? I want to have a test instance where I can try out plugins, setting changes etc, without affecting my prod...
Yes, it's possible to have 2 WP MultiSite installs on the same server - just treat them as 2 separate virtual hosts, put the WP files in separate folders and use separate databases (although you can use the same database server)
muliple wordpress multisite installs on the same sever
wordpress
I'm trying to create a custom comments page with pagination. I have non-hierarchical custom type "apartments". It makes urls like: <code> /apartments/ - for acrhive /apartments/%id%/ - for post page /apartments/%id%/comments-page-X/ - for comments (X is some number) </code> How do I create page <code> /apartments/%id%/...
<code> $args = array('post_id'=&gt;get_the_ID(), 'status'=&gt; 'approve'); $all_comm = get_comments($args); $per_page = get_option("comments_per_page"); if(!$per_page) $per_page = 4; $cpage = get_query_var("cpage"); if(!$cpage) $cpage = 1; if(round(count($all_comm)/$per_page) == 0) $total = 1; else $total = round(count...
Custom comments
wordpress
I used a plug in to retrieve all the post from a category. The post is displayed in an unordered list <code> &lt;ul&gt;&lt;li&gt; </code> and everything if fine, even the <code> &lt;a&gt; </code> tags to the post. Now, for more usefulness (it's a word?), I would like, on hover of the link, to display the first image of...
I just forget the idea. Doing it with NGG is way too complicated. I am looking for a different solution. Magic gallery (PRO) look good to me
Retreive post thumbnail and display it as tooltip on hover?
wordpress
How to add a logout option to the main nav menu (not to the top bar) in BuddyPress?
Google is your friend . Here is a snippit I found I didn't test it but seems logical. <code> // functions.php function add_login_logout_link($items, $args) { if(is_user_logged_in()) { $newitems = '&lt;li&gt;&lt;a title="Logout" href="'. wp_logout_url('index.php') .'"&gt;Logout&lt;/a&gt;&lt;/li&gt;'; $newitems .= $items...
BuddyPress - How to add logout in nav menu
wordpress
hey guys, didn't know that, but the attachement page (i'm using attachment.php as template) is actually looping through ALL ever uploaded attachments to my blog! I just want to use it in order to view the images of a gallery etc. So I just want to loop through the images that are specific to the current post. Any idea ...
The <code> attachment.php </code> is a specific template in the WordPress template hierarchy . WordPress uses it for a specific purpose, and the default Loop just won't do what you're claiming it's doing. (The behavior you're describing would be analogous to the <code> single.php </code> template file looping through a...
attachment page template? only show attachments for current post?
wordpress
I guess the title of this question is not clear. I'm asking for a plugin, which only superadmins can use, that shows which (or, at least, how many) blogs use each plugin installed on the network. I've searched a lot for this, but found nothing. Is anybody who knows any such plugin?
You mean something like: Active Plugins which is a plugin that Generates a list of plugins that are currently in use and Does not include primary blog, network activated plugins, or plugins with 0 users.
Plugin to list active plugins across networked sites
wordpress
Basically, I want to show non-logged in users a page that says 'register or log in.' But I want to show logged in users a standard homepage will all my posts.
Rarst's solution is indeed the simplest way to do it and the Members plugin also has heaps of other advantages. You can also do it without a plugin, by using the is_user_logged_in() function More info on http://codex.wordpress.org/Function_Reference/is_user_logged_in and http://codex.wordpress.org/Function_Reference/ge...
How do I show a different homepage to logged in and non-logged in users?
wordpress
I'm currently developing some plugins. Due to the fact that they should also be available via the wp.org plugin repo, i need to license them properly. My decision so far is to use a modified MIT/Expat license, which is compatible to the GNU GPL license. I modified/extended the license in two places (bold quote parts). ...
A popular choice is the Duel license BOTH GPL AND (non-modified) MIT. The non-modified MIT license is on the list of Compatible licenses though (See:Expat License) Area of jurisdiction: Austria. This is interesting to me, I'm not sure that line violates any license but to me part of Open Source is just giving up some r...
extended MIT license
wordpress
More of an open discussion than a question, really, because I know adding custom arguments to the post type object does work, but I'm wondering if it is technically wrong in any way. Basically, when registering a post type: <code> $labels = array( 'name' =&gt; _x('Drews', 'post type general name'), 'singular_name' =&gt...
You can add as many arguments as you want to the <code> register_post_type() </code> $args as they are all save in <code> $wp_post_types </code> global in an array (ex: $wp_post_types[type] = $args), but i'm not sure if that is the best way to go since this could easily be changed in the future and then your functions ...
Is it a good practice to include custom options when registering a post type?
wordpress
I'm trying to redirect to a specific post based on a GET parameter. The value of the GET parameter is the value of a specific custom field. For example: http://somedomain.com/wordpress/?fid=xyzzy I have this working when a post matches. But, it's not working properly when there is no match. <code> add_filter('query_var...
remove the else after the foreach: <code> add_action('parse_request', 'fid_parse_request'); function fid_parse_request($wp) { // only process requests with "fid" if (array_key_exists('fid', $wp-&gt;query_vars) &amp;&amp; $wp-&gt;query_vars['fid'] != '') { $args = array('post_type' =&gt; 'faculty_profile', 'meta_key' =&...
Redirecting to a post based on a GET parameter and a custom field
wordpress
If I am pushing a new version (v0.2) of my plugin (v0.1) on the repo, what does I do with the stable tag in readme file? Change it to v0.2? What should come here? Clarifications please :)
Yes. You need to: Change stable tag to 0.2 Commit (or copy/branch) new version to <code> /tags/0.2 </code> Don't forget to update version to 0.2 in plugin's header
Stable tag of plugin in the readme file
wordpress
I'm coding a very complex plugin which it's organized as a parent "container" class and several subclasses, where each subclass is an optional/mandatory element which usually (but not always) maps to his own add_submenu_page. Basically, it's a plugin with his private set of let's call them "subplugins". Every subclass/...
I'm wondering if i should refactor my plugin using a 'private' Observer/Mediator pattern ie. collect all relevant add_actions to my parent class only and baking up a pattern to notify/forward subclasses of events, reducing the impact of my plugin to WP event ques. The event queue is fundamental to WP, so it's pretty fa...
Plugin Architecture/Design Pattern - is better to use a private Observer/Mediator Pattern for plugin subclasses or WP add_action?
wordpress
I am using the Boldy theme from Site5 on a v3.1.2 site . The way this theme works, is that there is a portfolio, (which I am using as a case studies gallery ) that pulls in posts from a specific category you define under the themes settings (id=98) This is fine if you also set the blog up as per the Boldy instructions,...
You want the category 98 to be excluded only on the blog page, right? They should be accessible on the category page directly (your downloads page), correct? Can you try this? Let me know if its not what you want, we can modify it to suit your needs. Right not it only excludes the category on where you show your blog p...
Hide Category from Blog?
wordpress
Theres a way to convert links like: http://www.localhost.lh/?attachment_id=41 into: http://www.localhost.lh/attachment/id or: http://www.localhost.lh/author/attachment/id
here a simple WordPress rewrite rule to get the job done: <code> add_action('generate_rewrite_rules', 'attachment_rewrite_rule_14924'); function attachment_rewrite_rule_14924($wp_rewrite){ $new_rules = array(); $new_rules['attachment/(\d*)$'] = 'index.php?attachment_id=$matches[1]'; $wp_rewrite-&gt;rules = $new_rules +...
Pretty URLs or permalinks for attachments
wordpress
I use MathJax to blog my mathematical thoughts. Is it possible to convert my WordPress posts (with plenty of math) into a LaTeX document? The plugin should prompt me to select posts for the paper, and should do the rest automatically.
WPTeX allows you to convert your WordPress blog to a LaTeX document. If it does not already contain support for inline LaTeX, it should be really easy to add it.
Export blog posts with MathJax to LaTeX document?
wordpress
Building my first site. Running v3.1.1 with the Boldy theme from Site5. Boldy makes use of prettyPhoto Lightbox. If you refer to the instructions for setting up Boldy (bottom of page) For adding Lightbox behaviour to a link just add rel="prettyPhoto" to the image Link Rel I have just imported about 100 blog posts from ...
You can create a <code> content_filter </code> that will update on the fly meaning that you don't have to update all previous pictures and it will be the default so you don't have to worry about your authors. something like this: <code> function autoadd_rel_prettyPhoto($content) { global $post; $pattern = "/(&lt;a(?![^...
Apply a tag to every images 'Link Rel'
wordpress
I'm running into an issue for a client whereby I keep getting the same error over and over again whilst trying to import an exported file (into an IIS environment): <code> Sorry, there has been an error. The uploaded file could not be moved to D:\www\www514\obtecfoundcom/wp-content/uploads/2011/04. </code> Anybody know...
Have you verified permissions on the upload_tmp_dir (C:\Temp)? It's possible that the upload is actually failing there rather than in the destination directory.
Using the Importer on an IIS Server
wordpress
It appears that I can only use an ID for the param <code> post_parent </code> whether in <code> WP_Query </code> or <code> get_children </code> Is there a way to query for children via postnames which are more readable.
Try using the <code> get_page_by_path() </code> function ( Codex ref ). So, something like: <code> $mypage = get_page_by_path( 'page-slug' ); $mypageid = ( $mypage ? $mypage-&gt;ID : '0' ); </code> Then, the <code> post_parent </code> argument becomes: <code> 'post_parent' =&gt; $mypageid </code>
How to query children by post name/slug
wordpress
I have a site that has a few custom post types. When a customer searches it shows a combination of all the different posts. I'd like to segment the two on the same page resulting in something that looks like the example below. Any help would be appreciated. Showing results for: really cool search Video Management from ...
You can group posts by type using <code> posts_groupby </code> filter hook: <code> add_filter('posts_groupby', 'group_by_post_type' ); function group_by_post_type( $groupby ) { global $wpdb; if( !is_search() ) { return $groupby; } $mygroupby = "{$wpdb-&gt;posts}.post_type"; if( !strlen(trim($groupby))) { // groupby was...
Seperating Custom Post Search Results
wordpress
I badly need to create an .XML file inside my theme every time user comes to my site. But I can't. This code in header: <code> &lt;?php $ourFileName = "testFile.txt"; $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); fclose($ourFileHandle); ?&gt; </code> Just does nothing. It doesn't display "can't o...
File system access is tricky thing between different possible server configurations. If you need to implement it reliably in WP you should look into its API for such. See Using the WP_Filesystem .
Is fopen() forbidden in WP?
wordpress
I have a site that has pages being indexed in Google in the form... <code> site.com/?p=1 site.com/?category_name=uncategorized site.com/?author=1 site.com/?m=201103 </code> And since the permalinks of the site have been set to postname since the site was created, I'm trying to determine how these links are being create...
There are two places bots would look: your sitemap (if you submitted one to google), and your robots.txt. WordPress itself doesn't put anything in robots.txt (unless you set your site to private, then it tells the bots not to index anything), nor does it create xml sitemaps that google would use. There are a few plugin...
Permalinks set to /%postname%/ but still have links being indexed in the form ?p=x
wordpress
Wondering if anyone can help. I'm putting together a site which features music reviews, amongst other things. The set up is built on a custom post type and a number of associated taxonomies. Post type: my_albumreviews Taxonomies: artist label release date On a page displaying an album review ( <code> my_albumreviews </...
@Frederik , @Bainternet &amp; Otto Thanks for your help, guys. A thousand thanks for your help! The key lied in stripping the taxonomy's slug out of <code> wp_get_post_terms() </code> . Here's my final, fully functioning code: <code> $artist_taxo = wp_get_post_terms( $post-&gt;ID, 'artist' ); //Fetch terms from taxonom...
How to pull a number posts from a specific Taxonomy within a Custom Post type
wordpress
I'm trying to create a versatile Wordpress network . In order to speed up development, I imagine I'll need to channel projects to different themes at an early stage. At the core of my network install I'd like to have three or four themes, pre-configured to handle a specific class of website. What's more, I'd like each ...
There are a lot of specific to figure out, but your basic options are to handle it: In runtime. Stuff common core into plugin or just load it from same directory for all core themes. In development. Set up a version control, make a script that will check out common files to all core themes.
Grandchild themes and optimal network architecture
wordpress
I'm developing a website using the WPML plugin. And I would like to know which is the better option, or even the correct way to change classes or IDs between the languages. Sample code: <code> &lt;ul id="&lt;?php _e('menu-topo'); ?&gt;"&gt; &lt;ul id="&lt;?php if ($lang = 'en') { echo "menu-topo-en"; } else { echo "men...
_e() will translate the text passed as a argument to the language your site is currently set up to use (if the translation exists). Anyway, don't do that. Use it for text visible on the website, not for IDs/classes etc. To create context based css rules, simply add the WPML language ID as a body class: <code> add_filte...
What is better for wordpress performace?
wordpress
Is it possible to remove a default attachment field from the attachment editor, for example the "Caption" field ? To give you some context, I'm trying to build a custom attachment editor page. I found how to add custom fields , now I'd like to remove some of the default ones I don't need.
Use the attachment_fields_to_edit filter to remove the fields you don't want displaying from the array. <code> function remove_caption($fields) { unset($fields['post_excerpt']); // See wp-admin\includes\media.php line 1071 return $fields; } add_filter('attachment_fields_to_edit','remove_caption'); </code>
How can I remove fields in the attachment editor?
wordpress
I am the admin for a blog with around 20 authors contributing articles. Have just migrated from Wordpress.com. The problem that started to happen at WP.com, was different authors would use tags differently. i.e Some would pick just basic tags, others would list out every key word possible. It would appear that for WP r...
I manage a blog with 3 editors and 8-10 contributors. In my experience, the best way to manage tags is to simply instruct contributors not to add tags to their own articles, and instead have the editors be responsible for tagging articles. You can then work with editors to agree on what the purpose of tags are on for y...
Efficient Tag Management?
wordpress
I need some help with robots.txt. Under Privacy Settings, I selected "I would like my blog to be visible to everyone, including search engines..." As I understand it, WordPress automatically creates a robots.txt file. But, I need to exclude one page from the automatically generated robots.txt file. Let's say the page i...
you can just make a file in your root named robots.txt if you don't already have one User-agent: * Disallow: /myPage is the format for that one page there is no allow, only disallow. disllowing pages you follow the above format WP may not have generated a robots.txt, I believe it only would have if you wanted your site...
Questions about Robots.txt
wordpress
I have a hierarchical custom post type (missions) setup. I want to create a few child pages for it (discuss, petition, educate), but I want each of those child pages to display a different template. There does not appear to be a way to use a selected template, like on a normal page, so I thought maybe I could just have...
There are two approaches to my question, that are both useful. They were provided by @goldenapples and @Bainternet. stackexchange-url ("Custom Post Type Data in Sidebar widgets?") stackexchange-url ("How to quickly switch custom post type singular template?")
Custom Post Type Template Based on Page Slug?
wordpress
in the functions.php of a parent theme, I would like to check for wheter the theme is being run directly, or it is run via a child theme. Is there a conventional way of doing this? I cant find the is_childtheme() function I would have liked to have found.. so whats the best way? Check for theme name and compare it to p...
As One Trick Pony said, there's a dedicated function (since WP 3.0): is_child_theme()
something like is_childtheme()
wordpress
I am trying to retrieve all custom post types created by the current user. I have this piece of code: <code> wp_get_current_user(); $args_my_items = array( 'posts_per_page' =&gt; 10, 'post_type' =&gt; 'mycustomposttype', 'post_author' =&gt; $current_user-&gt;ID); query_posts($args_my_items); </code> What ends up being ...
You must specify the <code> author </code> parameter as described here . Try to use: <code> $args_my_items = array( 'posts_per_page' =&gt; 10, 'post_type' =&gt; 'mycustomposttype', 'author' =&gt; $current_user-&gt;ID ); query_posts($args_my_items); </code>
Retrieve posts by author
wordpress
Is there a way to count the amount of empty fields of a post (or the fields of a plugin as they relate to the different)? For example, I have 1,500 posts on my site. Each post has important fields (information) needed for the proper functionality and user accessibility (i.e. city, state, zip code, address, etc), but no...
You can do custom query loop for that particular meta box for an empty value. Something along the lines of <code> $check_city_value = get_post_meta($post-&gt;ID, 'city_box'); ?&gt; if (empty($check_city_value)) { echo '$check_city_value is either 0, empty, or not set'; } </code> You would have to loop through all the p...
Counting post fields
wordpress
I have to create a hundred of content pages that share the same structure. For example: <code> [Title] - [Subtitle] [Description] [Specs] - [Spec-A] - [Spec-B] - [Spec-C] [Features] - [Image-A][Feature-A] - [Image-A][Feature-B] - [Image-A][Feature-C] </code> I would like to store this information in some DB tables so t...
You might want to consider creating a Custom Post Type for this product (I assume it's some sort of product), and then adding custom metaboxes, that will store the custom data (specs, features, etc.) as metadata for each Post. Then, your custom template file becomes "single-.php" (e.g. "single-product.php"), and you ca...
How to create a page template that retrieves content from db?
wordpress
I am creating a plugin that resides at http://localhost/test/wp-admin/options-general.php?page=my-plugin I am trying to add a query string to this page so that it can be used in my plugin such as http://localhost/test/wp-admin/options-general.php?page=my-plugin?myVar=cool The problem is that this prompts wordpress to d...
When you don't know if query string was started or not you can use add_query_arg which it knows how to deal with that and adds the " <code> ? </code> " or " <code> &amp; </code> " marks (which ever one is needed) to the query string. Update By popular demand I'm adding a few examples that are from the codex: Using get_...
Add query string to plugin URL
wordpress
I really hope I've got a simple issue in front of me here, as it's sort of driving me up a wall. Short story: submitting a simple form on the front end of the site results in a <code> 302 Found </code> redirect, totally stripping the <code> $_POST </code> data in the process. Scenario: Create a page in the admin called...
There's nothing wrong with that code. I just did it on a local install and it worked fine, exactly how you'd expect. Check for conflicting plugins.
Phantom 302 status code when sending a POST requests on pages
wordpress
I am new to wordpress, and trying to get my head around the idea of sessions and all. I read in a lot of places that session concept is not used in wordpress. Anyway, I downloaded the my-login-theme plugin. My question is, when a user navigates to some secured area, I want to check if that user is logged in or not. Onc...
Use the <code> is_user_logged_in() </code> conditional tag ( Codex ref ) to determine if the current user is logged in. Use the <code> get_userdata() </code> function ( Codex ref ) to return user data.
determining if the user is logged in
wordpress
Use case is somewhat simple - here goes: Five people share a single wordpress install - not multi-user Each person blogs and puts their posts in a their own unique category Each person has their own domain name All domain names are pointed or parked to same WP install folder Each person's domain name only shows the pos...
Hi @aj martin: Here's two different solutions (editing the specifics for your use case) : Doing a Redirect: 1.) At the top of your <code> /wp-config.php </code> file add the following: <code> if ( is_yoursite_blogger_domain( $_SERVER['SERVER_NAME'] ) ) { $domain = str_replace( 'www.', '', $_SERVER['SERVER_NAME'] ); def...
Multiple Domain Names - One WP Install (non-Multisite) - Default Each Domain name to Category Archive
wordpress
I'm about to migrate from an old Expression Engine website to a new WordPress site on the same domain. Is there anything I should be aware of with respects to redirecting old links? The old site is quite well indexed in Search engines and linked to from other sites, but because the domain name is the same, I'm unsure o...
Good plugin: http://urbangiraffe.com/plugins/redirection/ You can import CSV files of URLs to redirect, so use the string site:mydomain.com in Google to grab all your indexed URLs, get them into a file and when the WP site is live, import the file and then select the new target WP pages. The plugin has good 404 logging...
Redirecting all old links from previous EE site to new WP site in one go?
wordpress
I've some trouble getting nonces working with my ajax submit form. First of all i create a nonce and pass it to my registered script, i'll later send it to ajax-handler packed with my form fields: <code> wp_localize_script( 'roll_script', 'Roll', array( 'postRollNonce' =&gt; wp_create_nonce('nonce-roll'))); </code> In ...
By default, the lifetime of a nonce is one day. The nonce is generated by concatenating a variable representing the current day, the user id, and the name of the action, and hashing the resulting string. If you want the nonce value to change more frequently, you can filter the 'nonce_life' value. This function, for exa...
ajax - why multiple calls to wp_create_nonce() return same value?
wordpress
Situation I got a class where i add a meta box to the post edit screen. EDIT: This is the working version now <code> /** * Calls the class on the post edit screen */ function call_someClass() { return new someClass(); } if ( is_admin() ) add_action( 'load-post.php', 'call_someClass' ); /** * The Class */ class someClas...
Your callback function is wrong implemented <code> add_meta_box( 'post_format_box' ,__( 'Post Format Content', self::LANG ) ,@$this-&gt;render() ,'post' ,'advanced' ,'high' ); </code> Should be <code> add_meta_box( 'post_format_box' ,__( 'Post Format Content', self::LANG ) ,array($this, 'render) ,'post' ,'advanced' ,'h...
meta box & callback function
wordpress
I'm trying sort through the morass that is WP documentation, and just need someone to clear up the use of the term "The Loop" and how it relates to subloops. My understanding of "The Loop" is that there is, and should only ever be, ONE "The Loop" per page/post - and that The Loop is responsible for iterating through th...
First see stackexchange-url ("When should you use WP_Query vs query_posts() vs get_posts()?") My understanding of "The Loop" is that there is, and should only ever be, ONE "The Loop" per page/post - and that The Loop is responsible for iterating through that page/post/archive's content. Yes, it's commonly referred to a...
Sub-loop / nested loops Best Practices
wordpress
On the Reading Settings page you can set a "Front Page" and a "Posts Page". You can check whether the current page <code> is_front_page(); </code> Is there a similar function for the "Posts Page". I have noticed that <code> is_page(); </code> does not work for this special page. Thanks
<code> is_home() </code> checks for the "Posts Page", despite the somewhat confusing function name.
Determine if page is the Posts Page
wordpress
In my plugin I'm able to set a cron event like so: <code> wp_schedule_event(time(), 'daily', 'myhookname'); </code> But want I want to do is be able to find out what recurrence I have set for <code> myhookname </code> . The reason why is that I'm offering a setting to allow the recurrence to be changed. What I need to ...
I think I've found it: <code> wp_get_schedule('myhookname') </code> Edit: yes this works as I want it.
WordPress Cron how to find out my event recurrence?
wordpress
OK, it's more a philosophic question that a programming question, but at the end it will have a huge impact on code... I have 5 main product, a,b,c,d,e those 5 products have options those products can belong to multiple category So the end, i should show the product a, with below, option of product a witch is a1, a2, a...
I'm pretty sure i missunderstood you... Approach: Categories & Terms (built in taxonomies) You have got categories (hierarchical built in taxonomy) &amp; terms (non-hierarchical built in taxonomy). You can also assign terms to categories. So i'd say, you can take the following approach using the built in taxonomies: sh...
Structure with category setting
wordpress
I moved from Wordpress.com to my own Wordpress.org hosting. I had no problems importing all my posts over, and the images were all linked up fine. Since the import, I decided to move my WP install from the root of HTML_public, to a new folder called Wordpress. The posts are all still fine, but the picture links are sti...
Search RegEx is a good plugin to be able to search and replace with Grep through all posts and pages to fix things like broken URLs. And no need to export the DB and use a text editor; that's overkill for simply adding the /wordpress.
Moved WP into new folder. How to fix image links in posts?
wordpress
I want to setup a user account that only has access to moderate comments - for all posts - but doesn't have access to edit any posts. When I give the user the moderate comments privilege (using an old role manager plugin), it doesn't let them moderate comments on other articles. Is there a plugin that does this, or som...
Probably not the answer you want to hear, but I'm afraid that is not possible as a user needs the edit_posts Capability in order to access the moderate_comments capability. (source: http://codex.wordpress.org/Roles_and_Capabilities#moderate_comments )
How Do I Allow Comment Moderation for Other User's Posts?
wordpress
I am using <code> body_class(); </code> to style different sections of a wordpress site by their body class. Page styles descend from <code> .page-template </code> , blog styles descend from <code> .single-post </code> and/or <code> .blog </code> etc. I have created a custom post type "Products" for the products sectio...
You can use <code> body_class </code> filter to check if you are on your custom post type, and if so then just remove the <code> blog </code> class like this: <code> function remove_blog_from_cpt_classes($classes, $class){ global $post; if ($post-&gt;post_type != "products"){ return $classes; }else{ foreach($classes as...
Custom post type and body_class: Remove "blog" class
wordpress
hey guys, I'm using the sitewide tags Multisite plugin on my wordpress setup. I'm collecting all blogposts of multiple subblogs on my mainblog. Any idea how I could manage to exclude a certain category from this collection? e.g. If a user is writing a blogpost on a subblog and is adding it to the category "private" the...
You may want to encourage users to instead use the 'Post Visibility' option in the main publishing actions box on the post edit screen. Rather than filing private posts in a category, the user can simply set a post to private. Unless by 'private' you mean private to their individual blog but still public...
wordpress multisite... collect all posts on main blog - exclude category?
wordpress
What are the laws concerning developing WordPress sites using other developers' plugins and then selling the sites?
Please read through the following: http://codex.wordpress.org/License http://wordpress.org/about/license/ http://en.wikipedia.org/wiki/GPL http://www.gnu.org/licenses/gpl.html You can't can sell it as software or development, although and/or you can also charge for maintanance and install. Anyway, you should at least d...
Selling WordPress sites?
wordpress
How does one reduce the number of stored revision (e.g. 5 max) for post types that support revisions?
add to your wp-config.php file the following line: <code> // set max post revisions define('WP_POST_REVISIONS', 5); </code> source: http://codex.wordpress.org/Editing_wp-config.php#Post_Revisions
How does one reduce the number of stored revisions?
wordpress
has_post_thumbnail seems to be working fine but the_post_thumbnail returns nothing. here is my code: <code> if ($favorite_post_ids): foreach ($favorite_post_ids as $post_id) { $p = get_post($post_id); echo "&lt;li&gt;"; echo "&lt;a href='".get_permalink($post_id)."' title='". $p-&gt;post_title ."'&gt;" . $p-&gt;post_ti...
You're passing an invalid argument to the_post_thumbnail() . Here's your code: <code> the_post_thumbnail($post_id); </code> Here's what <code> the_post_thumbnail() </code> expects: <code> the_post_thumbnail( $size, $attr ); </code> The function is expecting a <code> $size </code> as the first argument. Since <code> $po...
the_post_thumbnail() returns nothing even though has_post_thumbnail() returns true
wordpress
I wanted to link images in a gallery to a custom URL. I know I could add an extra field and do it stackexchange-url ("this way") I found this ticket on Trac, though, that modifies the "Link URL" field to accept custom links. I like how that works and I'd like to make that work. Trouble is, I can't seem to figure out ho...
On the Trac ticket you've linked at the bottom there is a solution to make it work <code> function _save_attachment_url($post, $attachment) { if ( isset($attachment['url']) ) update_post_meta( $post['ID'], '_wp_attachment_url', esc_url_raw($attachment['url']) ); return $post; } add_filter('attachment_fields_to_save', '...
Retrieving a custom link on an attachment
wordpress
Is there any way to import a basic, exported Wordpress content XML file and have it replace the existing content? What I'm trying to do is synch up two instances of a site (development and staging servers) and all I want to replace is the Page content. When I try to import the XML document it simply states that all the...
One option might be to export both XML files, merge them using a file merging tool like http://winmerge.org , delete all posts and replace with the merged version.
Import and replace existing page/post content
wordpress
I had this problem on 2 web sites (different versions of WP, different web hosts, different plugins), once in a while some images are disappearing from media library. Is it plugin-related issue, database, web host?
"Disappearing" means very little unless you can say the image file really disappeared from the server or if it's just a broken link you're seeing in page source or a bad link in the DB. Little help can be offered unless you look in logs and see errors, ask your host about problems and nail down the similarities and dif...
Why images are disappearing on WordPress web site?
wordpress
Is there an explicit action hook that will fire when (or just before) the admin Edit page renders for a custom post type? Something similar to {$new_status}_{$post-> post_type}? I'm trying to find the least obtrusive place to insert my add_meta_box() registration so that it's not calling that function on every page ref...
<code> register_post_type() </code> has a registration option called <code> 'register_meta_box_cb' </code> . Set that to a valid callback and it will call that function only when it is compiling the meta boxes for that post type's edit screen. Something like this: <code> register_post_type( 'foo', array( 'public' =&gt;...
Action hook on Edit custom post type?
wordpress
Problem After realizing that post formats are pretty popular, but only a extremly rough drawn concept, i see that users will run into possible traps. Post format ... uses post meta fields &amp; user doesn't remember exact meta key name. takes the link/embed/whatever object from post editor &amp; user inputs wrong data....
I did something like this once, but when you clicked on a certain category (essentially the same) It certainly isn't a true ajax solution, it just hides and reveals the div with the settings, but It is a solution which works. You'll definitely have to modify this for your needs, but if you have a grasp on jQuery, I'm s...
post formats - how to switch meta boxes when changing format?
wordpress
I am looking for a way to return something like the following: User, email, post title, post status User, email, post title, post status repeated.... Each user on my site has only 1 post. It is a custom post type called Company Listing.
You can do that with a simple loop assuming that the users are also the authors of the post, create a template page, and copy the inside of your page.php to it. then replace the loop part with this code: <code> &lt;?php $args = array( 'post_type' =&gt; 'company-listing', //change this to your actual CPT name 'posts_per...
How can I list all WordPress users, their email adress, post title and post status?
wordpress
I have installed the wp-nivo-slider and am now getting a list of these errors on my /wp-admin/ page. The error is: <code> Warning: Cannot modify header information - headers already sent by (output started at /html/wp-content/plugins/wp-nivo-slider/wp-nivo-slider.php:633) in /html/wp-login.php on line 354 </code> Any i...
This error is typically from there being extra spaces after the final closing ?> tag in a plugin file, or possibly even your wp-config.php file.
WP-nivo-slider Producing Error "Cannot modify header information - headers already sent by ..."
wordpress
I apologize if this is a very basic question, but I am very new to working with Wordpress. I'm looking into using Wordpress as a CMS for a new site I'm building but I'm not sure I understand some of the best practices for themes. I've heard that a good approach is to use pre-existing themes and modify them to your own ...
If you don't want to develop/maintain your own Theme, then yes: choose an existing Theme, and make modifications to it via Child Theme. If, on the other hand, you are comfortable with developing/maintaining your own Theme, then either create a new Theme, or make a derivative of an existing Theme. Since, as you state, y...
Themes—Child Themes
wordpress
I have a hierarchical taxonomy called 'geographical locations'. It contains continents on a first level, and then the countries for each one. Example : <code> Europe - Ireland - Spain - Sweden Asia - Laos - Thailand - Vietnam </code> etc. Using get_terms() I managed to output the full list of terms, but the continents ...
Use <code> wp_list_categories </code> with the taxonomy argument, it's built for creating hierarchal category lists but will also support using a custom taxonomy.. Codex Example: Display terms in a custom taxonomy If the list comes back looking flat it's possible you just need a little CSS to add padding to the lists, ...
How to show a hierarchical terms list?
wordpress
I got a pretty basic theme and just found out my style.css file doesn't get loaded into the <code> &lt;head&gt; </code> . I already searched around but can't find out, why it's not loading. I inspected the <code> global $wp_styles </code> object already but couldn't find anything: <code> function style_test() { $wp_sty...
Theme stylesheets aren't usually enqueued, they're normally loaded using.. <code> &lt;link rel="stylesheet" type="text/css" media="all" href="&lt;?php bloginfo( 'stylesheet_url' ); ?&gt;" /&gt; </code> So naturally you don't see them(it) in the styles array.. You can of course(if you prefer) use an enqueue instead.
Why is style.css not being enqueued?
wordpress
Most of us are used to installing plugins directly from the WordPress.org plugin repository. This is the "official" list of available add-ins, and everything hosted there is guaranteed to be GPL. But occasionally developers will list beta releases and non-GPL plugins on their own sites. To install these, you have to do...
Also look into this tool - http://markjaquith.wordpress.com/2010/07/24/plugin-installer-tool/
What would be the advantages/disadvantages of remote plugin installation?
wordpress
I've just updated a website that used <code> .php </code> urls, to a Wordpress 3.1 site, that uses no file type extentions, (custom permalinks). They have a lot of references in their imported content to an old page ending in <code> .php </code> which now goes to an error 404 page. My question is this: What is the rewr...
Your first order of business should be updating the links in your imported content so that people aren't given links to the old URLs in the first place. This should be pretty easy to do with an SQL replace. For your situation, it'd be something along the lines of: <code> UPDATE wp_posts SET post_content = REPLACE(post_...
Url rewrite with htaccess
wordpress
I have a couple of pages on my WordPress site that need to run over SSL. I've installed the WordPress HTTPS plugin and configured the pages to use SSL. However, I'm still getting the error message that some of the items are coming over unsecured and that is a concern for some users. I've looked into the generated sourc...
Do exactly what you're doing: view the source of the offending page, and do a text search for "http://". Anything with this protocol is "insecure", and needs to be swapped to https. Common offenders are stylesheets, javascript, and 3rd-party widgets. If you can't find any problems in the source, try using firebug's "ne...
How do I find non-SSL problems on my SSL page?
wordpress
I was considering a plugin that inserts itself as a widget in one's sidebar. Trouble is, I don't know what to expect for the minimum width in one's sidebar. Is there a standard?
As far as i am aware there is "no" standard each sidebar is defined by the theme itself i would create the elements so that they stretch and wrap in your div and use %'s in your css for associated sizes.
Minimum Widget Width for Plugin Development
wordpress
Basically, I thinking how i could get a mini wp-admin/edit.php view inside the wp-admin/post.php page. does this even make sense to anyone?
Try the CMS Tree Page View plugin (my favorite) or the Easily navigate pages on dashboard plugin. Both allow you to have a list of your pages on the Dashboard. Then you should be able to add that panel using this reference: add_meta_box to integrate the box that appears on the Dashboard (see wp_add_dashboard_widget in ...
display list of posts/pages in admin edit post/page
wordpress
I currently have the following plugins activated in my wordpress installation: row 1: Outbrain row 2: Subscribe via feedburner RSS/email row 3: Topsy tweet widget, FB like widget, WP-Email a friend widget I want to change the order in which they appear. I want widgets in row 3 to appear first, outbrain widget to appear...
From your comment it looks like you almost got it, Plugins that add something under your content usually <code> use the_content </code> filter by calling a function using <code> add_filter </code> for example outbarin plugin calls it like this: <code> add_filter('the_content', 'outbrain_display'); </code> so the way yo...
Is there a way to alter the order in which the plugins appear in the page?
wordpress
I am working with the Role and Capabilities API for the first time today and making use of the the excellent Members plugin . Having tinkered around for some time I notice that the "edit pages" capability does two things: Allow the user to create a new page Allow the user to edit existing pages I am trying to split thi...
Yes, this is indeed a problem. A dedicated 'create_posts' capability is planed: http://core.trac.wordpress.org/ticket/16714
User capability of create page/new page
wordpress
I have used Jeff Star's tutorial for creating my own custom login form http://digwp.com/2010/12/login-register-password-code/ . It works great, but I have one problem. On the reset password form, if someone enters their username incorrectly (so that it doesn't verify), they get kicked to the default wp-login.php?action...
The code he posted in that tutorial (very nice BTW) post's the form to the build-in "reset password" module which redirects to the login.php on error, but you can change that and build your own based on the original and add it to the template page, change: <code> &lt;form method="post" action="&lt;?php echo site_url('w...
Check for correct username on custom login form
wordpress
I have a question I hope you can help me with. I have a custom taxonomy called locations and on the first level I have the areas (Asia, Europe, etc) and under each area I have countries (England, South Africa). What I would like to do it display a dropdown menu of all the children of that particular parent similar to w...
You can use <code> get_query_var( 'term' ) </code> to get the current term and <code> get_query_var( 'taxonomy' ) to get the current taxonomy, then all that is left is to use [wp_dropdown_categories()][1] function with </code> child_of <code> parameter and </code> taxonomy` parameter, so something like this: <code> //f...
Displaying Custom Taxonomy Children in Dropdown
wordpress
I'm working on a real-estate site where I need to create a profile for each agent , the initial view when you click on view agents would be to list them alphabetically, ideally from a dropdown you could select a region to view all the agents from that region , or chose a language to view all the agents who speak a give...
That Sounds about right, I'm just about to finish similar project with the same base (post type, taxonomies) structure, so here are a few notes to get you going: To enable your "view agents" make sure when you register agents post type that you set has_archive to true or use string as archive slug which will make your ...
custom post type or taxonomy
wordpress
Alright so I've got two navigation menus that I've registered with my theme: <code> &lt;?php if ( function_exists('register_sidebar') ) register_sidebar(); add_theme_support( 'menus' ); if ( function_exists('register_nav_menu') ) { register_nav_menu( 'primary_nav', 'Primary Navigation'); register_nav_menu( 'secondary_n...
Try <code> theme_location </code> instead of <code> menu </code> in arguments. Too late here to look up specifics, but I remember documentation/code being absolutely confusing about that.
Two Navigation Menus in Themes Produce the same menus?
wordpress
IS it possible to make every Widget on Wordpress in a different .php file? I have one page that contains 12 elements, I want to make each of them a Widget so it would be easier to manage/edit them later on, but it would be better if it's from a php page rather then from a code block on the Admin panel.
If the 12 elements are static HTML, you can just create 12 text widgets. If they're not, it depends on what you mean by "easy to manage". I, for one, prefer to be able to easily manage my code via SVN. Using widgets obscures that. If you just want them to be in separate files, just make separate files, put them in thei...
Widgets in PHP files?
wordpress
I'm trying to get VideoJS plugin to work in a Widget. I tried to add a PHP widget and write, as it said in the manual: <code> [video mp4="http://video-js.zencoder.com/oceans-clip.mp4"] </code> But it just shows the code as is, any ideas?
To display shortcodes in widgets , use a regular text widget, and add this line to your theme's functions.php file: <code> // Use shortcodes in text widgets. add_filter('widget_text', 'do_shortcode'); </code> This tells WordPress to render the shortcodes in widgets. and if you want to call your shortcode by php you can...
VideoJS in a Widget?
wordpress
I'm creating my first wordpress plugin and I'm struggling to find the correct and best way to make sure jquery and my own JS file is included on my settings page of my plugin. I do not need them to load anywhere else unless on my settings page. What code and where do I put it in my plugin? This is what I have so far as...
First use <code> add_options_page() </code> - shorter wrapper, better practice. Second you need to save its return in some (global or static) variable. That is often used thingie and confusingly referenced by different names in documentation. Global <code> $hook_suffix </code> holds such value for current page. <code> ...
Plugin - Make sure jquery is loaded in my settings page plus my JS file
wordpress
I have moved a Wordpress install to a client from sub folder to the root folder. Right now, everything works fine, except for the friendly URLs. I currently have to set the Permalink feature in "Common settings" to "Default", which means URLs with ?p=434... At least they work. Otherewise I get a very short 404 not foun...
Yahoo doesn't allow users access to the htaccess file which means that you can't the mod_rewrite rules needed for custom permlinks. The Only way around it that i've heard it works (never tried it myself) is to add /index.php/ to the beginning of your custom structure so: Go to Permalink Settings > Select Custom Structu...
WordPress permalinks Yahoo hosting(no .htaccess allowed)
wordpress
This is a page that list posts witht he category <code> Content (CDs) </code> : <code> &lt;div id="tagline"&gt; &lt;div class="container"&gt; &lt;?php // Run main loop (The Loop). ?&gt; &lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&gt; &lt;div class="content0"&gt; &lt;?php the_content(); // &lt;- ...
I think you need to do two things add ' echo ' to last line &lt;?php echo $parent-> post_content; ?> add ' global $post; ', before accessing the $post. let me know if this does not work.
Can't get the_content of the parent page from its single post?
wordpress
I'm using a loop in the sidebar of my site to show all the posts that are in that category. Now I'd like to include a 'current_post' class to the current post that is being displayed to style that item in the list. I've tried looking for conditional tags or this custom stackexchange-url ("wp_list_post_types function") ...
You should be able to get the queried object id and use that for comparison inside your custom loop.. Before your existing loop code(what you have posted above), but obviously after the opening PHP tag.. <code> global $wp_query; $current_id = $wp_query-&gt;get_queried_object_id(); </code> Then somewhere inside your cus...
Adding 'current_post_item' class to current post in the loop
wordpress
This simple tutorial teaches you how to make a voting counter using the post's meta data. I would like to know how to add down-votes to this small script (e.g. -1, -2). In the following way: If the post has 0 votes and it gets down-voted, it ends up with -1. If the post has 1 vote and it is down-voted it ends up with 0...
You will have to make a second button for down voting. Give the upvote button a class of up and the down vote button a class of down. jQuery <code> &lt;?php wp_enqueue_script( 'jquery' ) ?&gt; &lt;?php wp_head(); ?&gt; &lt;script type="text/javascript"&gt; jQuery(document).ready(function() { jQuery(".vote a.up").click(...
How to enable users to down-vote in this simple voting counter (that uses the post meta)?
wordpress
As stated in a previous Q, i'm currently getting into post formats and what to do with them. After searching for quite a time through search results and a lot of blog posts, i realized that there's only pretty less written about What to do with the different post format types? Post Formats i'm unclear about what they r...
I think you have this a bit backward: 1) asides - "twitter" style messages 2) status - "facebook" style messages Think of status as a Tweet or Facebook status update: a text-only or text-and-link-only post of around 150 characters or less (140 seems to be a good number, thanks to Twitter). Think of an aside as a brief ...
post formats - where's the difference: "aside" vs. "status"?
wordpress
I would like to be able to associate an image with a custom taxonomy term. Ideally, I'd like to provide the end-user with an interface for managing the image directly on the term itself. I have worked with a plugin that provides this functionality (Ultimate Taxonomy Manager) - it may be what I stick with. I'm after the...
Maybe <code> How TO custom taxonomies extra fields </code> is whats you are looking for?
Adding An Image To A Custom Taxonomy Term
wordpress
The following post formats got a specific type of content part that should get displayed: Audio Video Link Questions: A) What is the exact content (element) that is meant to get displayed for video &amp; audio? B) How would you get the relevant part of the post content that represents the post format? C) What would you...
There is no convention or consensus on any of these questions. In my own Theme, Oenology, I use the standard template tag <code> the_content() </code> to get the content for almost every Post Format type. The exception is Images and Galleries, where I pull the image out separately, and use <code> the_excerpt() </code> ...
post formats - how to get the relevant content part?
wordpress
When trying to update wordpress from 3.1 to 3.1.1 I am getting the error <code> Incompatible Archive.: PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature </code> Some searching shows a cause of this can be that the servers disk is full. My disk is not full but it was about a week ago. I be...
Sounds like the upgrade download corrupted (probably because of disk space) - just do the upgrade manually.
disk was full but wordpress still having issues
wordpress
OK I'm looking for the best way to attack this. I'm very comfortable with PHP and making custom post types with custom meta fields in WordPress. Here is what I'm looking at doing: User registers and is set at subscriber by default. User requests from admin to have permission to custom post type. Admin assigns user to a...
Use Justin Tadlock's plugin "Members". It gives you the ability to create new roles and edit existing roles, as well as add custom capabilities. All that work that you'd have to do can be taken down to a few clicks. I know you said in your comment on ZaMoose's answer that you are 'looking to write the functionality mys...
Allow member to have access to custom post type only. Permission to only edit their own posts
wordpress
I'm trying to implement pagination on a category page. The pagination is working, but now for some reason the pagination plugin I'm using is noting one extra page of results, when that page is actually empty. I'm pretty sure it doesn't have anything to do with the pagination plugin because I've seen reports of people h...
I am not sure, but I have a guess that it is because you are using pagination and <code> offset </code> at the same time. Pagination might be calculated for whole set, but you are reducing set size with offset so number of pages becomes overestimated.
Pagination gives extra page with no results
wordpress
I am looking for a way to remove theme, change theme button and WP version from the "right now" admin dashboard, but using only functions. Any help?
Ah, one of those things that seem easy until admin dashboard internals throw you into depths of despair. :) Basically there is no easy and intended way to do this, so need to get creative. My idea would be to override temporarily couple of capabilities that control parts of output and kill the rest with filters in tran...
Remove theme, change theme button and WP version on "Right Now" admin dashboard?
wordpress