Title: san99's Replies | WordPress.org

---

# san99

  [  ](https://wordpress.org/support/users/san99/)

 *   [Profile](https://wordpress.org/support/users/san99/)
 *   [Topics Started](https://wordpress.org/support/users/san99/topics/)
 *   [Replies Created](https://wordpress.org/support/users/san99/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/san99/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/san99/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/san99/engagements/)
 *   [Favorites](https://wordpress.org/support/users/san99/favorites/)

 Search replies:

## Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)

 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to add numeric digits to the attachment page url in wordpress?](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/)
 *  Thread Starter [san99](https://wordpress.org/support/users/san99/)
 * (@san99)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/#post-8300796)
 * hi there again,
    I am sorry i could not get back, first off all I should say 
   that I am so grateful for you answering my all questions here:) You are putting
   up with me quite nicely hehe. I am sorry I don’t understand very complex wp terms
   like crux but I am trying to learn it. As for the schema i Knew there were some
   plugins and i tried all one by one, trust me, I tried all. I was trying to understand
   how that one guy was adding schema within images that way, now I have finally
   figured out. He created gallery first for each post by adding a php file like
   gallery.php, he was using that loop in the single and attachment pages, then 
   to add schema he was using custom functions with wordpress image attachment hooks,
   he was getting different sizes by their names in wp like full, medium,small and
   thumbnails:)… This kind of script does not exist anywhere it has to be developed..
   my mistake was to assume that it was in wordpress. You are right we can accomplish
   anything with wp and I have been using it myself for years.The thing was to discover
   how to use html 5 functions/language with wordpress and now I know how,, we put
   custom functions in the theme it’s not something that a plugin can do. Yea these
   are sort of wordpress hacks done by developers only, you must have your secrets
   as well to make a wp site unique in structure. The standard structure works fine
   but it is being used by millions around the world, I know SEO also matters but
   I believe that any theme with unique layout also stands out the way your post
   ranks in SE. You told me that creating different image sizes and showing all 
   in the source page is good for SEO , I want to make sure if using multiple alt
   is a safe approach. For instance in that script i could count one title and around
   5-6 alts with each image.. it’s kind of name of image repeating within source
   page, do you think it is safe?
 * Thanks for helping me out, you are a pro:)
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to add numeric digits to the attachment page url in wordpress?](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/)
 *  Thread Starter [san99](https://wordpress.org/support/users/san99/)
 * (@san99)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/#post-8257288)
 * I have tried posting questions on other forums whenever something comes up about
   WordPress, I am using this platform more than bloggers because it is easy to 
   work with. First of all I should say thank you for answering back to my all of
   the questions:) And thank you for putting up with me hehe. I am sorry I am not
   a coder so whenever i feel intrigued about something I come here and shoot my
   questions, I am glad that Pro Coders like you exist on the planet to make things
   easier for the naive and novice people like I am. So yea my experience is not
   zero on WP at all.
    I have just found out that some html template can be operated
   with wordpress they are edited and then integrated with wp and when this is done
   all some wp folders and files don’t show,there are also some plugins like hide
   wp which help hide wp from the source page. here is another site for review inholl
   dot com…. and another one artnmeal dot com… these are html on wordpress, I don’t
   think that html pages are converted into wordpress because I can clearly see 
   automated blogging here so yea it is html on wordpress. You are right the schema
   concept was never meant to be contained within images only—-the schema markup
   is now applied in header, blogpost/article, breadcrumbs and in many other files
   within wordpress theme to make it SEO friendly, luckily it’s easy to edit theme
   for the schema except for the image attachments that’s why I am here. Some plugins
   add this markup with the featured images easily but none of the plugins that 
   I have tried so far add schema to attachment pages on single or attachment pages
   of the blog. I am particularly looking for the schema for the images because 
   this will come handy in photography blog. I have tried on many places but I could
   not find the solution yet, it must have been a custom function or script of few
   lines but I may need help to figure it out. You are right getting multiple links
   for the same image is not spammy and we can customize the sizes in uploads but
   the trick is how to show all of these in source page separately with alt tag 
   each time.. it is also tricky isn’t it:)
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to add numeric digits to the attachment page url in wordpress?](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/)
 *  Thread Starter [san99](https://wordpress.org/support/users/san99/)
 * (@san99)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/#post-8245361)
 * Hi again,
    It seems you are the only one active on the forum right now, 🙂 kidding.
   I know many developers are providing support here, but i rarely get answers here
   I still try. As for the html front end I was referring to a particular website,
   i guess the link was removed by someone not by me, here is an example [example](http://inholl.com)
   If you visit the stylesheet you will notice that the site is using html theme
   but it is being managed on wordpress platform. Installing wordpress on a sub 
   folder is a common thing but it seems that the developer is doing something different
   with html design. inholl dot com/wp-admin ( there are many sites like this one
   where html template is being used on WP,I don’t know how to do it and I am curious).
   I know this is a not a get a free code forum but I always ask questions here 
   when I am sure that I am not getting solutions elsewhere, for instance I have
   tried Fiverr and many places, I hired people for the job but they would cancel
   the order sooner or later stating that they were not able to figure out how did
   the designer do it. I have one code for the schema (I know there are some plugins
   which are adding schema to the featured image only but I want to apply schema
   on a photography website to improve SEO).I am experimenting wit different codes
   right now and I have one that works on new attachments and here it is:
 *     ```
       add_filter( 'wp_get_attachment_image_attributes', 'wpse_235266_image_attributes', 10, 3 );
   
       function wpse_235266_image_attributes( $attr, $attachment, $size ) {
   
           $attr['itemprop'] = 'image';
           return $attr;
   
       }
       For images that have been inserted into post content in the visual editor, you'll need to filter on the get_image_tag hook to change the HTML that is inserted into each post.
   
       add_filter( 'get_image_tag', 'wpse_235266_image_html', 10, 6 );
   
       function wpse_235266_image_html( $html, $id, $alt, $title, $align, $size ) {
   
           return str_replace( '<img ', '<img itemprop="image" ', $html );
   
       }
       ```
   
 * For instance this code only add itemprop=image attribute to the images it works
   differently though it does. It is missing the complete schema structure I am 
   looking for (the one I have already shown). I want to get at least two sizes 
   of wordpress attachments in the source page with alt and titles.. The example
   I have shown you contains four or five links which are spammy for certain i want
   to get two at the maximum.
    Thanks for the sharing the link I will sign up there
   right now. Thanks for helping me out.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to add numeric digits to the attachment page url in wordpress?](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/)
 *  Thread Starter [san99](https://wordpress.org/support/users/san99/)
 * (@san99)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/#post-8242694)
 * hi there again I am sorry i need to ask a question about schema markup, can you
   tell me who can provide the code for me, I have asked this question on this forum
   but there is no reply as yet.
    There is a different code for wordpress images
   and attachment in the screenshot where all sizes of images are being shown along
   with schema markup. B default wordpress creates five size for the images, the
   same is here but it’s just that there is title one time and alt tags four to 
   five times in the script. how to do it, i have tried many codes but could not
   get it done yet.The example can be seen in the screenshot, the schema markup 
   is showing with all the images [screenshot](http://prnt.sc/coq232) let me know
   if this script is paid so i can buy it. thanks
    -  This reply was modified 9 years, 7 months ago by [san99](https://wordpress.org/support/users/san99/).
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to add numeric digits to the attachment page url in wordpress?](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/)
 *  Thread Starter [san99](https://wordpress.org/support/users/san99/)
 * (@san99)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/#post-8166303)
 * thanks for sharing the link:) i will try to participate there
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to add numeric digits to the attachment page url in wordpress?](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/)
 *  Thread Starter [san99](https://wordpress.org/support/users/san99/)
 * (@san99)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/#post-7651504)
 * Hi there,
    Thank you very much for sharing this code, it is working perfectly
   fine. No doubt in my mind that you are a pro coder and developer. Thank you for
   helping me with this much detailed coding and I really appreciate your giving
   me favor and doing coding only for me, I wish i could do something in return.:)
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to add numeric digits to the attachment page url in wordpress?](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/)
 *  Thread Starter [san99](https://wordpress.org/support/users/san99/)
 * (@san99)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/#post-7651492)
 * Thank you very much for writing this code for me, this code is working and I 
   appreciate you have done coding here (just for me:) ).
    I have used this code
   in the function.php file, it is working fine, random numbers are showing on the
   attachment url, but the attachment page is still showing with the parent post.
   for instance. sitename.com/parentpost/attachment-numbers/ My last question is
   whether or not i can change permalink to sitename/attachment-numbers/ to make
   it pretty. thank you very much in advance.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to add numeric digits to the attachment page url in wordpress?](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/)
 *  Thread Starter [san99](https://wordpress.org/support/users/san99/)
 * (@san99)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/how-to-add-numeric-digits-to-the-attachment-page-url-in-wordpress/#post-7651435)
 * Hi thanks for answering the question, well I forgot to mention that I could only
   do modifications within theme/wordpress and for i needed the codes. I am not 
   a programmer myself so the best i can do is copy and paste the codes within php
   files in the wordpress. I will appreciate if you could assist me with the code.
   
   If adding five digits at the start and end of attachment page is tricky, I would
   like to know a way to add second/time structure for instance in post permalink
   we can add %monthnum%%seconds%etc to add numbers and the structure always results
   in different/random numbers in the permalink, can we do the same with attachment
   page link.
 * Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)