Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter veevee

    (@veevee)

    …Kind of…
    After calling the plugin a second time, the pin it button sometimes flickers when you hover over it. I’m guessing it has something to do with the mousein/mouseout set Intervals. I tried removing all instances of the button when calling the plugin a second time and then replacing them (like what you worked out for window resize). But that doesn’t seem to have any effect. Still trying to figure that out, I made a work around that’s basically just a slow animation out before the button gets removed, but I’ll need to find something to fix that flicker. Let me know if you have any ideas? Thanks

    Thread Starter veevee

    (@veevee)

    Resolved.
    I created a jQuery function to encapsulate the pin-it plugin’s setup and bound that function to the events I needed as well as document.ready. It seems like it would be too much to bind that to a generic event so that the plugin could be recalled whenever.
    That way I wouldn’t need to avoid updates too 🙂

    Changes on lines 1-16 of script.js

    ;(function($){
    	"use strict";
    
    	var jpibfi_debug = false;
    
    	$(document).ready( function() {
    		jPinit();
    		$('.post').bind('RMRHContentExpanded RMRHContentCollapsed',function(e,data)
    		   {
    		     jPinit();
    		       // return false; // prevents event from bubbling up the DOM
    		   });
    		});
    		function jPinit(){
    		var settings = {
    			pageUrl        		: document.URL,

    Thanks! Very very helpful

    Thread Starter veevee

    (@veevee)

    thanks eric! Yeah whooami, I like that light box script because when it fails, it fails so well. Even people without js still get the content, just none of the js behavior. People who do turn off their java probably do so for those exact reasons, they want to view the web content, but are annoyed by sites with excessive behavior.

    Thread Starter veevee

    (@veevee)

    Or comments about the design too. Did i need to say that?

    Forum: Fixing WordPress
    In reply to: Google Image

    make sure that WP is writing an alt for each image. The alt is one the main ways a search engine indexes an image

    Thread Starter veevee

    (@veevee)

    It’s so easy to be friendly.

    Thread Starter veevee

    (@veevee)

    Oh, you’re right, it’s called “page.php” sorry for the confusion. So I have a landing page. It appears at the root of my wordpress site. I also have a Page called ‘map’. I want the content that appears on the landing page now to appear on the ‘map’ page, and the content that appears on the map page to appear on the landing page.

    I know about using a Page as the front page, but that only solves half of the problem. Once I set my ‘map’ page to be the front page, I still need a way to display the content that’s called by index.php.

    Thread Starter veevee

    (@veevee)

    Wow. Just like actionscript. That works like a dream. Really I’ve never had an easier time with php. So this is what I ended up with:

    <?php
     global $post;
     $myposts = get_posts('numberposts=1&offset=0&category=4');
     foreach($myposts as $post) :
     setup_postdata($post);
    
     function the_category_count( $cat_id ){
    	$o = wp_cache_get( $cat_id, 'category' );
    	print $o->count;
    }
    ?>
    	<li>
    	<a href="<?php the_permalink() ?>" rel="bookmark">Drawings(<?php the_category_count(4); ?>)		</a>
     	</li>	
    
     <?php endforeach; ?>

    So I already had the global $post part help me link to the most recent post in a category. I just added the count function to that and then called the function below that. The number in the paren refers to the category id. And even though i need to repeat the global $post code for every single link i make, I only needed to use the count function once. Seamless mfields, really really good.

    Thread Starter veevee

    (@veevee)

    Okay, so this is what I have; using the php to show recent posts, I use the the_permalink in an <a href> tag instead of the_content

    <div>
    <?php
     global $post;
     $myposts = get_posts('numberposts=1&offset=0&category=5');
     foreach($myposts as $post) :
     setup_postdata($post);
     ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    	<a href="<?php the_permalink() ?>" rel="bookmark">Drawings</a>
    
    </div>
     <?php endforeach; ?>
    </div>

    This will make a link to the latest post in category #5 (see that, on the 4th line?) and display a link titled Drawings. This works for me because i only have 5 categories. If I constantly wanted to add categories, it would be annoying to paste this code over and over. Maybe someone can figure out a way to do it dynamically…

    veevee

    (@veevee)

    This is great, adapting it to be just a link to the most recent post, does anyone know how to specify only one category?

    veevee

    (@veevee)

    Yeah, but badaas, how do you link dynamically to the latest post. Not the post list, but the single of the latest post. Further, how would you link dynamically to the last post in a given category?

    veevee

    (@veevee)

    You would need to build a custom php page that could echo content from the database that wordpress is writing to.
    Not worth it.

    My recomendation is to make a wordpress page, like an about page or something you aren’t using for your blog, cut out all of the wordpress calls except for the recent posts plugin (there are a couple out there), and put all of the regular static html content back in it. If you apply the same css to that page as to the rest of your non-wp site, users will only be able to tell that its a part of your blog by looking at the address.

    That make sense? I didn’t do a very good job of explaining.

    veevee

    (@veevee)

    Hmmm, that’s really really close evaneckard, but for some reason, when I pasted this code in, my prev post, next post calls stopped generating links, and now ALL of my permalinks link to the latest posts. A fix anyone. I would also love it if anyone knew how to make this link to the most recent post in a specific category.

    veevee

    (@veevee)

    Okay, keep it productive.

    A link would be really helpful. IE isn’t really standards compliant, at all, also, different browsers calculate widths and percentages differently.

    The good news is, there are a ton of work arounds out there to use one style for IE and another for all the other browsers, but you need to isolate the problem in the code first, before you can work around. For help with that, we really need a link.

Viewing 15 replies - 1 through 15 (of 16 total)