question
stringlengths
0
34.8k
answer
stringlengths
0
28.3k
title
stringlengths
7
150
forum_tag
stringclasses
12 values
When I try to upload an image to a post, I get an error: "The uploaded file could not be moved to /home/httpd/xxxx/xxxx/xxx/wp/wp-content/uploads." My server is set up in safe_mode - is that the problem? What can I do about it?
It has nothing to do with safe_mode try this: login to your ftp make your wp-content folder 755 inside wp-content create a new folder called "uploads", make it 777 (755 should also work) inside the control admin panel, go to settings> miscellaneous and on the first line enter "wp-content/uploads" as where your uploads ...
File Upload with Server in safe_mode
wordpress
this is what im doing... In BuddyPress, before delete user account, if a user has attachments previously uploaded, he or she will be redirected to their own attachments list: <code> function custom_get_count_before_delete() { global $bp, $wpdb; $user_id = $bp-&gt;loggedin_user-&gt;id; return $wpdb-&gt;get_var( $wpdb-&g...
I got it: <code> function custom_get_count_before_delete() { global $bp, $wpdb; $user_id = $bp-&gt;loggedin_user-&gt;id; return $wpdb-&gt;get_var( $wpdb-&gt;prepare( " SELECT COUNT(DISTINCT p.ID) FROM $wpdb-&gt;posts p WHERE p.post_author = %d AND p.post_status = 'inherit' AND p.post_type = 'attachment'", $user_id ) );...
Delete user account - If user has attachments uploaded then redirect (with a message)
wordpress
I'm querying a custom taxonomy for a post, hoping to get a list of all terms for that post and taxonomy. <code> get_the_terms($post_id, $taxonomy) </code> works, but gives this ungodly array of term objects that will require an extra layer of parsing before I can run the following code: <code> if (in_array($list_of_ter...
Well, I had seen it and was thrown off by the first argument, but it does exactly what is needed. From wp-includes/taxonomy.php: <code> function wp_get_object_terms($object_ids, $taxonomies, $args = array()) </code> And to use it as I wished, giving me a flat list of matching IDs, push 'fields'=> 'ids' into $args, like...
WordPress built-in method to extract array of term IDs?
wordpress
Case: I got a set of classes that build form fields based on data from an input array. The class can build the following types of form fields: input (basic, hidden, password) textarea radio checkbox select colorpicker datepicker file upload EDIT: The class uses <code> wp_register_script/_style </code> &amp; <code> wp_e...
Your problem is adding the scripts, styles inside the class, and because the class instance is created when the hook <code> add_meta_box </code> is fired, at that time the <code> wp_enqueue_script/style </code> are already finished. A solution for you is adding the scripts, styles outside the function and the class. An...
Loading scripts & styles from a meta box callback function
wordpress
I want to simply create a link to a page that I know the title (or ID), but I want to make sure it works on any Wordpress install. What is the best way to do this?
You probably want to use get_permalink and get_the_title. Example: <code> &lt;a href="&lt;?php echo get_permalink( YOUR POST ID ); ?&gt;"&gt;&lt;?php echo get_the_title( YOUR POST ID ); ?&gt;&lt;/a&gt; </code> Replace YOUR POST ID with the ID of the post you'd like to link to. Post ID's will change from install to inst...
Link to Particular Page Within Template PHP Code
wordpress
I have 2 custom post types that use some of the same taxonomies. I would like to be able to show all entries in the taxonomy ( no problem here) and then just each of the post types. But I would like to do it without creating a mess of custom pages using a template. Can I set up a function to change the post_type query_...
You can use <code> pre_get_posts </code> filter hook to set the post type passed by the user: paste this code in your theme's functions.php file: <code> function user_set_type( $query ) { //only on your taxonomy page if ( $query-&gt;is_tax('YOUR_CUSTOM_TAXONOMY') ) { //and only if the guesst has selected a type if (iss...
Can I set the post_type query_var as a link is clicked?
wordpress
Is there any way to create internal anchors without using the HTML rendering option? I don't mind but I guess my customer will ;) Thanks!
In the "tinyMCE Advanced" plugin has a special icon for that. The default WordPress installation don't offer the anchor icon/attribute editor.
Create anchor from Wysiwyg editor
wordpress
am running the CFT plugin version 1.9.2 on a 3.1.3 wordpress site and in the admin i did set up 30 input file fields related to a custom post type. It all works fine until the 21st field (and beyond) that does not save any file (small picture) that is selected. I did a local test on wamp, and it all works fine, all the...
Update, just got the problem back and found a 'real solution, to update the php.ini file at the root of the site with this: <code> max_file_uploads = 100 </code>
[Custom field template plugin] Upload limited to 20 inputs file
wordpress
I'm using this bit of code to generate a page full of items but they won't sort into the menu order, any ideas as to why? <code> &lt;?php $pages = get_pages(array('child_of', 'menu_order')); ?&gt; </code>
It should look sth like this <code> &lt;?php $pages = get_pages( array('sort_column' =&gt; 'menu_order') ); ?&gt; </code>
Sort "get_pages" by menu order not ordering
wordpress
I'm currently creating a bunch of (empty) pages and performing conditionals such as is_page('Blabla') on it, which increases my page.php significantly. I'm already using require_once for different content, but is there a cleaner way of doing this?
Wordpress has a function for including template parts, which you can use for that purpose : get_template_part You can also use <code> include(TEMPLATEPATH . '/includes/myfunction.php'); </code>
What's the best way to include php code in to pages?
wordpress
I have created a custom post type in a plugin for a site I'm working on. I'm allowing users assigned a custom role to add/edit/delete the custom post type. I would like to give these users as little functionality as possible in the admin beyond posting. So I've used <code> remove_meta_box </code> to remove a few panels...
Here's what I ended up with. For limited access users, I set comments on when the post guid is empty. Otherwise, I completely remove the comment_status field for those users. That defaults new posts to comments enabled, prevents limited access user edits from switching them off, while allowing admins to override the se...
Enable comments for post with comments meta box removed
wordpress
I'm creating a form in a blog for users to register their emails so I can send a newsletter later but I don't want to use any newsletter plugin for that. I'd like to save the emails and than export them to something else like excel or a cvs file. Is there any plugin or any other solution to do that?
You have some options: the cformsII plugin, with tracking enabled the Contact Form 7 , plus the Contact Form 7 to Database Extension other may be suitable as well!
Saving data to database and exporting to excel
wordpress
My group does not have command line access to the machine that is running our WordPress instance. However, we would still like to install/update using Subversion. Is this possible? Also, does Subversion need to be on the same machine?
You would need to have subversion installed on the same machine and command line access to the machine.
Do you have to have command line access to use Subversion with Wordpress?
wordpress
I am using year/month/post-name permalinks, and also using the download-monitor plugin to handle file downloads. I added rewrite rules to the top of the .htaccess file following the instructions at perishable press . I just did this same thing at another blog and it worked just fine. The only differences are that blog ...
Try this. This format works for me. You don't have to keep repeating IfModule, RewriteEngine, RewriteBase. <code> # BEGIN WordPress &lt;IfModule mod_rewrite.c&gt; RewriteEngine On RewriteBase /blog/ RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC] RewriteRule ^feed/?.*$ http://feeds.feedburner.com/mys...
Issue with using .htaccess to redirect feedburner feed
wordpress
I'm surprised by the fact that my function that I've tacked onto the <code> save_post </code> action fires when I click the "New Post" link in the Admin Dashboard. Note - this is before I've pressed Save or Update , and it fires immediately, not after an elapsed time or auto-update. On the other hand, when I then type ...
When you click 'New Post', you're simply loading the page <code> wp-admin/post-new.php </code> . In doing so, WordPress will always create a new post (an 'Auto Draft') to ensure all other features (such as media uploads) and plugins work as normal, even before you actually save a draft or publish the post. And this, in...
Why does save_post action fire when creating a new post?
wordpress
I'd like to display captions with my featured images. This is another feature that should be available by default but for some reason is not. There are a few routines out there that claim to accomplish the task, but they come up blank for me. Is there any reliable way to display a caption with a featured image?
To use this you will need to add this to in place of your themes thumbnail function: <code> function your_thumbnail_caption($html, $post_id, $post_thumbnail_id, $size, $attr) { $attachment =&amp; get_post($post_thumbnail_id); if ($attachment-&gt;post_excerpt || $attachment-&gt;post_content) { $html .= '&lt;p class="thu...
Displaying caption with featured image
wordpress
What is the best way to store post meta in an array (using a custom write box, know how to do that) so that all post meta is in a single custom field?
From codex: $meta_value (mixed) (required) The value of the custom field you will add. An array will be serialized into a string. Default: None So <code> &lt;?php add_post_meta(7, 'fruit', 'banana', 'apple', 'tornado', 'bob saget') </code> To grab them you can also use http://codex.wordpress.org/Function_Reference/get_...
How to store post meta in an array?
wordpress
WordPress auto corrects the permalinks(URLs) even if it is entered incorrectly. For e.g. WordPress will land you in <code> example.com/some-post </code> even if you enter <code> example.com/idontexist/some-post </code> or even <code> example.com/some </code> It could be that, WordPress uses RegEx like or some matching ...
The redirect_canonical function in /wp-includes/canonical.php is called on any given URL and will attempt to best-guess the URL the user wanted, and redirect them to there, when a URL does not exist. It has a whole huge amount of code to do this for all sorts of common errors.
How does WordPress handle permalinks?
wordpress
I want to grab all posts from an author under category X. Right now, I am using 4 separate loops to do this for 4 different categories. Is there a better way to do this? <code> query_posts </code>
Have a look at the category parameters of WP_Query
Instead of 4 loops, how can I do it better?
wordpress
I've created a custom taxonomy and I want to add it as an option for custom menus (under Appearance > Menus). How do I get it to show up there (see the illustration, I want it to show up where the red square is).
Your custom taxonomy should show up as an option for custom menus, if you have <code> 'show_in_nav_menus' =&gt; true </code> as a parameter when you register your post type with <code> register_post_type() </code> . You can check all the available parameters in the codex entry http://codex.wordpress.org/Function_Refere...
How do I add a custom taxonomy as an option for menus under "Appearance" > "Menus"
wordpress
Im wanting to show a profile/logo pic on author.php via a simple shortcode: <code> function wpaluploader_showauthorimage() { $wpaluploader_authorlogo = '&lt;img src="' . get_bloginfo('url'). '/wp-content/uploads/wpal_logos/'.$curauth-&gt;ID.''.get_option(wpal_mime) .'"/&gt;'; return $wpaluploader_authorlogo; } </code> ...
<code> /wp-admin/user-edit.php </code> starting on line 99. Just check the hooks and filters there and how <code> $profileuser </code> get's called. (Pay attention on the switch.) :)
Getting $curauth-> ID to work inside a shortcode
wordpress
I'm creating a plugin that uses jQuery to modify some css, but what I can't figure out is how you can control the execution of the jQuery with WordPress plugin options (like checkboxes true/false). Can WordPress options be used as "variables" in jQuery? Or would every case require a unique .js file?
Variable can be passed to jQuery or any javascript using <code> wp_localize_script </code> . Example: <code> add_action( 'template_redirect', 'prefix_enqueue_vars' ); function prefix_enqueue_vars() { $script_vars = array( 'setting_1' =&gt; get_option( 'some_option' ), 'setting_2' =&gt; get_option( 'another_option' ), )...
WordPress plugin options and jQuery
wordpress
I like to display only 20 lines of post with the read more link using <code> the_content( __( 'Continue reading &lt;span class="meta-nav"&gt;&amp;rarr;&lt;/span&gt;' ) ); </code> But it shows full content . How can i strip it .please help me !
You need to add a more quicktag to your content See here: http://codex.wordpress.org/Customizing_the_Read_More
display 20 lines only with the_content
wordpress
Wordpress has wp_oembed_get , which I use to get rich media content with embed.ly . I've previously used oEmbed api calls such as this . As you can see it provides thumbnail_url, which I like to use instead of embedding the video. How can I do this with wordpress? Thanks!
Use the oembed_dataparse filter to modify the resulting HTML output by any given oembed call. Example: <code> add_filter('oembed_dataparse','test',10,3); function test($return, $data, $url) { if ($data-&gt;provider_name == 'YouTube') { return "&lt;img src='{$data-&gt;thumbnail_url}'&gt;"; } else return $return; } </cod...
oEmbed, thumbnails and wordpress
wordpress
After spending most of the day looking for solutions and trying them out, I decided to explain my problem here. I am aware that this subject has been covered and as you will see I am using code that has been suggested here and over at ottopress, but I still cannot figure it out. I have a custom post type called 'review...
Firstly, your tax query is a little jumbled. The first nested array should actually be at the 'root' of your <code> query_posts() </code> argument, with <code> tax_query </code> as a key among them; <code> array( 'post_type' =&gt; 'review', 'post_status' =&gt; 'publish', 'posts_per_page' =&gt; 10, 'tax_query' =&gt; arr...
show 10 most recent custom post types excluding the one(s) from specific custom taxonomy
wordpress
I have a custom taxonomy template page in my theme. Essentially, when someone clicks on a term link into this taxonomy, I -ALWAYS- want to add a specific post-type to the query. I'm not entirely sure how to do this, I've found some functions that are included in PHP 5.3 that seem like they might do it, but I have 5.2 i...
You can use <code> pre_get_posts </code> filter hook to check if you are on the taxonomy page and if so just add your custom post type to the query something like this: <code> function add_my_type( $query ) { if ( $query-&gt;is_tax('YOUR_TAXONOMY') ) { $query-&gt;set( 'post_type', array('post','YOUR_CUSTOM_POST') ); } ...
On Taxonomy Template page, want to add Post_Type
wordpress
In the functions.php, I have the following code added: <code> add_post_type_support( 'page', 'excerpt' ); </code> This allows pages to have excerpts. The reason I want an excerpt is because I want to call only pages with excerpts to be one of 3 modules on the home page. On the front page, in my home.php file, these 3 m...
Initially, Wyck told me to study the WP_Query article on WordPress's site . This was very overwhelming to try and pick up, and I searched the web for articles that might give me a quicker answer, but I couldn't find anything that was relevant. This is similar but different than Wyck's answer, but I only figured it out ...
I want Page titles and excerpts to show up on home.php in certain order
wordpress
I've added a role of "Customer" and I am working on customizing the Users Screen for that role. What I'd like to do is customize columns based on that particular role. Note: For example, take a look at the screenshot. How would I remove the reference to the posts column for only the customer role?
Thanks to Mike23 for the tip. Here's the code that I'm using to add a column to only the "customer" role: <code> if( $_GET['role'] == "customer" ) { add_filter('manage_users_columns', 'add_ecommerce_column'); add_filter('manage_users_custom_column', 'manage_ecommerce_column', 10, 3); function add_ecommerce_column($colu...
Customize Admin Users Screen based on Role
wordpress
Here's the code for a custom metabox. Very simply, how would I resize the textarea box? I'd like to add an expression such as cols="50" rows="5". <code> // Echo out the field echo '&lt;p&gt;Enter the location:&lt;/p&gt;'; echo '&lt;div class="customEditor"&gt;&lt;input type="textarea" name="_location" value="' . $locat...
You could try styling it with CSS by adding an ID or a class to the textarea and inserting styles into the wp_admin head. Or, a quick way would be to do somehting like this : <code> echo '&lt;textarea name="_dresscode" class="widefat" style="width:400px!important;height:80px!important;" &gt;' . $dresscode . '&lt;/texta...
Sizing textarea field in custom metabox
wordpress
I am using <code> archive-{post_type}.php </code> for queries of a custom post type. I want the system to use <code> archive.php </code> for category searches but it is defaulting to <code> category.php </code> which I am using for category searches (different categories) for regular posts. Does anyone have an idea of ...
I am not sure what you mean by category searches ? In <code> is_category() </code> branch of template hierarchy <code> category.php </code> precedes <code> archive.php </code> , it is intended and wanted behavior. If you want to change template behavior for specific category you will need to override that logic, likely...
archive-{post_type}.php is defaulting to category.php vs. archive.php on category searches
wordpress
After commenting on one of my posts, WordPress redirects me to another random post. Only after, when checking the previous post, I can see that my comment was posted. Still, why is WordPress sending me to a random post after commenting? Here's my comments.php file and here's my website (please don't publish it anywhere...
You're doing something that is affecting the value of the main $post variable in an incorrect manner. The WordPress template consists of one main Loop. That Loop, on a single post page, shows the one and only Post (or Page). When the comments form runs, it expects the last post from the Loop to be the one you're commen...
Why is WordPress redirecting users to random posts after commenting?
wordpress
I have simple function to show an image: <code> function helloworld() { echo '&lt;img src="'.$link.'" alt=".$alt." /&gt;'; } </code> I would like to pass strings link and alt to the function something like that: <code> &lt;?php helloworld('link=www.google.com&amp;alt=picture'); ?&gt; </code> How can I achieve something...
I agree that this is more of a basic PHP question, but I can see where you're coming from. A lot of WordPress functions accept query string formatted parameters like you're trying to do, so it would be a good idea to know exactly how they do it. Shortcode functions are guilty in particular. First of all, you need to mo...
Pass strings to plugin function
wordpress
What is the best method to retrieve the title tag of an external page using the http api? The snippet below will get the body but I can't find the right documentation about how to just get the tag. :/ <code> $url = 'http://wordpres.org'; $response = wp_remote_get( $url ); if( is_wp_error( $response ) ) { echo 'Somethin...
here is a function i have for that: <code> function get_page_title($url){ if( !class_exists( 'WP_Http' ) ) include_once( ABSPATH . WPINC. '/class-http.php' ); $request = new WP_Http; $result = $request-&gt;request( $url ); if( is_wp_error( $result ) ) return false; if( preg_match("#&lt;title&gt;(.+)&lt;\/title&gt;#iU",...
How to get title tag of an external page with http api?
wordpress
I'm using ALO EasyMail Newsletter plugin in order to send newsletters to subscribers. I have setup settings which is mainly the email address and try to send an email for subscribers but it doesn't send anything. Is there any special configuration for wordpress to do? Thanks
Sounds like a server config problem. Try looking for a custom SMTP plugin and set it up with that.
WP can't send newsletters
wordpress
I would like to create a visual recipe site, which lists how to make a dish in step by step through pictures.. Is it possible to create a custom page template where i can the following fields. 1.Dishname(title) 2.Introduction(Brief info) 3.Ingredients 4.upload photo input.. followed by add more pic Is it possible in wo...
Short answer, yes Wordpress can do this sort of things. You could create a custom post type called "Recepies", and a custom taxonomy called "Ingredients". Everything else is already included in the default WP setup, "Dishname" would be your post title, "Introduction" can be the "Excerpt" field, and photos are handled b...
I want to create a Visual Recipe site on WordPress, any suggestions or tips on how i can do it?
wordpress
I am constructing a theme for Wordpress that uses PAGES for products for sale on a site. This Product will have properties like DESCRIPTION, PRICE that will be stored to custom fields. I was wondering if it is possible to retrieve the values from the custom fields and forward them to a form which is stored in another w...
When generating the form all you need is the post id of the product pages and you can use get_post_meta function to retive the information about that product , so basically you just need to pass the product post id. eg: <code> $price = get_post_meta($product_post_id,'price',true); </code>
How to retrive Custom Fields as Values for a Form field
wordpress
I guess the title says it all. Short of creating a page with a custom template that links all the posts with a given tag (this is NOT a scalable solution, particularly if you want to let a customer do this), how would you add a menu item that takes you to a tag archive?
When setting up custom menu click <code> Screen Options </code> (top right, near <code> Help </code> ) and check <code> Post Tags </code> there. You will get metabox that will allow to add links to tag archives as menu item.
What is the best way to create a menu item that links to all posts with a certain tag?
wordpress
Can someone help me disable the <code> Install Themes </code> link from the WordPress back-end?
You can essentially 'block' the capability <code> install_themes </code> using; <code> function __block_caps( $caps, $cap ) { if ( $cap === 'install_themes' ) $caps[] = 'do_not_allow'; return $caps; } add_filter( 'map_meta_cap', '__block_caps', 10, 2 ); </code>
Wordpress disable 'Install Themes' tab
wordpress
Just wondering if there is a way to remove WordPress's default function of adding a tag around an inserted image. I assume its a "remove_filter" function like you can do for WPAutoP, but all my searches only turned up links for gallery plugins, etc. Thanks in advance, Pete
This is not able to be changed through a filter. In WordPress 2.9.2 and lower, the setting can be changed in /wp-admin/options.php. The image_default_link_type field is set to "file" by default. If you set it to "none", then scroll to the bottom and save, it will disable media links. This option has been removed from o...
Default Image Link Removal
wordpress
Currently I'm using this shortcode within a post http://pastebin.com/K7WC2Lk3 which works great, but somehow I can't add any text in front of this shortcode, without posting it the other way around. In example some dummy text [etalage] will always be shown as [etalage] some dummy text I've read to gather the value into...
Here's your updated shortcode function which puts output in a variable and returns it. Note that you have to use functions that return data rather than output directly, in this case <code> get_the_post_thumbnail() </code> is used in place of <code> the_post_thumbnail() </code> <code> function cor_etalage_add_shortcode(...
Can't add text in front of shortcode
wordpress
I'm thinking of using a taxonomy archive template to list out my taxonomies and entries (I'm using a hierarchical structure) and then combining this with the WordPress pages module to apply static content to each taxonomy level. Each level will essentially have its own page and will list either its children or entries ...
Short answer : Yes its posible! long answer: Not the best way to do waht you are trying to do, when i need static content to go along with taxonomy terms i use the terms description field and in case that i need even more i just add my extra custom fields to the taxonomy term, here is a nice tutorial add extra fields t...
Is it possible to use pages to apply static content to each taxonomy level?
wordpress
When I click on preview a post, I get the following error: Catchable fatal error: Object of class WP_Error could not be converted to string in functions.php on line 288 The line 288 is as follows <code> echo get_category_parents($cat, TRUE, '' . $delimiter . ''); </code> Any ideas on this please?
The only way that function returns an instance of <code> WP_Error </code> is if <code> $cat </code> (in your example) has an empty value. You need to check the return before doing anything with it. Replacing that line with this should fix the problem: <code> echo is_wp_error( $cat_parents = get_category_parents($cat, T...
What does this mean: Object of class WP_Error could not be converted to string
wordpress
I was wondering if there was a way to unregister a widget that gets declared in the functions.php file of a parent theme from a child theme, I understand that the child's function.php file gets loaded first so I don't know how to unregister it when it hasn't been created yet. Thanks all in advance!
Assuming the Parent Theme's Widget is registered at the <code> widgets_init </code> hook, all you need to do is wrap your <code> unregister_widget() </code> call inside of a function, hook that function into <code> widgets_init </code> , and give your hook a higher priority number than the Parent Theme's <code> widgets...
How to unregister a widget from a child theme
wordpress
I'm trying to unregister a post type from a child theme but I haven't been able to do so, the code in the funcions.php file on the parent theme is something like this: <code> add_action( 'init', 'mc_projects' ); function mc_projects() { register_post_type( 'project', array( // Default options.... ) ); } </code> What I ...
Try the following in your child theme functions file. <code> add_action( 'init', 'remove_mc_projects' ); function remove_mc_projects() { remove_action('init', 'mc_projects'); } </code>
Unregister post type from child theme
wordpress
Guys i have a custom file that is not part of the wordpress and its not a part of the plugins. How can i add it to the permalink solution? For example: Custom file name - example123.php Permalink solution - http://mysite.com/example
You should make a template out of your file and then in WP create a page named "Example" to which you assign this template.
Wordpress Custom File Permalink
wordpress
My question : how many custom fields or even taxonomies WordPress can handle without affecting performance? The reason I ask, is because I started building a custom theme and I might need to have around 10 to 20 custom fields, and thinking if this will affect the speed of the site. I understand that speed also depends ...
In the case of custom fields- if you fetch them in a single query to the database, fetching one or ten is not going to differ much, it's the same relatively simple query in both instances. If you were to do a lot of complex meta queries on those fields you'd definitely see a performance hit. I think same for taxonomy, ...
Custom Fields and performance
wordpress
I need to list the next seven days no matter what day it is. If its monday, it starts with today and lists 7 days, if its friday it starts with today and lists 7 days from today. Next I need to show any events for that day. IF there are no events for a given day it simply lists a default graphic. I am going to make a f...
You should definitely do it in just a single query. then set up a simple loop, each iteration get that day's date. then loop through all posts and compare the date to the date meta field, and output if it matches. I think something like this should work... <code> $today = date("o-m-d"); $future = strtotime ( '+6 days' ...
How do I list the next 7 days and any events (cpt) contained in those days
wordpress
hi i'm trying to insert a short code into a Text widget but all its doing it showing the code and not processing it. <code> &lt;?php echo do_shortcode(' [stream embed=false share=false width=500 height=560 dock=true controlbar=bottom bandwidth=high autostart=false playlistfile=http://www.xxx.com/wp-content/uploads/vide...
the text widget doesn't do php.... Here's my fave solution http://wordpress.org/extend/plugins/php-code-widget/ It's from Otto, so ya know it's good. Based heavily on the text widget, but allows for php
Inserting shortcode [stream /] into a Text widget
wordpress
I am currently having some CSS problems with Google Chrome. Slider is overlapping with the buttons on the right side. My theme layout (CSS) works fine with Firefox, and IE but not in google chrome. Something to do with margins and alignments I think. Here's the link: http://tigerdm.com.au/
Not a WordPress question, but if you remove the width from #slideshow-wrapper on line 4 of gallery-slider.css it sort of fixes rendering.
Google Chrome CSS issues
wordpress
Just wondering if its possible to redirect existing posts which are permalinks of just %post_name% to %post_name%-%postid% ? Is there a plugin which can pick this up? Dont want to lose rankings on the content so would want it handled with legitimate 301 redirect. Appreciate any advice if someone has had to deal with th...
Have a look at the Redirection plugin.
301 Redirecting posts without %postid% (just %post_name%) in permalink to ones with %post_name%_%postid%
wordpress
I'd like to make a query that returns the children pages of various parent pages. Unfortunately the <code> post_parent </code> attribute of <code> WP_Query </code> accepts only one value. What do you suggest ?
POST does not have parents, but categories. Only PAGE can have parent. So, the question is, what do you want to get? In case of getting POSTS from different categories, just use <code> get_posts </code> and add multiple categories. As for pages, just use <code> get_page_children </code> .
How to make a query returning pages from multiple parents
wordpress
I have been using the IntenseDebate Comments plugin , but am unhappy with it and would like to uninstall. Supposedly due to the data synchronization feature , it shouldn't be a problem to just disable and remove it, but of course there's nothing on their support site about how to uninstall ... Does anyone with experien...
There is a place to find this out on there site http://intensedebate.com/faq#li58
Uninstalling IntenseDebate
wordpress
I'm tired of typing in lists of counries in my "Countries" taxonomies. What's a good way to bulk import a long list of terms into Wordpress ?
Put list in PHP array, loop through it, use <code> wp_insert_term() </code> on each.
Is there a way to import terms into Wordpress?
wordpress
I'm curious if other PHP code files besides functions.php, WP template files and style.css in a child theme actually override the same file in a parent them? I am working with a client that has a theme with child theme support, however, there are no hooks or actions to unload for the functions that I wish to override. ...
It depends entirely on a) what functions and template files you're talking about, and b) how those functions are defined, or template files are called, in the Parent Theme. If the Parent Theme uses <code> get_template_part() </code> , then you're golden. If the Parent Theme uses <code> get_stylesheet_directory_uri() </...
Do all files in child theme override the parent?
wordpress
I'm creating an author.php page and I'd like to show comments as well as posts from a custom post type. I already have the list of posts but I'm looking into an efficient way of displaying the most recent comments from that author as well. So far I haven't found anything except widget and bloated plugins. I'd like to d...
This function calls all comments by an author and strips every comment to a max-length. Adjust the comment excerpt length when calling the function in your template like <code> wpse19316_author_comments( 100 ); </code> . <code> function wpse19316_author_comments( $length ) { $final_length = (int) $length; $author_comme...
Recent comments on author page?
wordpress
Hi I created a template within my theme files, just for displaying a map in a lightbox. I need to call this template page from a normal wordpress post, how can I do it? Say in my theme files I have a file called map-template.php From within my post I would like to call that map-template.php file and also pass the ID of...
So long as you have a standard page template header in your <code> map-template.php </code> , you can use the Custom Post Template plugin (which essentially allows you use templates on posts in the same way you do with pages). Update : Perhaps you might be better off using shortcode . For example; <code> This is my pos...
How to Call a static page in WordPress
wordpress
I found that my blog posts are inserted lot's of ad links, I'm using WordPress 2.9.2, is there a known security vulnerability in it? A screenshot : I post some codes on my blog, the ad links are inserted into them. I delete them by hand several days ago, and I found that they're back again!
Looks like you've been hacked. In all fairness, you're running a version that is over a year old - it's always best practice to upgrade as soon as you can. I would advise reading through the FAQ on the codex . I also stumbled across this rather concise step-by-step , though I would advise it's for the intermediate user...
Why was my blog post inserted lot's of ad links by others?
wordpress
I have a wp_nav_menu showing pages, but I'd also like to include a log in/out link, based on the current state of the user, which will redirect them to the home page. I've looked far and wide, but how can I implement this in a wp_nav_menu? Thanks, Dennis
Use the <code> wp_nav_menu_items </code> hook to add a filter which will allow you to add your login / logout link. Use <code> wp_loginout() </code> to display a status aware login / logout link. Codex page.
wp_nav_menu log in/out link?
wordpress
I am trying to customize behavior for different displays of pages; I know I can use the Template Hierarchy and Conditional Tags to accomplish this. In the process of debugging, though, I'd like to be able to access all the meta-information about a page without having to iterate through all the <code> is_* </code> funct...
you can inspect $wp_query to see the query vars and returned data, including all of those conditionals: <code> &lt;pre&gt;&lt;?php print_r($wp_query); ?&gt;&lt;/pre&gt; </code>
How do I acquire all the meta-information for a particular page I am on?
wordpress
I'm using Wordpress 3.1.3 as a full CMS, installed in the root directory of a domain. I have it setup using the built in options to have a static page as the home page, and then my blog at http://www.mydomain.com/blog . What I would like is to have my single blog posts, category pages, archive pages, and tag pages, and...
Go to Settings> Permalinks and add it to the permalink structures
How do I add /blog/ as a prefix to permalink structure for blog posts, tag pages, etc.?
wordpress
I am using WP Content Slideshow. I like the plugin, but am having an issue with it. I mailed the creator, but no response, so I am trying to troubleshoot what is causing the problem. You can see the issue on the homepage of elyconnect.com . The plugin uses the featured image for the image in the slideshow. I set the re...
I think on your example is the picture to small for crooping; if the image is smaller as the config on mediathek in WP, than it is not possible to crop the image. Your theme use the image from 300px width for this view and the css style defined 447px.
Is WP feature image function cropping images? WP Content Slideshow
wordpress
This is included in themes and plugins. <code> /* * @package WordPress * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ </code> What are they for? I've read that they are standard and so on, but what is the practical use for it?
These are PHPDoc tags - used to generate meaningful (and automated) code documentation
What are the package and subpackage comment for?
wordpress
what is a query for selecting a list of comment id's that have not had a reply yet so I can use it to iterate though each comment id and echo out the post it is on and the excerpt of the comment along with the author name, url and how many comments?
this should work... <code> &lt;?php global $wpdb; $sql = "SELECT comment_ID FROM ". $wpdb-&gt;prefix ."comments WHERE comment_parent = 0 AND comment_ID NOT IN(SELECT comment_parent FROM ". $wpdb-&gt;prefix ."comments);"; $results = $wpdb-&gt;get_results($sql); ?&gt; </code>
db query for retrieving comments without any reply
wordpress
I'm managing a movie related site.. I'm using yoast's simple taxonomies plugin to classify my content with Artists, Genre (action, horror, comedy, drama etc..), Director, Writer etc... On a specific page (template), I want to pull last 5 posts with only their titles from custom taxonomies.. how can I pull last 5 titles...
create additional loops in your template, selecting the taxonomy and term you'd like to limit display to for each. for instance, this will pull the last 5 posts from taxonomy "genre", term "action": <code> &lt;?php $args = array( 'taxonomy'=&gt;'genre','term'=&gt;'action','posts_per_page'=&gt;5 ); $action_films = new W...
List Recent Post Titles from Custom Taxonomies?
wordpress
Does anyone know of any good wordpress themes that are compatible with the bbpress plugin ? I'm looking for something with a good layout, preferably a magazine/news type theme. Thanks :)
Best would be if you modify the bbpress theme a bit.Copy the entire folder "/bbpress/bbp-themes/bbp-twentyten" folder into your themes folder, rename it to something else, and modify your style.css to make it a custom child theme of whatever your current theme is. Now you can modify as you you wish. Another way :Copy a...
Any Good WordPress Themes Compatible With The BBPress Plugin?
wordpress
I'm using wp_nav_menu and am trying to create custom output for the sub-level drop downs. I came across the "items_wrap" argument but there's really not much information as to what it is, how it works, and what kind of things can be done with it. What exactly is " %1$s " and " %2$s "? (Can anyone explain it in layman's...
The parameter <code> 'items_wrap' </code> for <code> wp_nav_menu() </code> defaults to <code> '&lt;ul id="%1$s" class="%2$s"&gt;%3$s&lt;/ul&gt;' </code> . It is parsed with <code> sprintf() </code> : <code> $nav_menu .= sprintf( $args-&gt;items_wrap , esc_attr( $wrap_id ) // %1$s , esc_attr( $wrap_class ) // %2$s , $it...
Any docs for wp_nav_menu's "items_wrap" argument?
wordpress
I'm developing a child theme of a premium template, this comes with a custom post type with the label name of "Projects" but I'd like to change it to something else, I know that if I go to the functions.php file of the main theme I can change it easily but I'd like to change it from my child theme so I don't have to ed...
There is a global array <code> $wp_post_types </code> . You can change <code> $wp_post_types[$post_type]-&gt;labels </code> after the parent theme has set the CPT. So … if the parent theme registers the CPT on <code> 'init' </code> like this: <code> add_action( 'init', 'register_my_cpt', 12 ); </code> Then you need a l...
Can I change a custom post type label from a child theme?
wordpress
We have a site http://ort.org.il built with WP 3.1.2. Its RSS address should be http://ort.org.il/feed/ , but nothing shows up there. I can see the feed in the View Source, but not in the browser, and not in one of our other applications, that reads the RSS from this site. What could be the problem, and how can I fix i...
The problem is an invalid UTF-8 character in the excerpt <code> &lt;description&gt; </code> . The text is cut off in the middle of a multi-byte character, rendering your complete feed invalid. You get a slightly hint when you look at it in Opera. Do you filter <code> 'bloginfo_rss' </code> or <code> 'get_bloginfo_rss' ...
Site Rss not seen by browser
wordpress
In WordPress 3.1 a post can be reached a number of ways, for example each one of these takes you to the same post (where /id is the base) <code> http://myblog.com/id/1008 http://myblog.com/id/1008/my-slug http://myblog.com/my-slug </code> How can I tell WordPress to redirect all of these variations to <code> http://myb...
Check whether the posts not being redirected actually have the correct permalink stored in the DB. There's a bug in which canonicals can't be properly guessed because the permalink structure was CHANGED after the post was created. Try either creating a new post with your current permalink structure, or editing the post...
How can I force WordPress to redirect to canonical permalinks?
wordpress
I have to add a blog in my magento site.Is it possible to integrate wordpress into magento by which we are able to post blog in the wordpress and then display in the magento site. Thanks in advance Pramod
Here is an extension for this..that you can use http://www.magentocommerce.com/magento-connect/aheadworks/extension/1516/blog-extension-by-aheadworks or you can go with ... stackexchange-url ("Full Magento / Wordpress integration")
How I can add blog in my magento site?
wordpress
I was wondering if anyone knew how to have a different "featured post" based on it's category per category page? For example, if you are on the medical category page, you would see a medical post featured in a special div and so on.
assign the additional category 'featured' to the post in the category 'medical'. in your category template, use a query with <code> 'category__and' =&gt; array(3, 27) </code> example (assuming 'medical' is cat 3, and 'featured' is cat 27): <code> &lt;?php $args = array( 'category__and' =&gt; array(3, 27), 'posts_per_pa...
Featured Posts for Category Pages
wordpress
I can easily link to my archives page by creating a link: <code> &lt;a href="http://server.com/wordpress/archives.php"&gt;Archives&lt;/a&gt; </code> . As I was editing my WP template, I noticed that there are a number of functions that WP uses to link to other pages. For example <code> get_the_category_list </code> ret...
This link Wordpress Codex: Linking... provides detailed information on how to link different types of content. One nice feature that solves the above problem is to use a link of the form <code> /wordpress/archives.php </code> . This will transfer nicely (in most cases) to any particular server deployment. Further, look...
What is the canonical way to link to pages?
wordpress
I have a custom post-type 'videos' and on the first page I have the first video styled differently than the next videos on the page. Basically I show the first video in a large format, while the rest of the videos on the page are small. Question: On page 2, 3, etc of the video post-type, I do not want to have a large v...
In response to your comment, <code> $wp_query-&gt;current_post </code> in action. Note that it's zero-indexed: <code> &lt;?php if (have_posts()) : while (have_posts()) : the_post(); if($wp_query-&gt;current_post==0): echo "this is the first post"; else: echo "this is post number " . ($wp_query-&gt;current_post + 1); en...
What is the best practice to style archive page 2,3,etc differently than archive.php?
wordpress
I'm trying to add an Amazon advertising widget in a WordPress sidebar widget (self-hosted WordPress, v3.1.3). The widget code is basically an iframe. I've tried using the "Text" widget and pasting the iframe code in there, but when I save the widget, the iframe code disappears. I've come across this problem/limitation ...
Just create a widget that doesn’t filter your input. This is probably the most simple widget with user input you can build. Here is the widget I use in my plugin Magic Widgets. <code> /** * Simplified variant of the native text widget class. * * @author Thomas Scholz aka toscho http://toscho.de * @version 1.0 */ class ...
Adding iframe Content to Sidebar Widget
wordpress
On edit.php, the main content is a list of posts, with columns including the published date. I'd like to change the date format of the published date just on the admin page . In this case, I don't want to change what the users see; I want to change what the admin sees. I want to add the day of the week to the published...
stackexchange-url ("Add a column to the post edit screen") and format the date however you like. stackexchange-url ("Remove the default Date column"). EDIT here's the code to put inside your theme's <code> functions.php </code> file: EDIT 2 added additional code to add publish status and make the column sortable, this ...
how to change "published date" format on edit.php (Posts page)?
wordpress
Okay = been working on the plugin I posted about stackexchange-url ("over here"), and having am having a couple troubles. I decided to go the route of writing a plugin from scratch. As I noted, its an customized ajax gallery / portfolio, and I'm trying to work its management into wp-admin. The goal is finally to do the...
I see two problems- <code> $this-&gt;table_name = $wpdb-&gt;prefix . "b99_pf"; $sql = "CREATE TABLE " . $table_name . " ( </code> <code> $table_name </code> will be undefined, should be <code> $this-&gt;table_name </code> and in your query: <code> cat tinytext default NOT NULL </code> I don't think it'll like that <cod...
How to properly create table in plugin
wordpress
How can I modify month names in "Archives" in my blog? I would like to translate english month names into my mother tongue. I'm using the english version of wordpress 3.1.3
if the translation is only for the archive widget, a filter function might work (to be added to functions.php of the theme): <code> add_filter('get_archives_link', 'translate_archive_month'); function translate_archive_month($list) { $patterns = array( '/January/', '/February/', '/March/', '/April/', '/May/', '/June/',...
How to translate month names in "Archives"
wordpress
The page I am talking about is this: http://wordpress.org/extend/plugins/ It is simple and perfect in my opinion. Can anyone help me?
this should give you the same look unless your theme's css overwrites it: <code> &lt;form name="loginformfooter" class="loginform" id="loginformfooter" action="&lt;?php bloginfo('url'); ?&gt;/wp-login.php" method="post"&gt; &lt;p&gt;&lt;label&gt;Username &lt;input type="text" value="" maxlength="40" size="13" id="user_...
How can I make a login just like on wordpress.org?
wordpress
I have created a page on which I would like to run queries exlusively for one custom post type in the same way I'm using Category.php, Author.php and index.php to run queries for regular posts. I can't seem to get anything to appear when I edit the page that is associated with the template I've created for this page, s...
You want to use the template file <code> archive-{posttype}.php </code> to output an archive index of your Custom Post Type, and the template file <code> single-{posttype}.php </code> to output a single Custom Post. Refer to the Codex entry for Template Hierarchy .
Using Pages to handle calls for custom post types
wordpress
I am attempting to automate, as much as possible, the Settings API function calls for each setting in a Plugin. Looping through the options array, and outputting <code> add_settings_section() </code> and <code> add_settings_field() </code> is simple enough: <code> add_settings_section() </code> : <code> $oenology_hooks...
if you look at the do_settings_sections function more specifically the line 1164 where the callback function is being executed : <code> call_user_func($section['callback'], $section); </code> you can see that the $section array is being passed to the callback function, so you can identify the callback by the <code> $se...
How to pass variable to add_settings_section() callback?
wordpress
I have a pretty extensive music collection and my friends are always borrowing my stuff. I would like to keep better track of my library so I'm building a sudo-checkout system using WP. The collection was already in WP using terms to sort everything. The main taxonomies are artist , year released , label , and genre . ...
if i understand correctly you want to get a list of <code> albums </code> (posts) of a specific artist(taxonomy) and that are have <code> ihaveit </code> term. if so the its a simple query using <code> tax_query </code> : <code> $args = array( 'posts_per_page' =&gt; -1, //get all 'post_type' =&gt; 'album', 'tax_query' ...
How to create a list of terms who's posts also have a predefined external term?
wordpress
In a previous question I asked how to add a column to the Posts page in the Administration section, and got a working answer. But now I need to know how to delete an existing column (e.g. the Date column) so that my customized Date column replaces it.
<code> function my_manage_columns( $columns ) { unset($columns['date']); return $columns; } function my_column_init() { add_filter( 'manage_posts_columns' , 'my_manage_columns' ); } add_action( 'admin_init' , 'my_column_init' ); </code>
How to remove a column from the Posts page
wordpress
Has anyone written or can suggest a plugin that would replace the filter-by-month in the Post Administration screen with filter-by-week-number instead? e.g. a drop down option for "Week of 05/31-06/06, 2011"
here you go , its something i quickly cooked up and it seems to work fine: <code> &lt;?php /* Plugin Name: admin-filter-by-week Plugin URI: http://en.bainternet.info Description: answer to Filtering posts on Post Administration Page by Week Number instead of by Month stackexchange-url 1.0 Author: Bainternet Author URI:...
Filtering posts on Post Administration Page by Week Number instead of by Month
wordpress
What I'd like to do is have the entire row be a different color - for example, a light blue for draft posts. That way I can visually see at a glance what's a draft, what's scheduled, and what's published on a given time period (I am working on a system for scheduling posts out weeks in advance). It would seem the logic...
you mean something like this? then here you go: <code> add_action('admin_footer','style_posts_list'); function style_posts_list(){ ?&gt; &lt;style&gt; .status-draft{background-color: #008866 !important;} .status-pending{background-color: #F53162 !important;} .status-publish{background-color: #FFF700 !important;} &lt;?p...
Is there a way to change the color of a row in Post Administration based on the type of post?
wordpress
For Example,Now I have 3 Categories Like Food,Transport,Technology.Under These Categories I have Many Posts.Now I Want To Show the Latest Post From Each Category.{How to get Recent Post From Each Category with Thumbnail?}Is This is Possible? I Think No Plugin for This One.If You have a Great Knowledge in Plugin Creatio...
I'm the developer of the List Category Posts WordPress plugin. The plugin uses a short code to get posts from a category and you can include thumbnails too. Give it a try and hopefully you'll find it useful.
How to get Recent Post From Each Category with Thumbnail?
wordpress
This seems like a simple thing to do, but I haven't been able to figure it out. What I'd like to do is add the time a post is scheduled to the date stamp on the list of posts. I know this means modifying the columns, and there's a way to do it that seems fairly simple. Has anyone done this, and can you suggest some cod...
Try this: <code> add_filter('manage_posts_columns', 'posts_columns', 5); add_action('manage_posts_custom_column', 'posts_custom_columns', 5, 2); function posts_columns($defaults){ $defaults['your_date_col'] = __('Date'); return $defaults; } function posts_custom_columns($column_name, $id){ if($column_name === 'your_dat...
How to add the time of a post to the list of posts on the administration page?
wordpress
What happened to the plugin in Wordpress plugin repository? The link doesn't work: http://wordpress.org/extend/plugins/wp-no-category-base/ and search for this plugin doesn't list it. Yes, I know I can download it from author's page, but I am intrigued why would folks at wordpress.org remove it from their list?
I am the author of the plugin. Try again, its back now.
What happened to WP No Category Base?
wordpress
Hi I would like to import tables through CSV, any particular plugins or functions that can help me do that? I would like to have them stand in their own table and then the user would be able to include them via shortcode and id e.g. [table id=1] Thanks
I know there are a few but the one that stands out is WP-Table Reloaded plugin which answers your requirements and has endless of customization options and features.
CSV Import Tables
wordpress
Hopefully, this is an easy question - I'm just a bit confused. I've got a custom widget with the usual structure: <code> class My_Widget extends WP_Widget { function My_Widget() { // widget actual processes } function form($instance) { // outputs the options form on admin } function update($new_instance, $old_instance)...
Where did you call your <code> item_width_cols_to_class </code> "function"? You are using the function as a method inside the <code> My_Widget </code> class. Therefore, you have to call it with a reference to its non-existent object e.g. <code> $this-&gt;item_width_cols_to_class() </code> or <code> self::item_width_col...
Add a custom function to widget code
wordpress
i want to do a research in Category List Area. I'll Explain Here... Now I have 4 Categories Like 1,2,3,4. First of all it needs to show in the category pages Horizontally.Next is, While Clicking on Any Category it will show the articles from only that category in this thumbnail format, this also should be in a format t...
In the category link URL, add he category ID. Then when you click the link, the page reads the <code> $_GET </code> variable and use this to fetch posts with that category. You can use <code> get_posts </code> .
How to Show Category List With Corresponding Links?
wordpress
How Can I add some js files from a plugin to a specific location with add_action I am Using this widget: http://www.designchemical.com/blog/index.php/wordpress-plugins/wordpress-plugin-jquery-vertical-accordion-menu-widget/ It is adding its file here: After <code> &lt;script type='text/javascript' src='http://new.dajew...
you have a $ undefined js error on line 191. wp_enqueue_script has a dependencies parameter, I think you need to pass the jquery-ui handle as a dependency with your accordion script so it loads first.
I add some js files from a plugin to a specific location
wordpress
I've added to the theme (twenty ten) a php template file in which I've written some javascript code. I then created a new page and set it to use that template. Then I installed and activated the 'wp-minify' plugin hoping for it to drop the blanks and comments. But when I look at the page's source code in the browser I ...
As far as i understand WP Minify plugin works on scripts and styles that are included in your page <code> &lt;head&gt; </code> tag as external files and not scripts and style that are in the <code> &lt;body&gt; </code> tag. if you are inserting scripts and style in the <code> &lt;body&gt; </code> tag manully you should...
Wp-minify doesn't seem to minify my JS code
wordpress
Almost all divs say wpl but can't find which plugin is. For example, <code> #wpl-likebox </code> . Here is a page that is using it: http://wpdevel.wordpress.com/2011/05/25/jquery-updates-in-wordpress-3-2/
It is a custom Plugin for WordPress.com.
Can anyone identify this like plugin (not facebook like)?
wordpress
I have a client who has the categories listed in the right-hand sidebar. He came to me today requesting a different "navigation" in the header for each category. So basically, if you click on Category 1, the navigation changes to a set of pages (that he has set) and so on. Is this even possible? I already have the buil...
You could set this in your theme using conditionals. Create a separate menu for each category using the WordPress menu feature (Appearances > Menus). Then in your theme, where you want the menu to display, determine which menu to display using the is_category('category-slug') and/or in_category('category-slug') conditi...
Different Main Navigation per category
wordpress
I've been given a wordpress site to do some development work on (I didn't do any of the initial development on it). I've installed it locally and am running it with XAMPP on Windows 7. I generated the database from a mysqldump file and I made the changes to wp-config to link to the database. After also changing the URL...
my first thought is that it is a permalinks issue. if it is, set your permalinks to default and the links should work correctly. also, be sure to search the database for (and replace) any other instances of the old live site's URL, particularly in wp_posts table. it's easy to forget to update guid and post_content [i.e...
article pages not displaying on local instance of wordpress site
wordpress
I'm using this bit of code to generate a menu: <code> &lt;div id="menu"&gt; &lt;?php $args = array( 'depth' =&gt; 1, 'show_date' =&gt; '', 'date_format' =&gt; get_option('date_format'), 'child_of' =&gt; 0, 'exclude' =&gt; '426, 508', 'include' =&gt; '', 'title_li' =&gt; __(''), 'echo' =&gt; 1, 'authors' =&gt; '', 'sort...
I'm now using the Page Links To plugin to achieve this.
Pick out specific menu item from code
wordpress
I am designing a theme where the home page (i.e. <code> is_home() </code> ) should only display the latest blog post. I want to do something like <code> $wp_query-&gt;update_option('posts_per_page', 1) </code> every time I am on the home page. All other pages that display posts (like archives) should just follow the us...
Alternate approach (if you want/need to keep this in functions.php and go via hooks instead of modifying template) would be something like this: <code> add_action( 'pre_get_posts', 'pre_get_posts_home' ); function pre_get_posts_home( $query ) { global $wp_query; if( $wp_query == $query &amp;&amp; $query-&gt;is_home ) $...
Where should I update_options in a theme?
wordpress
Here's the site I'm having problems with: http://www.ashleymosuro.com/newsite/about For some reason, my custom theme I created for the Jquery UI is being overridden by the google hosted stylesheet, and I have no idea where in my theme it is referencing the stylesheet. Wherever it is, I need to get rid of it. I'm trying...
try and use the correct syntax in the stylesheet: <code> /* jQuery UI Progressbar 1.8.13*/ /* Progress bars on about page*/ .ui-progressbar.ui-widget.ui-widget-content.ui-corner-all { height:20px; text-align: left; } </code> (i don't know where the google css comes from. and excuse the way the code is presented; the 'c...
Jquery UI Google CSS, from where?
wordpress
Wordpress 3.2 beta comes with twenty eleven. It has a Theme Option panel in the Appearance section: I would like to know what's the easiest (and extendible) way of adding more options to that panel. For instance, changing the color of other elements?
As you can see in source theme makes some use of Settings API , but doesn't include calls like <code> do_settings_fileds() </code> that would allow you to use add settings. I would probably try to unhook <code> twentyeleven_theme_options_add_page() </code> call and fork that and <code> theme_options_render_page() </cod...
What's the easiest way of adding more options in the Theme Options of the twenty eleven theme?
wordpress
I've been using the Custom Field Template plugin for a while now, and I really like it. It's fantastic for adding quick custom field meta boxes in the wordpress back end. It handles TinyMCE, file uploads, repeating fields, date picker, etc. For really advanced stuff I do custom coding, but nothing beats rapid developme...
Create a public gist or a repository. You can use multiple files per gist, everyone can comment or fork the project. It is like a wiki for developers. :)
Let's Create Custom Field Template Documentation
wordpress