Most WordPress functions, that generate output, do echo that output by them self. But all those functions are just wrappers for the accordingly get_*-functions.
In your case its bloginfo() and get_bloginfo(), where the second returns the output, so you can use it for whatever you like.
Related Posts:
- To close or not to close php
- How does printf( __( ) ); work?
- Return HTML Template Page with PHP Function
- Why do templates contain so many PHP tag pairs?
- Edit tag cloud widget number
- Is there a way to parse shortcodes in PHP?
- How to automatically apply woocommerce product title to all product images alt tags?
- Displaying a WooCommerce product via PHP
- What exactly does “Posts page” do in WordPress?
- Check if a menu is empty?
- remove tags from posts in php
- Static Frontpage Pagination – Custom loop
- Get the php template file from other theme folder
- WordPress Template Engine?
- How to have a custom display for both woocommerce archive and product-category pages? [closed]
- wp_remote_get returns an error for valid URL
- tag search using WP_Query
- On this day PHP code
- How to loop over custom fields in a page template?
- Blank on static home page?
- WordPress theme & site not loading after moving files
- show limited tags in an article
- Adjust the results quantity for Search Results page pagination
- display most popular tags in two columns
- Exclude pages with certain template from wp_list_pages
- Use Timber/Twig to pull an image by image ID [closed]
- Categories Template Assistance
- How to add a post or page tag to the list of classes appearing in the body tag’s class attribute?
- Is it possible to use the featured image of a page as a css background without inlining?
- Displaying Only Certain Tags in Loop
- Unable to set right time in admin and frontend template
- Easiest way to show total number of subpages
- query if on page/2/?
- Switching between custom templates in a post type of the admin menu
- Use template for posts with a particular category grandparent
- Blank space at beginning of tag?
- Highlight Current Tag in wp_tag_cloud
- Placing the_content inside shortcode not working
- Link to file in plugin directory from wordpress template?
- Password protecting content in custom template
- Add relevant tag to search results
- How to override wp-admin styling
- Must Use Plugin Causing Query Error
- Change WooCommerce template for PDF – access to custom field
- How to display last whole post on the homepage
- missing admin bar and widget in a template
- How to include a function in a template with template tag
- View tag description on page
- What syntax is this? “{{post.price}}”
- My own theme’s custom widget areas are not working
- Display tag links on archive page?
- How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?
- Using Tag Groups: Displaying groups and adjacent tags of current post
- Show content by using tags
- How to associate dynamic PHP page for chosen WordPress tag?
- Get a list of tags present in a paged front page
- How do you change the tag font size in the repeater-template.php [closed]
- PHP tag in post content makes wordpress go crazy
- Add Alt attribute to image served with php
- Notify admin (by email) if post added with specific tag
- Display product attributes for current product
- Add point on excerpt post
- How to only fetch certain Tag ID’s
- WooCommerce – Print Processing orders [closed]
- Loop returns more items than exist?
- Access methods in plugin template
- Create dynamic content from one WP page to multiple other pages
- How to call a certain object/menubar in a PHP file
- A Space being added to url generated by custom plugin
- Insert wordpress tags below posts via functions.php
- Problems With Query and/or Template Part and/or PHP
- Using tag to output text in Genesis?
- Is there a way to randomize and connect a background and header image?
- WordPress – show all posts + ones with specific tag
- why is this content-template not showing any of my blog-entries?
- how to register a second page-template
- why is markup routinely placed in functions in wordpress?
- PHP code rendered in HTML
- Odd page behaviour after removing sidebar
- get_permalink returning first letter
- Custom Archive Page
- If I define a variable in header.php, how do I make it available to templates?
- How to refresh a template page on WordPress in 3 seconds – easiest method?
- Php echo into tag
- php “use” not working in template [closed]
- Change background image based on tags
- Exclude specific product tags from related products in WooCommerce 3+ [closed]
- Loop on a wordpress Page instead of content coming from the WP text editor
- Twig+WordPress how to use array arguments inside a function?
- How to implement a custom sliding banner? [closed]
- how to loop through blog posts in php
- The search doesn’t work properly
- How can one use variables in a template or template part without polluting the global scope?
- Need Help With Making Full-Width Template for Blog Posts (common methods aren’t working)
- Count post with tags within one category?
- Getting checkboxes for some tags in a search box
- How to change product title color in shop page if product has specific product tag (Woocommerce)?
- How to edit templates created in the block editor in code / template files not updating
- WordPress post-template null warnings
- AJAX Appending Data Adds Mystery “0” :(