The is_single is WordPress function so you should add parentheses after it as displayed in the following correct code.
<?php if ( ! is_single() ){ ?>
<meta property="og:image" content="<?php echo get_template_directory_uri(); ?>/images/image.png"/>
<?php } ?>
Related Posts:
- Functions.php: If its single?
- Best way to programatically add “rel” attributes to page and post images
- Add caption functionality to custom WordPress theme
- get_terms (or tax_query) for term of current post?
- Best way to disable sidebars on posts (only)?
- Insert a field with PREG_REPLACE – strange behaviour
- I would like single.php to act just like index.php
- How to display different blocks for mobile and desktops
- Using AJAX on frontend: Synchronous XMLHttpRequest deprecation except for admin role
- Is it ok to use a function to output the text domain name in a wordpress theme
- How to override a function when isn’t at functions.php
- contactform7 remove tags with “wpcf7_autop false” from functions.php
- How to count number of functions attached to an action hook?
- Show modified time if post is actually modified
- ajax live search for post title
- Hourly Routine Not Firing ( wp_schedule_event() )
- How to get an array of menu items from the toolbar?
- Using get_terms for custom taxonomy in functions.php
- Fatal error: Call to undefined function add_action() – an untouched problem
- echo or print_r in an admin function
- Editing or filtering the output of the Genesis navigation
- Automatically Add Specified Value to Attachment Metadata upon Upload
- Twenty Eleven Child theme error when attempting to use a rewritten function
- is_plugin_active() not properly returning true
- Display gallery on top before content
- List of Body Classes Generated by body_class()
- is_dynamic_sidebar always returns true while using Jetpack visibility
- wp_trash_post function to only apply to posts, not pages!
- Redirect specific page in WordPress for first time visit
- Adding widget to dashboard with wp_dashboard_setup not working
- qTranslate in functions.php
- Using Schema with `the_excerpt`
- Image rotation fails to regenerate custom sized thumbnail
- Register and load scripts
- Display alert on successful user Sign Up
- Getting different functions data while using while loop in wordpress
- How to rewrite the custom url in wordpress?
- About cron delete user with meta_key
- Set spesific size of featured images
- Excerpts are not displayed by a shortcode on category pages
- Getting comment count per post not working
- Functions.php Problem
- It does not work concatenation in function.php
- edit formatting.php in a theme so it wont get overwritten
- Retrieve a value from Yoast SEO to use to set a default twitter card image honoring overrides
- Get arguments from URL
- Adding javascript to functions.php causes problems with my template
- Where do I store custom functions that call custom page template files?
- Excerpt for pages not showing
- Can’t Write Custom Widget Code In One ECHO
- Got white blank page after copying the functions.php to child theme
- How to Extend login session times to a Month
- Insert nofollow in a “Powered By” link, except in the homepage [closed]
- Image loading function not working on archive.php template
- How to add array [closed]
- what is best way to keep track of changes made in wordpress website? [closed]
- remove_action not working, even after changing priority [duplicate]
- Is this an acceptable practice for WordPress theme development?
- Add a class to post if it has been recently updated
- Change custom featured image size in twentythirteen child theme
- Theme Customizer – Custom Sections Display, but do Nothing
- how to add_filter to non hook function
- WordPress comment processing . Default unapproved comments detection before posting
- Custom image sizes showing in Classic Editor only when upladed directly to post
- Members only function, but allow account activation [solved]
- Remove nofollow from internal comment links via functions.php
- Allow logged in user to view a Page, else send to login screen and then redirect back to Page
- How can I automatically delete comments that contain a URL?
- Run function for specific user only
- Appending „read more” to the excerpt conditionally
- Why is the term of my current page not returning a slug?
- Override plugin function to show invoices even if not logged in
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- Conditionally apply css for a specific template part
- Serving cache from multiple domain names
- Fatal error: Call to undefined function. Underscore me
- Why am I losing image quality on my site?
- Replace image attributes for lazyload plugin on image elements with specific class
- How to disable site title and description when custom header is uploaded on the customizer?
- Custom shortcode with do_shortcode and substr
- How to run a function when publish posts? [duplicate]
- What is wrong with functions.php? Fills error log with same error
- Function returning queried meta value based on current post ID
- Adding custom field in menu options [duplicate]
- Function the_content
- Random text changing to weird icons in both admin & front end
- How to add a piece of code in function
- Automatically delete posts based on query
- Pass jquery var to a function in functions.php
- Dynamically adding Captions to images
- How about many “require_once” will affect the page load speed? [closed]
- Run function from parent on child site
- Search Woocommerce product titles only
- Post variables not displaying correctly in custom function
- Excerpt – First Sentence & Read More
- How do I make my child theme’s CSS update when I save it?
- Bulk set Post Title as Tag where Tag is Empty Function
- How do i set global variable in a function in wordpress functions.php
- Working function() doesn’t execute when triggered by WP CRON
- How to add more than one menu for logged in members?