Woocommerce add click to enlarge under featured image - woocommerce

I'm using Woocomerce (Wootique) and I'd like to add "Click To Enlarge Image" beneath the featured image on single product page. Text should show beneath image and above the description/reviews tabs.
Can't figure it out? Any ideas?
http://www.forgottentreasurez.us/product/hand-signed-limited-edition-serigraph-mazal-tov-love/
Thank you in advance

There’s an action that you can use to add content below featured images, which can be used before or after product thumbnails. The woocommerce_product_thumbnail action is what will help us out. Let’s add a notice that says, “Click to Enlarge” below the featured image.
We’ll use a function to insert this text as a heading below the featured image. You can add this to your child theme or, even better, a code snippet using the Code Snippet plugin.
function skyverge_add_below_featured_image() {
echo '<h4 style="text-align:center;margin-top:10px;">Click to Enlarge</h4>';
}
add_action( 'woocommerce_product_thumbnails' , 'skyverge_add_below_featured_image', 9 );

Related

Tooltip with title and featured image Wordpress function

I want to code a function to get a popup or tooltip which shows the featured image and the title of an internal link when you hover a link on a post or page.
Does anybody know if this is possible and knows how? I know you have to use some filter hook of Wordpress and to use get_post_field('post_title') and $image = get_the_post_thumbnail_url().
I think it can only be done with a function that has to be put in the functions.php.

WordPress - Missing Featured Image Thumbnail in Posts Page

I added a featured image to my custom post type and it appears correctly on the front-end, but on the custom post type the featured image thumbnail doesn't show up at all.
As you can see, the Remove featured image button is read, but the thumbnail is not available. I used the_post_thumbnail() in my PHP code to display the featured image, which works correctly, but I don't know why the thumbnail missing. Anyone know why this is happening?
Thanks!
just add below code to your active theme's function.php
add_action( 'after_setup_theme', 'custom_featured_image_backend' );
function custom_featured_image_backend() {
add_theme_support( 'post-thumbnails','your_custom_post_type_name');
}

woocommerce - insert video into product gallery slider

I'm trying to insert an embed video(youtube) into the product galley slider that appears on product page.
So far i'm working with
add_filter('woocommerce_single_product_image_thumbnail_html','my function');
to add the video thumb but i don't know what are the filters to add the new content in woocommerce-product-gallery div (where the larger images are) or in the light box .
Also the 'woocommerce_single_product_image_thumbnail_html' hook runs after each thumb so it will be nice if i would use a filter that runs before/after the thumbs are displayed. I've try to use
add_action( 'woocommerce_product_thumbnails', 'my_function', 20 );
but it does not work.
So the question is : what are the hooks i need to use to add new thumbs and new slides in the woocommerce product slider.
Thank you.

remove and disable featured image in posts

I write a post in new post editor and then add media. I can see the images in the editor but when i publish them they aren't loading up and a frame with little square in the middle comes up. This is the link to one of my posts: http://getprogramcode.com/2013/03/c-program-for-bit-stuffing/ . For some people only link to the image comes up and it opens up with 404 error. See the line after OUTPUT: bit stuffing.
Also i want to remove the featured image from appearing in my posts. I have a option in my theme on a new post: "disable featured image" - but that doesnt work . Also if i dont put the image or i remove the featured image the empty image appears: see the home page: http://getprogramcode.com Please help me to solve this problem
You should not use relative paths on WordPress, only Absolute paths.
The problem is that you are using ../wp-content/... as your URL's for image paths.
When adding images, you should have the option to give it a path, you should opt to link to the media file.
For the disable feature image, if you go into the page.php or single.php code, it should have a line of code in it for calling in the featured image.
It should look something like this:
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
?>
You just need to remove or comment out this code and it should stop showing up on the pages.

How to change default post attributes?

My site needs to have image based posts, meaning the post is only an image.
Now i tried implementing it with Custom Post Types, but have encoutred problems,
like categories didn't show the right posts, pagination caused problems etc.
Now i thought to myself that i don't need the regular posts and if i could just edit them
to have only the featured image option enabled, life would be much easier.
But i failed to find any information regarding this.
Anyone can help me please?
To add featured image support/option simply add the following code snippet to your functions.php file located inside your theme's root folder
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
}
and to show the featured image inside your template you can do
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail(); // will show the featured image if you have set any for the post
}
Applicable to Wordpress version-2.9 and higher.
When you add new post just find the featured image meta box and set an featured image from there.
You can also setup image sizes (depending on that images will be displayed) at the front end, just take a look at here.

Resources