Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Forum: Plugins
    In reply to: Editor can’t delete
    Thread Starter alst

    (@alst)

    pasting a vanilla install copy of wp_user_roles into wp_options fixed it

    fabie_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.

    Thread Starter alst

    (@alst)

    one 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; ?>

    Thread Starter alst

    (@alst)

    bother, code stripped, try this…

    <?php while (have_posts()) : the_post(); ?>
    <? if ((is_category()) && in_category($wp_query->get_queried_object_id())) { ?>

    Forum: Fixing WordPress
    In reply to: Sub page problem
    Thread Starter alst

    (@alst)

    This 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 problem
    Thread Starter alst

    (@alst)

    Fixed 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 ); ?>

Viewing 6 replies - 1 through 6 (of 6 total)