Michael Fields
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Export as HTMLI have never come across anything like this specifically coded as a WordPress Plugin. The closest solution I have for you is Wget – warning – quite possibly a learning curve 🙂
Forum: Fixing WordPress
In reply to: Permalink dynamic pages .htaccessJalet – you need to place your custom line above the code that WordPress generates. Basically, the WordPress code says “If the request is not actually a file or folder – send the request to index.php for processing”.
Forum: Fixing WordPress
In reply to: How do I change Password Protected text?This piece of code should do it for you. Place this code in your theme’s functions.php file. You can add customizations to the
custom_password_form()function – just don’t use print or echo – the function must return a value.<?php add_filter( 'the_password_form', 'custom_password_form' ); function custom_password_form() { global $post; $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID ); $o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-pass.php" method="post"> ' . __( "This post is password protected. To view it please enter your password below:" ) . ' <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /> </form> '; return $o; } ?>Forum: Fixing WordPress
In reply to: A-Z index list of tags@hifa – You should be able to use one of the above pieces of code, but you will want to change this line
$tags = get_terms('post_tag' );to accept your custom taxonomy. Hypothetically, if you change ‘post_tag’ to the value of the “Label” you entered for your custom taxonomy, it should work.Forum: Your WordPress
In reply to: Photographer website built on WordPressgalen3050,
Great job! There are a few usability things that I would change if this were my site…
1. I would definitely move the photography navigation to the top of the photo, I (and many others) have to scroll to access it. Then, when I click a link to view the previous or next image, the navigation gets pushed back down again.. kinda frustration for those of use with small screen resolutions 🙂
2. I have to click on the photo to close the lightbox popup – AND when I click the blacked-out background part, nothing happens. It seems like your site has been coded to function the opposite way that I have seen this effect function in the past – which can be off-putting to those of us who are used to the ‘default’ functionality. Basically, I feel like it is a deterrent – I spend more time thinking about what I should click on rather than looking at your photos.
3. Please do not disable my right mouse button – there is absolutely no reason to do this… ever!
Please don’t think I’m trying to be mean…
-MikeForum: Your WordPress
In reply to: Make a new blog with wordpressFirst thing I would do is download and install a new theme. You can find many free themes here:
http://ww.wp.xz.cn/extend/themes/Forum: Fixing WordPress
In reply to: A category page with an alphabetical list of subcategories?I use a custom function which looks a bit like this:
<?php function loop( ) { global $post; $post_class = 'post'; /* Class for all posts. */ $post_class .= ( is_sticky() ) ? ' sticky' : ''; /* Don't forget about stickiness. */ $post_class .= ( in_category( 4 ) ) ? ' stinky-cheeses' : ''; $post_class .= ( in_category( 17 ) ) ? ' blue-monkeys' : ''; $post_class .= ( in_category( 66 ) ) ? ' taco-freakout' : ''; print "\n\t" . '<div class="'. $post_class .'" id="post-' . get_the_ID() . '">'; /* Do your normal loop stuff here */ print "\n\t" . '</div><!-- end post -->'; } ?>Call this function inside the loop in category.php
Forum: Themes and Templates
In reply to: Installing Hybrid ThemeUpload the second “Hybrid” folder to /wp-content/themes/.
Forum: Fixing WordPress
In reply to: Permalinks with XAMPPBoth http://educhalk.org/blog/how-to-copy-your-online-wordpress-blog-to-xampp-on-your-local-computer-or-usb-drive/ and http://www.scyj.be/creating-a-local-copy-of-a-wordpress-blog/ are teaching you the wrong way to move a WordPress installation from one domain to another.
Unable to create directory /Applications/XAMPP/xamppfiles/htdocs/mywebsite/wp-content/uploads/2009/10. Is its parent directory writable by the server?
The easiest way to get around this is to create a folder here: “your-install-folder/wp-content/uploads/” and set the permissions so that it can be writable.
Forum: Themes and Templates
In reply to: two home pagesSomething like this should work for the sidebar:
<?php if( is_user_logged_in() ) : ?> <div id="second-section" class="widget-section"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('second-section') ) : ?> <div class="widget-error"> <?php _e( 'Please log in and add widgets to this section.', 'buddypress' ) ?> <a href="<?php echo get_option('siteurl') ?>/wp-admin/widgets.php?s=&show=&sidebar=second-section"><?php _e( 'Add Widgets', 'buddypress' ) ?></a> </div> <?php endif; ?> </div> <?php else: ?> <div id="other_sidebar"> </div> <?php endif; ?>also one other question I have is there any way to use roles in the if statement? for instance instead of is_user_logged_in something like is_user_administrator
This is pretty easy for admin. You can use:
is_admin()in a conditional structure. I don;t think that there are other functions like this though. You can fine tune usingcurrent_user_can(). This function takes one argument which is the name of the capability you are testing for. something like:if( current_user_can( 'edit_posts' ) ){ /* DO STUFF */ }or
if( current_user_can( 'level_6' ) ){ /* DO STUFF */ }more info on roles here:
http://codex.ww.wp.xz.cn/Roles_and_CapabilitiesForum: Fixing WordPress
In reply to: validate_emailsanitize_email() is defined on line 1558 of /wp-includes/formatting.php
Forum: Themes and Templates
In reply to: two home pagesSure, this should be rather easy actually. In whichever file controls your homepage ( could be index.php, home.php, page.php or a custom template ). you will want to incorporate the following logic structure:
if( is_user_logged_in() ) { /* Do custom logged in stuff */ } else { /* Do NOT logged in stuff */ }Hope this helps,
-MikeForum: Fixing WordPress
In reply to: Permalinks with XAMPPI copied my sql database into XAMPP (editing paths where necessary of course), and moved my wp-content folder into my local XAMPP website folder “htdocs/mywebsite/” to replicate it off line.
This is the wrong way to move a WordPress installation to a new domain. You will want to export the online blog and import into a clean local installation. The reason that you will want to import/export is because WordPress stores path + url information in the database. While some of these are easy to change others (like serialized arrays for attachment metadata) are not really meant to be human editable.
Please see the following codex article for details:
Forum: Everything else WordPress
In reply to: Keep Posts Scheduled, But Visible@lbsources – just in case I misunderstood…
@mfields This sounds like it would work – but what about pages where I list “Category = Events” .. They wont show up in correct order..
Are you referring to viewing posts in a WordPress Category or do you have a WordPress Page which shows the events?
What I wrote in my last post refers to a WordPress Page…
In this situation, I would suggest not using the WordPress Category view at all. The calendar “page” that you set up with the “Event Calendar” plugin serves to replace this view with a custom interface. It should be pretty easy to redirect all requests to your events category with .htaccess
This is what I would do… other than just removing all links to the events category from your site.
Forum: Everything else WordPress
In reply to: Keep Posts Scheduled, But Visible@lbsources – Same solution. I’m not sure how you are listing the events on your pages, but more than likely it’s some sort of custom query. As long as you change all the queries on your site that produce an events list, you should be fine and will never have to schedule event posts in the future.