2022 Developer Survey is open! Take survey.

Questions tagged [bloginfo]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

The rank mathe plugin's FAQs are not appearing in my website?

While posting many posts inside my blog, the fax section of the rank forehead is not coming in it. You can see this link Paise Kamane Wala App of mine.
user avatar
0 votes
1 answer
157 views

I have a background-image in css file but don't show in site.how to fix this prblm. i sent screenshot. thx

lock at the pic dont show the background-image. i try this but not working.... background-image: url("/assets/Logo.png"); how can i fix this prblm. plz give me the solution. Thx.
user avatar
0 votes
3 answers
338 views

how can i load svg image with get_template_directory_uri() or bloginfo('template_url')

<img alt="Capital" data-inject-svg src="<?php bloginfo( 'template_url' ); ?>/assets/img/logos/imglogo.svg"> <img alt="Capital" data-inject-svg src="<?php echo ...
user avatar
0 votes
2 answers
185 views

How can I get blog content from SFTP?

I inherited a site that was compromised (I'm not sure what version of wordpress, the crash happened last summer). I have CLI access, and can SFTP into the server. The only thing I want to get is the ...
user avatar
1 vote
1 answer
856 views

How can I use get_bloginfo('admin_email') in a custom PHP file?

How can I use get_bloginfo('admin_email') in a custom PHP file located in the parent theme root directory? I've built a custom form and a PHP mail script separately, but now I'd like to send the form ...
user avatar
0 votes
3 answers
436 views

What is the difference between the different ways of linking stylesheets

I'm only just learning WP theme development so this may be a very stupid question, but I have noticed there are different ways to link to the main stylesheet from the index.php: <?php bloginfo('...
user avatar
  • 29
1 vote
4 answers
48 views

Still relevant method of embedding images in WP Theme in 2018

<img src="<?php echo get_bloginfo('template_url') ?>/images/logo.png"/> Is the above still a relevant method of embedding images in the Wordpress theme or an obsolete? If obsolete then ...
user avatar
0 votes
1 answer
104 views

How can I change the background color of a contact box? [closed]

I want to change the background color of this example contact-box but I haven't been able to do so.
user avatar
  • 3
0 votes
1 answer
429 views

Form action unfamiliar

I am refactoring some code in the header.php: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://...
user avatar
  • 331
0 votes
1 answer
6k views

How to add dynamic content in title and meta description in wordpress theme for homepage, post page, category, tag and pages

I am creating wordpress theme and want to get and display dynamic content for my theme Title Tag and Meta Description Tag. For Title Tag Content: I want Title For Meta Description: I want Bloginfo('...
user avatar
0 votes
1 answer
251 views

Split site title and apply different classes

I'm currently designing a theme using Underscores and I want to do something like this with the site's title: Thisisthetitle So the title is all one word and the last five characters are different ...
user avatar
1 vote
1 answer
669 views

php syntax - how to concatenate properly - echo bloginfo('stylesheet_directory)

This is driving me batty. Is my syntax wrong? Why is the first "." in my img src call throwing out an error? This works if I put a hard link in the img src call, FYI. <a class="blog-image" ...
user avatar
0 votes
2 answers
1k views

Should I use get_bloginfo('stylesheet_directory') or get_stylesheet_directory_uri() when enqueueing my js files?

I am using a Genesis theme (digital-pro), and inside of the front-page.php file (companion to functions.php) I am noticing that js files are enqueued in two different ways. Example 1: ...
user avatar
0 votes
1 answer
65 views

Filter the blog's title without using global variables

The below code uses the bloginfo filter to add some CSS rules to my blog’s title and outputs it to the site header, without affecting the HTML head’s <title> tag. This solution was taken from ...
user avatar
  • 1,081
2 votes
2 answers
275 views

Filter the blog title displayed in the header

I wanted to filter the blog title displayed in the header to apply different CSS styles to different title parts/words, so I added the below function to my (WP 4.7) Twenty Seventeen child theme's ...
user avatar
  • 1,081
0 votes
1 answer
37 views

Using bloginfo and divs inside a php file

The following code is inside a .php file and works; however, I do not know how I can replace the TEXT with a bloginfo('template_directory') to an internal image file. I've search the forums but I ...
user avatar
4 votes
3 answers
665 views

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 ...
user avatar
2 votes
1 answer
1k views

Is it possible to change the template_directory?

I've created a site on a localhost that is going to be migrated to a ssl server, with the scripts, css, images all coming from a CDN. To call files in the site i'm using bloginfo('template_directory')...
user avatar
0 votes
1 answer
4k views

Change the meta description on a specific page?

I want to change the title and meta description on my homepage if it's opened on an android phone. I have this code that changes the title, inside functions.php: /** Modify the front/home page ...
user avatar
  • 255
0 votes
2 answers
3k views

Correct way to hardcode an image into a parent theme file?

I wanted to ask if ths is the best practice for calling an image into a parent theme file by using bloginfo('template_directory')? <img src="<?php bloginfo('template_directory'); ?>/img/logo....
user avatar
  • 451
0 votes
1 answer
177 views

Custom Info Box at end of posts?

I'm pretty new to WordPress so there are some parts of it I have difficulty working with. I run a small scale gaming niche website which focuses on just a small group of video games, and what I'm ...
user avatar
  • 1
1 vote
1 answer
258 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 ...
user avatar
0 votes
2 answers
839 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() | bloginfo('name'...
user avatar
0 votes
1 answer
273 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 ...
user avatar
0 votes
1 answer
168 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 ...
user avatar
6 votes
2 answers
10k 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 ...
user avatar
  • 1,159
0 votes
1 answer
104 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 ...
user avatar
  • 101
0 votes
1 answer
37 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 I'm ...
user avatar
  • 297
0 votes
1 answer
496 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 ...
user avatar
4 votes
3 answers
1k 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 ...
user avatar
  • 313
0 votes
1 answer
92 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 ...
user avatar
  • 51
0 votes
1 answer
1k 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: http://mt-...
user avatar
  • 142
0 votes
1 answer
179 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') : wp_title('')...
user avatar
  • 115
1 vote
3 answers
27k 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. ...
user avatar
0 votes
1 answer
512 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 can ...
user avatar
  • 371
4 votes
3 answers
7k 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 ...
user avatar
  • 190
12 votes
1 answer
3k 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 ...
user avatar
-1 votes
1 answer
135 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 know,...
user avatar
  • 176
3 votes
1 answer
4k 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 ...
user avatar
16 votes
1 answer
29k 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( '...
user avatar
2 votes
1 answer
609 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', 'default_image'...
user avatar
  • 223
0 votes
1 answer
2k 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 ...
user avatar
  • 265
1 vote
1 answer
742 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. ...
user avatar
  • 284
1 vote
1 answer
1k 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 ...
user avatar
0 votes
1 answer
3k 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, ...
user avatar
  • 3
3 votes
5 answers
33k 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" href="<?...
user avatar
2 votes
1 answer
784 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 ...
user avatar
  • 973
0 votes
2 answers
2k 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 get_bloginfo('...
user avatar
  • 2,714
1 vote
1 answer
107 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>' . sprintf(__('...
user avatar
  • 1,873
0 votes
2 answers
4k 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.
user avatar