alst
Forum Replies Created
-
Forum: Plugins
In reply to: Editor can’t deletepasting a vanilla install copy of wp_user_roles into wp_options fixed it
Forum: Fixing WordPress
In reply to: PDF icon with pdf uploadfabie_r’s solution works fine except for ie6
the below code, saved as a javascript file and linked to in your single.php file will add the icon to .pdf links in ie6 as well and won’t conflict with the css attribute solution (thanks to Rebecca Murphey for the code)
$(document).ready(function() { var fileTypes = { // extension: 'image file' doc: 'doc.gif', xls: 'xls.gif', pdf: 'pdf.gif' }; // then, loop over the object // using jQuery's $.each() $.each(fileTypes, function(extension,image) { $('a[href$="' + extension + '"]'). css({ paddingLeft: '20px', paddingTop: '2px', paddingRight: '2px', background: 'transparent url("' + image + '") no-repeat center left' }); }); });
Replace pdf.gif with the address of the icon you want. You may need to play around with the css rules as well.
Forum: Fixing WordPress
In reply to: Alphabetical Posts with custom category queryone last try,
<?php while (have_posts()) : the_post(); ?>
<? if ((is_category()) && in_category($wp_query->get_queried_object_id())) { ?>
list hyperlinked the permalink then then title
<!-- .post -->
<?php } ?>
<?php endwhile; ?>Forum: Fixing WordPress
In reply to: Alphabetical Posts with custom category querybother, code stripped, try this…
<?php while (have_posts()) : the_post(); ?>
<? if ((is_category()) && in_category($wp_query->get_queried_object_id())) { ?>
- "><?php the_title(); ?>
</code
<!-- .post -->
<?php } ?>
<?php endwhile; ?>Forum: Fixing WordPress
In reply to: Sub page problemThis is the definitive fix which allows sub-sub pages to also call the right header.
Makes use of the fold_page_list plugin.
<?php //this code uses fold_page_list plugin to generate array of ancestor pages and sets grandparent as top level page $g_page_id = $wp_query->get_queried_object_id(); $ancestorIDs = _wswwpx_page_get_ancestor_ids($g_page_id); $grandParent = $ancestorIDs[1]; ?> <?php //this code keeps lavalamp on the correct parent page when viewing a subpage, add elseif for other top level pages as appropriate if ($grandParent==65) { $subpagefix="/header-resources.php"; } elseif ($grandParent==221) { $subpagefix="/header-quickref.php"; } else $subpagefix="/header.php" ?> <?php include (TEMPLATEPATH . $subpagefix); ?>
Forum: Fixing WordPress
In reply to: Sub page problemFixed it,
the key was removing the “” around the page number.
This code works now,
<?php if (is_page() || $post->post_parent==65) { $subpagefix="/header-resources.php"; } elseif (is_page() || $post->post_parent==221) { $subpagefix="/header-quickref.php"; } else { $subpagefix="/header.php" ; // Fall-through } ?> <?php include (TEMPLATEPATH . $subpagefix ); ?>