How to add Youtube video in Woocommerce product photo gallery? - php

I wordpress, I have created a custom textarea field to paste in Youtube Embed Code for every Products under Woocommerce. I used ACF plugin for that. The backend is working fine and I am able to fetch the video embed code using below code.
$video_embed_code = get_field('video_embed_code', $post->ID);
if($video_embed_code):
echo '<div class="video-wrapper">'.$video_embed_code.'</div>';
endif;
This also works fine fetches video wherever needed. But I want to place it in the product gallery which is internally a combination of 3 plugins created by woocommerce
1. flexslider
2. photozoom
3. photoswipe
I want to add this video in this galley, so that it integrate finely with all the slides and when we click on zoom button, it loads the video using photoswipe plugin. I tried to look for woocommerce hooks but the only hook I found was to modify the flexslider settings like show/hide arrows, show/hide thumbnails etc.

Related

Link image to its product on WooCommerce /Woolentor Plugin

I'm building a website for the first time using WooCommerce. I have created a separate page for separate categories and I have added the category product using WooLentor Plugin (a plugin that works with Elementor editor). While the layout looks awesome, the only problem is that users need to click on the title only for it to redirct them to the product page. If they try to click on the image (which is more user friendly) they will not be redirected as the image url for some reason is (#).
Is there a way to automatically replay this (#) with the product link?
I really appreciate your help.
Here is a link to a page I need the image link to work on:
https://guay.cf/dresses
My apology if it takes a long time to load as I'm using free hosting from infinityfree.net
Here is how the image looks on Chrome element inspector:
enter image description here

How to add images via REST API to Magento 2 products in wysiwyg editor / description?

I am using PHP and the REST V1 api for importing products to Magento 2. Everything is working, except for 1 thing: I need to show images in the description of the product. I can upload these images through the wysiwyg-editor in the Magento backend, but I want to do this via api.
I use this endpoint to add the main product images:
rest/V1/products/:sku/media
This works like a charm, but now I need to upload detail-images that I can use in the description. Using the endpoint mentioned above also adds the images to the main thumbnail list on the product page, and that's not what I want.
Is there a method to upload these images and get the image-urls in the response so I can use them inside the description attribute?

How to add multiple featured image upload button without plugin for wordpress

How can I add 2nd featured image upload button without using plugin for wordpress?
you need to add multi-post-thumbnails-admin.js also you need to add filters for the same for details Refer below link - http://lifeonlars.com/wordpress/how-to-add-multiple-featured-images-in-wordpress/

Wordpress - display-posts shortcode plugin has nextgen shortcode issue

I am using the plugin display-posts http://wordpress.org/support/plugin/display-posts-shortcode
which lets me display all posts (venues) from a particular category on a page, rather than just using a category.
(This is so that I can in a higher up area of my website use the child-pages shortcode plugin to display a list of these pages (locations), as there seems to be no plugin available to display categories with a thumbnail chosen from one of its posts.)
The problem I am having is that I can set a featured image and text in the post to get pulled into this listing of posts page, but my nextgen gallery shortcode which I am using to display a selection of thumbnails for each venue within the post, is being displayed as plaintext and not activating the shortcode.
If I directly view the post on its own then the shortcode is working fine and the thumbs appear, I presume its something to do with using a shortcode within something already being generated by a shortcode?
This happens whether I am using include_excerpt="true" and manually placing the shortcode in the excerpt box as well as the main content area, or if I use include_content="true".
My shortcode in my page to pull in these posts is
[display-posts category="ayia-napa" order="ASC" orderby="title" include_excerpt="true" include_content="true"]
My shortcode for nextgen sat in individual post is
[ngg_images gallery_ids="1" display_type="photocrati-nextgen_basic_thumbnails"]
I'm not sure if the problem is specific to the plugin/code I am using or whether Wordpress has this problem in general.
I have followed advice online to include an add_filter in my functions.php file for showing shortcodes within excerpts but this doesn't seem to be working.
Thanks
Cathy

Wordpress Gallery Links

I have a Wordpress page which is showing gallery that I created by using Wordpress built-in post editor: into it here is its url: http://jalrosh.com/lylescenter/?page_id=8
Now the issue is that when I click on some image its big image opens in a new page and that is disturbing page design. It should come in the central area but it is appearing on the top of the remaining page.
There are several plugins that could help you do this. For example http://wordpress.org/extend/plugins/lightbox-2-wordpress-plugin/ I haven't used this plugin, but a wordpress plugin search for "lightbox" came with several options. Try some of them out and see what one you like best.
I haven't tried any of them but supposedly they should take any image and have it viewed via a lightbox (which is the correct term for having the image displayed over the existing page).

Categories