Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

attachments

How to get image title/alt attribute?

August 4, 2022August 3, 2022 by Magenaut

In my white theme, there is no alt attribute configured for the home slider post. I added the alt text for the image through the media library interface. I added the following code to display the alt text/attribute. But it does not display:

Categories Q&A, Wordpress Tags attachments, conditional-tags, images, post-thumbnails Leave a comment

How to use taxonomies on attachments with the new Media Library?

August 4, 2022August 3, 2022 by Magenaut

WordPress 3.5 changed the media management and now the Media Library edit screen uses the default post type UI. Taxonomies are very useful for WP installs with different users and attachments, giving more possibilities to find the attachment and/or add classification.

Categories Q&A, Wordpress Tags attachments, custom-taxonomy, media, taxonomy Leave a comment

Delete Associated Media Upon Page Deletion

August 4, 2022August 3, 2022 by Magenaut

Note

Categories Q&A, Wordpress Tags attachments, media-library, pages, posts Leave a comment

simple solution for restricting access to (some) uploads/downloads

August 4, 2022August 3, 2022 by Magenaut

and of course it is a must that the .htaccess file is in place

Categories Q&A, Wordpress Tags attachments, content-restriction, private, security, uploads Leave a comment

Get the first image from post content (eg.: hotlinked images)

August 4, 2022August 3, 2022 by Magenaut

I am using this code directly from the codex.

Categories Q&A, Wordpress Tags attachments, get-children, images, post-thumbnails, theme-development Leave a comment

Disable image attachment links

August 4, 2022August 3, 2022 by Magenaut

Is there a way to disable image attachment links trought a filter in functions.php or something ? I know it’s possible to do it manually when you add an image to a post but I want to disable this functionality by default.

Categories Q&A, Wordpress Tags attachments, images, links, uploads, wp-admin Leave a comment

remove links from images using functions.php

August 4, 2022August 3, 2022 by Magenaut

I am looking for a way to remove the attachment link from images in the post content.

Categories Q&A, Wordpress Tags attachments, functions, images, links Leave a comment

Automatically wrap post image in div

August 4, 2022August 3, 2022 by Magenaut

In regards to image attachments inserted into a post, I would like to wrap the img tag inside a div tag for specific design purpose.

Categories Q&A, Wordpress Tags attachments, customization, images, uploads Leave a comment

Applying automatic link class to images embedded to posts

August 4, 2022August 3, 2022 by Magenaut

I’d really love to be able to conditionally apply a CSS class to link elements of images embedded into posts, but I can’t seem to figure this one out.

Categories Q&A, Wordpress Tags attachments, embed, images Leave a comment

How to remove images from showing in a post with the_content()?

August 4, 2022August 3, 2022 by Magenaut

Trying to learn more about creating my own themes and not using any plugins I wanted an ability to display all the images in a post excluding the thumbnail in my single-foobar.php file and I can do that with:

Categories Q&A, Wordpress Tags attachments, images, posts, text Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Page4 … Page8 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress