Support ForumCan I turn portfolio cubes from background-image to IMG element – Support Forum https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/feed Thu, 02 Jan 2025 18:07:12 +0200 http://bbpress.org/?v=2.5.12-6148 en-US https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7326 <![CDATA[Can I turn portfolio cubes from background-image to IMG element]]> https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7326 Wed, 18 Mar 2015 17:40:22 +0000 milosholaya Hello IshYo,

You maybe remember me, I’m using portfolio cubes as thumbnails for my posts (on https://pigtelligent.com), so I would like to turn them from background-image to IMG element, so it could be more optimized for search engines and I would also like to add alt tag to these thumbnails.

Please note that I am not using any of the hover effects on portfolio cubes, but the Portfolio element layout is perfect for me because of its responsiveness.

My question would be: is there an easy way to turn portfolio cubes to IMG element?

Thanks,
Milosh

]]>
https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7342 <![CDATA[Reply To: Can I turn portfolio cubes from background-image to IMG element]]> https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7342 Thu, 19 Mar 2015 06:46:08 +0000 IshYoBoy Hi Milosh,

Sure we do remember you :) Still loving your artworks.

You need to edit the portfolio PHP template and output the image manually. These are the steps you need to apply to “portfolio.php” file:

Override shortcode template in a child theme

Find this code:

And output the image inside the div with “ish-p-img” class.

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>
https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7346 <![CDATA[Reply To: Can I turn portfolio cubes from background-image to IMG element]]> https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7346 Thu, 19 Mar 2015 10:20:42 +0000 milosholaya Thanks for your kind words. :) And thanks for the advice!

I did it, now I just need to add the ALT tag to the thumbnail images. What is the shortcode I should use to get the Post Title as ALT tag?

]]>
https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7353 <![CDATA[Reply To: Can I turn portfolio cubes from background-image to IMG element]]> https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7353 Fri, 20 Mar 2015 07:08:35 +0000 IshYoBoy Hey,

Could you please paste the code you are using to display the image?

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>
https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7356 <![CDATA[Reply To: Can I turn portfolio cubes from background-image to IMG element]]> https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7356 Fri, 20 Mar 2015 07:47:53 +0000 milosholaya Here it is:

]]>
https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7362 <![CDATA[Reply To: Can I turn portfolio cubes from background-image to IMG element]]> https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7362 Fri, 20 Mar 2015 12:31:34 +0000 IshYoBoy Hi Milosh,

Thanks. To get the title of the current portfolio item just use the standard wordpress function get_the_title()

So something like this:

If you need the alt that is set in the settings of the featured image or anything else, don’t be afraid to check google ;)

E.g.: https://wordpress.org/support/topic/how-to-display-alt-text-of-featured-image

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>
https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7371 <![CDATA[Reply To: Can I turn portfolio cubes from background-image to IMG element]]> https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7371 Fri, 20 Mar 2015 23:37:31 +0000 milosholaya Thank you a lot! It did the trick.

]]>
https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7387 <![CDATA[Reply To: Can I turn portfolio cubes from background-image to IMG element]]> https://support.ishyoboy.com/forums/topic/can-i-turn-portfolio-cubes-from-background-image-to-img-element/#post-7387 Mon, 23 Mar 2015 06:36:13 +0000 IshYoBoy Glad to hear that ;)

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>