bloginfo(‘template_directory’) img src

I am lazy loading some images with URLs which are added via custom fields. The lazy load plugin I’m using requires a place-holder image in the src attribute and the actual image in data-original. http://www.appelsiini.net/projects/lazyload I need the image height and width as well, so I’ve been using wp_get_attachment_image_src(). My problem is using bloginfo(‘template_directory’) to … Read more

How do I create a dynamically-updated copyright statement?

I’d like to find an optimized, WP_Query-safe method for generating a dynamically-populated copyright statement for the bottom of my themes. That is to say, I’d like to check the date (by year) of my oldest and newest posts and then output something along the lines of [blog name] © [oldest post year]-[newest post year] [primary … Read more

How to use bloginfo( ‘template_directory’ ) in array

I want to pass bloginfo( ‘template_directory’ ) in an array I tried this but not working. How to write it correctly? <?php get_the_image( array( ‘size’ => ‘full’, ‘default_image’ => bloginfo( “template_directory” ) .’/img/dflt.png’, ‘image_scan’ => true, ‘link_to_post’ => false ) ); ?> get_the_image is a function from Justin Tadlock plugin 1 Answer 1 bloginfo() is … Read more

How to use tinyMCE for user “biographical info” without messing with any core file?

I noticed when you typein the user’s “biographical info” on the profile, it shows up in one page! Looks really terrible. So: Is there a way to use tinyMCE or other solution for user “biographical info” without messing with any core file, and without any plugin? Thanks a lot. 5 Answers 5 Not sure if … Read more

bloginfo(‘stylesheet_directory’) vs. get_stylesheet_directory_uri() and include(‘file.php’) vs. get_template_part()

In my custom theme I’m using <img src=”https://wordpress.stackexchange.com/questions/75970/<?php bloginfo(“stylesheet_directory’); ?>/images/logo.jpg”/> to load my custom logo. I’m using a custom sidebar for front-page.php and that’s why I used <?php include(‘sidebar-front.php’) ?> to get it. But when I’m using the ‘theme-check’ plugin it’s suggesting to change the following: bloginfo(‘stylesheet_directory’) to get_stylesheet_directory_uri() include() to get_template_part() So, I did … Read more

get_template_directory_uri() and other URL tags not working in theme

So, I’m trying to add get_template_directory_uri or bloginfo() to my header.php file to create relative paths for the CSS and JS files in the theme. E.g., <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/46261/<?php echo get_template_directory_uri(); ?>/css/style.css”> In theory this should show <link rel=”stylesheet” href=”http://mysite.com/wp-content/themes/myTheme/css/style.css”> Problem is, when I view the <head> tag in source all I see is: <link … Read more

Is there a blog info object?

The functions get_bloginfo() and bloginfo() both return information about the blog but accessing it each time seems unnecessary. Is there a function that will return the bloginfo as an object with properties? More Info: I have tokens in my markup and I want to replace those tokens with the blog info. Since I’m replacing tokens … Read more