attachment page template? only show attachments for current post?

The attachment.php is a specific template in the WordPress template hierarchy. WordPress uses it for a specific purpose, and the default Loop just won’t do what you’re claiming it’s doing. (The behavior you’re describing would be analogous to the single.php template file looping through all Posts.) I’m guessing your attachment.php template file has a custom … Read more

Where to call my pagination function?

If you added the pagination() function to your functions.php, you only have to call it in your theme files. Which file depends on where you want to display it, see the Template Hierarchy for details. You don’t want to call this inside The Loop (between the while () {} or while : … endwhile;), because … Read more

Help with WordPress function inside a shortcode

It looks like you’re using a php tag within a php tag. I’d try something more like this… <?php echo do_shortcode(‘[button type=”square” color=”black” size=”small”] Posted by ‘.get_the_author().’ [/button]’); ?> or something like this… <?php $shortcode=”[button type=”square” color=”black” size=”small”] Posted by “.get_the_author().’ [/button]’; echo “do_shortcode(‘$shortcode’)”; ?>

Latest Foursquare Checkin function

Here is a solution for you: First download this nice little class Next, include it and “login” <?php require_once ‘foursquare.php’; //Load the foursquare class $foursquare = new fourSquare(“username”, “password”); //login Then to get the venue’s name use: <?php echo $foursquare->venueName; ?> you can also get the venue’s type,venue’s icon, venue’s location on the map and … Read more

functions.php and conditional tags

functions.php is part of the loading process and way too early for conditional tags to work reliably. Any conditional logic should be hooked to and executed no earlier than template_redirect hook. For scripts on front-end wp_enqueue_scripts is appropriate hook.