If you want to append HTML to images, you want to look inside the template files. Search for something like the_post_thumbnail
function, and add your HTML right after the closing </a>
tag (if there is one). You’d then need to style it with CSS so that it’s only visible upon hovering the image.
For example, in twentyfifteen
theme (located inside /wp-content/twentyfifteen
in the file system), content.php
has a function (twentyfifteen_post_thumbnail
) which is defined in inc/template-tags.php
, and it’s used to display images on ‘single post’ pages as well as ‘post list’ pages.
If you’re after giving users an ability for album images to be shared (on Pinterest, etc.), it would be much easier to find a plugin that does this – there are quite a few, and you may just find one that has the effect you’re looking for.
Related Posts:
- Issue with get_theme_mod returning a blank value instead of the saved value
- Set default options for inserting media
- How do I change parameters without changing the core
- Post thumbnail relative link and HTML modify
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- True email confirmation for registration (keeping unvalidated users from user table)
- Copy and Modified WooCommerce function is_coupon_valid [closed]
- Display random categories on the front page (Finding and Editing Theme Functions)
- Import WordPress XML File from Within Functions.php
- Does hooking into the same action multiple times drain memory?
- How to influence the information displayed on widget inside wp-admin
- Is there a hook or function I can use to display all theme files being used on a current page?
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Implementing DNS Prefetching with WordPress
- Help me to understand wp_header() and wp_footer() functions
- How can I add an extra WooCommerce hook
- Remove Page Title from Static Frontpage
- How to override WordPress registration and insert an auto-generated username?
- Removing Unnecessary Text from Admin Menu without CSS
- How to hook into the quick edit action?
- Default or Preset Content for Custom Post Types
- Remove tag on my RSS Feed
- Display WordPress Search
- How to add a rel attribute to images that contains their categories?
- Is it possible to be more page/post specific with admin_enqueue_script?
- WooCommerce add_action hook results in 500 error
- Delete pages and Create default pages for all new network sites
- Actions according to image type and size
- Gravity Forms field entries into wp_query loop [closed]
- How would go about if I just want a temporary function?
- Remove the deleted users avatar from list
- How to call custom function from functions.php in site-wide template files?
- Accepted arguments value in hook functions
- Get current page_id before loop, in functions.php
- Which action hook to use for function?
- Change size and crop medium_large images
- str_replace function in theme
- Inserting a functions output after the content
- Modify a function without editing template
- Don’t delete a page if it holds users
- Right way to update widget on dynamic new input field
- How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?
- Problem only while using require_once() within functions.php
- Twentyten Child Theme: header images display messed up in admin panel
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- Word Press – Dynamic Content [closed]
- Insert image in WordPress with HTML5 tag and caption function
- how can I just add to parent theme function(s) instead of redeclaring whole the function
- Modify custom field input data before creating a new post
- Footer disappears when using the_content ( )
- Move Custom Fields on General Settings Page to New Location
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- Registration Hooks don’t appear to be working
- Why does re-using this function not work? [closed]
- Pass parameter to hooked function using custom page template
- Is my code correct to enqueue CSS on a specific page?
- Can’t properly set the_title add_filter to show short_URL
- (Woocommerce) Order by price when entering specific category
- Plugin Development – Functions or Hooks?
- Add an Outside Wrapper to my Header and Make it Full Width
- Custom HTML markup
- Use a shortcode to display custom meta box contents
- Possible to hook into Media Library preview File column and use a custom image?
- Create custom function for hero image
- How to append classname to body tag if guest user
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- update_post_meta is Updating with two page id
- New checkbox in custom widget isn’t saving data
- Linking Javascript in functions.php file
- Why I can’t load my JavaScripts using an hook inside my functions.php file?
- is_home() not working in functions.php file
- How to conditionally add a widget via a hook in functions.php
- Changing the text of Upload/Insert on Posts and Pages Screen
- How to add or delete default value theme options while activate and deactivate theme
- Warning at top of website & top menu gone
- How to replace ACTION url from original wordpress login form?
- Does hook have an effect on increasing the page load?
- What is the earliest Hook a Script can use?
- Hide author info in single posts by certain users
- External api call and make global variable for any page visitor enters , page-home, page, single etc
- Calling hooks in functions
- I want to customize the_posts_navigation function by replacing prev and next with images
- How would I correctly implement a new if statement in a child functions file?
- How to add custom column into custom post, when field is select
- How To Show Shortcodes In WordPress Custom Fields?
- custom post with loading script per single post
- Init hook for header send
- Get Value of Custom Field
- restrict access to specific urls on a specific period of time
- child_of not working while searching
- How to request login for user but not for bots
- Removing Facebook contact field from user contact not working
- How to hook wp_mail to add a custom email as BCC for each sent email?
- How to Add Extra Text In WordPress Title Before Post Publish
- Problem with removing characters “<” – WpAllImport
- multible shortcodes (for differnt values) with one function
- Create section wit form
- Customizer cuistom CSS Priority ordre Issue