The tag has no wiki summary.

learn more… | top users | synonyms

8
votes
1answer
614 views

From a security standpoint, should bloginfo() or get_bloginfo() be escaped?

I've been reviewing a lot of information about WP theme and plugin security and understand the concept that you should escape attributes and HTML values in themes and plugins. I've seen bloginfo() and ...
7
votes
1answer
7k views

get_template_directory() vs bloginfo( 'template_directory' ) vs TEMPLATEPATH

I was reading this article: Common WordPress Development Mistakes and How to Fix Them, and in it, they author says: Getting the theme location: If you are using TEMPLATEPATH or bloginfo( ...
6
votes
4answers
6k views

What is difference between get_bloginfo('url') and get_site_url()?

I am developing a plugin. I want to know difference between get_bloginfo('url'); and get_site_url(); I got same output, then what's the difference?
4
votes
3answers
166 views

bloginfo() vs get_option?

What's the difference between: bloginfo('name'); vs get_option('blogname'); The parameter is just an example, but I see no differences in terms displaying what I want. Are there any particular ...
4
votes
3answers
4k views

Difference between bloginfo('home') and home_url() and site_url()

I have been reading through Codex and other SO and SE posts regarding this. But I am confused. I used home_url() and site_url() to linking the site's home and it gave same results. As I was using ...
2
votes
1answer
149 views

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', ...
2
votes
1answer
310 views

Right way to add HTML bloginfo name using a filter

I would like to style parts of bloginfo name from a filter. The only thing I want to do is change the site-title of the blog to include HTML so that I can do individual font-settings on part of the ...
2
votes
2answers
196 views

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 ...
1
vote
1answer
2k views

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="<?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 ...
1
vote
1answer
71 views

sprintf bloginfo odditie

Why the disco funk this is happening I can't quite put my finger on - but I guarantee you it's because I'm probably missing some simple PHP best-practice: <?php echo '<h3>' . ...
1
vote
1answer
467 views

Access bloginfo, get_option, and plugins_url from a non-core php file

I am creating a plugin that has a php file in the plugin directory which is accessed directly via a custom rewrite url. I need this file to be able to use the three functions mentioned in the title. ...
1
vote
1answer
47 views

Change “en-US” to “en”

Hey I am trying to edit the WP theme files, and I am using bloginfo('language') to get the language of the page. However, it returns me "en-US", which does not work while redirect the page. The site ...
0
votes
2answers
1k views

if not empty bloginfo('description')

Can someone tell, how to check whether it's empty? <?php bloginfo('description'); ?> Something like: <?php if (!empty bloginfo('description');) ?> Thanks a lot.
0
votes
3answers
2k views

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. ...
0
votes
5answers
8k views

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" ...
0
votes
1answer
26 views

Wordpress address URL and bloginfo

I have updated my Wordpress Address (URL) and Site Address (URL) to be https:// in the General Settings of Wordpress as I have added a secruity certificate to the hosting. Should the css url ...
0
votes
1answer
106 views

How to call for bloginfo inside function in functions.php?

I am new to WordPress and PHP, so I have this question: I want to add a Link to the "New Post" for a Custom Post Type I implemented. But it will only let me put static links, connected to my ...
0
votes
1answer
319 views

Proper syntax for simple conditional bloginfo language

I need to do something like this: <?php $bloginfo = get_bloginfo( 'language' ); if($bloginfo->en-US){ the_time('jS F Y'); }else{ the_time('d/m/Y'); }; ?> I cant find the proper ...
0
votes
2answers
873 views

Wp Enviroment problem with included file

i have a file i am including across site to index.php, single.php etc. This file behaves really strage and acts like it not part of wordpress Enviroment meaning: i get errors on ...
0
votes
2answers
26 views

Need help with page title (Static front page)

I need some help with the code to put inside the <title> to generate the following: Static front page: Should just be the bloginfo('name') All other pages: Should be wp_title() | ...
0
votes
1answer
24 views

get_bloginfo prints IP instead of url

I just recently moved a site to another production environment and I seem to have missed some setting in the db config as a lot of the built-in functions prints the IP instead of the url. Ideas? Tried ...
0
votes
1answer
94 views

How do I change the login logo URL and hover title?

I am trying to change the login logo URL and hover title. I am using the code below but return bloginfo('url'); and return bloginfo('name'); aren't outputting the desired href and title. I'm also ...
0
votes
1answer
326 views

How to set base url for php widget

SO, I have some php that I'm inserting into a widget that generates a list of pdfs within a directory on the root level of my wordpress install (see "Meeting Summaries" to the right here: ...
0
votes
1answer
45 views

How to make title for home to be News, but if page has parent then its name else just post/page name

Made own template from scratch and tutorials. This is showing description of post/page Title and in home its showing website name. <h3><?php is_home() ? bloginfo('description') : ...
0
votes
1answer
212 views

Bloginfo hook - can it be more precise?

From the codex, regarding filter hooks: bloginfo_url applied to the the output of bloginfo("url"), bloginfo("directory") and bloginfo("home") before returning the information. Is there a way I ...
0
votes
1answer
235 views

Wordpress function bloginfo not echoing output on parts of the pages

I'm having a bit of a problem with the bloginfo() function in Wordpress which I've never had before. Normally I use <?php bloginfo('template_directory'); ?>/rest of image link here but for ...
0
votes
1answer
735 views

CSS images don't show up with bloginfo

I'm new to WP and PHP and I'm trying to convert my 'old' HTML theme into a WP theme. I created my index.php page and linked it to the style.css. I have some images in the css and, from what I've read, ...
0
votes
3answers
1k views

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 ...
0
votes
1answer
146 views

Header Link function not working. Problem with bloginfo()

I'm writing a function to make all of my header images link to their respective home pages. I wrote this function: function get_category_location(){ $header = get_category_header(); ...
0
votes
1answer
40 views

Inconsistent bloginfo information

I'm doing a little bit of work on a theme I just inherited from another developer. The site just broke, and I'm trying to fix it. You can see the site here: www.bowlingventures.com What's happening ...
0
votes
0answers
81 views

How to give dynamic url path in widget?

I have a widget and give link to some text within it like href="http://www.netattingo.com/dev/imc/" as it is static path in widget but when I try to to use "site_url" or "bloginfo". It does not work. ...
0
votes
0answers
24 views

Cookie free site

I have followed directions to make my wordpress cookie free. I've made my subdomain, pointed to my php folder and now I'm stuck. What am I suppose to do with this: bloginfo ('template _directory') ...
0
votes
1answer
61 views

Access from template info of another blog (in the same network)

In my root blog (1), i have a custom post type that can be linked to an existing blog of my network. It does so by recording in post metas the ID of the blog it is linked to. I use _blog_id as a name ...
0
votes
1answer
25 views

How can I include a file related to blog URL? Nothing seems to work

When I was building my website locally using WAMP, I was just using simple include '/extras/file.php'; Of course, that would start at the root folder, and look in the extras folder. However, now ...
0
votes
1answer
61 views

Blogname and Blogdescription in Pagelines DMS Options Panel

I am attempting up set up a front end options panel in the pagelines-dms framework, from which users will be able to change the blogname and blogdescription. So far I have set up the form which has ...
-1
votes
2answers
274 views

Are get_bloginfo queries cached to start, or should they be cached?

I was just wondering if calling get_bloginfo too many times was going to harm performance in a theme and if the data should just be put into its own var?
-1
votes
1answer
94 views

WPMU - How to echo only one URL

I have this code that I am using on a site to check if the current user has a blog on the our wp network and as of now it is echoing the URL for both the main site and their blog. I would like to ...