If you want to wrap an HTML tag around the user display names, you can simply close and open the PHP tags:
<div class="author_sidebar">
<?php if ( is_singular( 'post' ) ) { ?>
<div class="foo"><?php echo get_avatar( get_the_author_meta( 'user_email' ), 75 ); ?></div>
<div class="bar"><?php echo get_the_author_meta( 'display_name' ); ?>
<?php } ?>
</div>
Related Posts:
- How to add a post or page tag to the list of classes appearing in the body tag’s class attribute?
- 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
- How to only fetch certain Tag ID’s
- How do I make an HTML table from a database table?
- How to get the custom header image’s alt text?
- Modify previous and next text from pagination links
- Edit tag cloud widget number
- Correct regex for wp_embed_register_handler
- WordPress custom taxonomy description for each post?
- Calling a method from functions.php on a click of a button
- Conditional statement for parent, child and grandchild pages
- Two posts in same div – WP loop
- WordPress Wysiwyg Content not being displayed
- HTML table from shortcode with multiple parameters
- To echo or not to echo?
- Correct syntax to html php conversion
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- How Display Posts on category
- ACF page while loop breaks footer while loop
- Getting a specific post values to another div or modal
- search and replace preword from author
- Embed html in php code
- WP grandchild categories in nested ul li
- Customize position of social icons in upme plugin [closed]
- Settings API callback function inserts html quotes from nowhere
- How create a Shortcode with hover and complex options
- WordPress Multiple Navigation bars
- Position banner to right of logo in header – messed up my header file
- How to separate HTML and WordPress files
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Make PHP work with HTML tags
- Syntax error when I try to insert my loop into an unordered list? [closed]
- How to make modifications only to certain elements of an HTML string on the server-side?
- Function returns text instead of html [closed]
- Printing HTML codes
- How i can get post data from database when i am getting post id from url in wordpress
- How to retrieve the data from the sever and displaying it in a page?
- How to execute html code inside php?
- Trying to prepend a Hashtag symbol to the_tags links [closed]
- stripping tags from excerpt in WordPress is not working
- wp_insert_post() with HTML tags using PHP
- Where can I find the inline-css of my theme header?
- Make textarea required. Help [closed]
- Remove   from the_excerpt
- Website completely messes up when logging out
- Calling PHP Titles inside Javascript Markup
- How can I use custom menus with a Bootstrap WordPress theme?
- Querying for specific tags
- Limit tags shown in post
- Replacing WordPress Icons (menu,icons32, etc)?
- remove specificly the last tag in all posts
- html form: redirect page after form completes submit function and posts data
- HTML Form Question
- WordPress Post Block Element not properly parsed with the_content filter
- Tag title not being returned in page title of tag archives
- Hide A Class and Add Custom HTML Code Using WordPress
- Add other class content with reference class value
- Configure WordPress to Use Responsive Image Rendering
- How to use data URL in WordPress?
- HTML comment cause issue in functions.php script root
- Slug duplicates once clicking on link
- Remove span tags from WooCommerce Downloads page
- How to find and delete a menu item in php?
- My single.php page skips the first div tag
- Custom woocommerce payment gateway – Form
- opens like sitename.com/URL
- WordPress Slider is not working
- How to display post meta bellow every posts
- Make a full-width wordpress page
- Display child-page links in sidebar on both Parent Pages AND Child Pages
- Switch position of elements in the footer [closed]
- Add Text Area To Child Theme’s Home Page
- Can’t get_users info by using json_encode
- scroll scrpit to particular button position to next id when click button
- Using Tag Groups: Displaying groups and adjacent tags of current post
- Show content by using tags
- Code works on page-example.php by not category-example.php
- how to remove replicating a tag inside loop?
- Notify admin (by email) if post added with specific tag
- How to add thumbnails from recent posts to owl-carousel in wordpress automatically?
- WordPress HTML Helper
- A Space being added to url generated by custom plugin
- echo variable containing html and the_permalink();
- Is there a way to randomize and connect a background and header image?
- Trying to customize wordpress drop down categories
- get_post_meta is always empty when I use wp_mail
- Implement “No related posts for this entry” into the loop?
- ACF repeater image in video poster with jquery
- Advanced Custom Fields Show PHP in Text Areas
- Sorting Problem
- The search doesn’t work properly
- Load wp_editor on button click
- Add topbar to static html page
- ‘This Field is Required.’ is Not Displaying on CF7 [closed]
- Why do I get a 404 error on my custom post type archive pagination?
- change div text and link for logged in users
- Font Awesome Icons as squares [closed]
- How to modify default tags in wp_head()