Forum Replies Created

Viewing 15 replies - 61 through 75 (of 80 total)
  • Forum: Fixing WordPress
    In reply to: Get taxonomy slug

    im trying to do this exact same thing and have the exact same problem. cant figure out how to convert name to slug…

    i did get this working, but when you assign 2 categories to a post it acts kinda funny. It doesnt list all of the categories in a row to use as class identifiers

    <?php
     $taxonomy = 'your custom taxonomy';
     $terms = get_the_terms( $post->ID , $taxonomy );
        if ( !empty( $terms ) ) :
        foreach ( $terms as $term ) {
          $link = get_term_link( $term, $taxonomy );
          if ( !is_wp_error( $link ) )
          echo '<li class="all ' . $term->slug . '">';
        }
        endif;
    ?>
    

    hoping someone knows the right way to do this. ive been working on this for days.

    Thread Starter digitalrenewal

    (@digitalrenewal)

    ok, ive pasted the code into pastebin here

    to clarify, what Im trying to do is echo a custom category slug to use it as a class identifier.

    im not sure if this is what youre looking for, but it worked for me…

    I needed to wrap all of my images with a class to trigger a javascript workaround. since div didnt work in this example, i used span and it worked.

    added this to functions.php

    // WRAP UPLOADED IMAGES IN CLASS
    if(is_admin()){
    
      add_filter('image_send_to_editor', 'wrap_my_div', 10, 8);
    
      function wrap_my_div($html, $id, $caption, $title, $align, $url, $size, $alt){
        return '<span class="rame-img" id="mydiv-'.$id.'">'.$html.'</span>';
      }
    }

    code came from here

    wordpress now allows you to add individual classes to each menu item. In your appearance > menus, pull down screen options, turn on css classes and there will be a field in each menu item to add a class. Now you can assign and style those classes individually.

    Thread Starter digitalrenewal

    (@digitalrenewal)

    Thanks Takayuki! This is exactly the problem. I checked phpinfo and for sure, my servers php settings are set way too low.

    Thread Starter digitalrenewal

    (@digitalrenewal)

    installed and tested Easy FTP Upload plugin, and im having the same exact issue. Worked perfectly with smaller files, but failed larger file uploads. So its probably not an issue with this plugin. Im just really not sure what to try next.

    does anyone have ANY CLUE what might be happening?

    Forum: Plugins
    In reply to: TinyMCE link plugin
    Thread Starter digitalrenewal

    (@digitalrenewal)

    thanks Eric! now with 3.1 we dont have to worry about this ever again… Thank you wordpress! finally ??

    the only thing i cant figure out, is how to get the thumbnails in there. Anyone know if theres a special way to display page thumbs as opposed to post thumbs?

    Another way is to put back the page excerpt functionality. This way you can control exactly what text to display…

    1. Make your parent page template with that ‘get pages in post format’ code

    2. Change every occurrence of ‘content’ to ‘excerpt’

    3. Install a page excerpt plugin, to add excerpts to pages. I’m using Andrew Ozz’s to edit all excerpts in one handy place.

    im wrong. this works with the xml sitemap plugin. The url just has to be something other than sitemap. like html-sitemap.

    if using in conjunction with Arne Brachholds XML sitemap generator, this will display the xml sitemap. kinda ugly, but it does work.

    Thread Starter digitalrenewal

    (@digitalrenewal)

    I was gonna post a followup, but it said the topic was closed for some reason.

    I don’t dislike the default rss icon, but I did figured out what was looking so strange about it… It has an orange background.

    i added the following css and fixed it

    #sidebar h2 .rsswidget img {background:transparent !important; padding-right:4px;}

    if you know how to replace the default rss icon, thatd be sweet!

    my site is here
    https://drlab.digitalrenewal.com/SEOtheme/

    Thanks!

    This code works so nicely.

    I used the archive.php to create the category.php template, and just pasted the code after my title (i removed the_time) and before the_content.

    it created the right size thumbnail, left aligned it and everything.

    THANKS!!!!

    heres the whole code i used, looks pretty cool:

    <?php while (have_posts()) : the_post(); ?>
    
    <div class="category_post">
    
    <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    
    <?php
    	$images = get_children(
    	array(
    		'post_parent' => $post->ID,
    		'post_status' => 'inherit',
    		'post_type' => 'attachment',
    		'post_mime_type' => 'image',
    		'order' => 'ASC',
    		'orderby' => 'menu_order'
    		)
    	);
    
    	if ( $images ) {
    		$count = 1;
    		foreach ( $images as $id => $image ) {
    			if( $count === 1 ) {
    				$img = wp_get_attachment_thumb_url( $image->ID );
    				$link = get_permalink( $post->ID );
    				print "\n\n" . '<div style="float:left"><a href="' . $link . '"><img src="' . $img . '" alt="" /></a></div>';
    			}
    			$count++;
    		}
    	}
    ?>
    
    <?php the_excerpt(); ?>
    <a href="<?php the_permalink() ?>"><span style="color:#cc0000">read more</span></a>
    
    <p class="cat_meta"><?php the_time('M j y') ?> | <?php the_tags('Tags: ', ', ', ''); ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    
    <br style="clear:both" />
    
    </div>
    
    		<?php endwhile; ?>

    AND HERES MY CSS:

    /* category page template style */
    .category_post {border:1px solid #eee;
    		margin:20px 0; padding:20px;
    		font-size:14px; line-height:18px;  }
    
    .category_post h3 {padding-bottom:10px;}
    .category_post img {margin-right:20px;}
    .cat_meta {font-size:11px;}
    .cat_meta a {color:blue;}

    thank you tgiokdi!!! ive been trying to figure this out for 2 days. i knew it had to be simple, it built right into worpdress 2.8, but i couldnt get anyones code to work. ?? im cartwheel happy!

    i was hit with this one too, pretty bad. as i design sites and build custom themes, many of my clients were hit as well. avast antivirus (free) is really good at picking up this particular virus on your machine and through firefox.

    thanks kikolani, for your post. looks like i dont have to delete entire installs anymore ?? phew!

    also, I found 2 plugins that might help to secure wp better.
    Secure WordPress for the basics and User Locker to guard against brute attacks.

    best of luck to everyone, this virus is a pain in the rump.

Viewing 15 replies - 61 through 75 (of 80 total)