-
AuthorPosts
-
March 7, 2018 at 5:33 pm #923152
I copied the catalogue shortcode into my child-theme to change it for my needs. It’s working, but the CSS that I specified doesn’t load.
function extra_assets() { //load css wp_enqueue_style( 'avia-module-catalogue-fct' , get_stylesheet_directory_uri().'/shortcodes/catalogue_fct/catalogue_fct.css' , array('avia-layout'), false ); }
I also tried:
– get_stylesheet_directory()
– Insert the full path to the .css fileWhat am I doing wrong?
March 7, 2018 at 8:23 pm #923284Hey jw_fct,
Have you tried adding !important; to the specified styles coming from that file?
Best regards,
Jordan ShannonMarch 8, 2018 at 9:48 am #923678Hey Jordan,
the problem is that the CSS doesn’t even load.
Is there some kind of caching going on? I experimented with the handle (changing it from avia-module-catalogue-fct to avia-module-catalogue-fct1), after that all the changes I made in the CSS file were taken over. When I did some more changes I had to rename the handle again to make them visible.
Best regards,
JohannesMarch 8, 2018 at 10:34 am #923715It’s not a pretty solution, since I had to change two files everytime, but it did the job.
Now I have another problem:
The product image opens in lightbox, but it shows four impressions to cycle through of each product image. Is there a way to only show one impression?Best regards,
Johannes- This reply was modified 6 years, 2 months ago by jw_fct.
March 8, 2018 at 8:33 pm #924049Hi,
What do you mean by impressions? Do you mean you just want a single image?
Best regards,
Jordan ShannonMarch 9, 2018 at 12:00 pm #924431Hi,
if I click on the image to open a bigger version, the image is opened 3 or 4 times in the lightbox viewer (1/3 on bottom corner) to cycle through before getting to the next image.
Best regards,
JohannesMarch 9, 2018 at 5:31 pm #924630Hi,
So you to click the image and just have that 1 product image show, with no cycle correct?
Best regards,
Jordan ShannonMarch 9, 2018 at 7:28 pm #924678No, there are two duplicates of each product in the lightbox.
The lightbox link is created three times per product:
<li> <a href="https://farbencenter.at/wp-content/uploads/2018/03/SC_Haftgrund-pigmentiert_RGB-RZ-1030x871.png" class="av-catalogue-fct-item lightbox-added" style="position: relative; overflow: hidden; display: block;"> <img src="https://farbencenter.at/wp-content/uploads/2018/03/SC_Haftgrund-pigmentiert_RGB-RZ-180x152.png" title="SIGMA Haftgrund pigmentiert" alt="SIGMA Haftgrund pigmentiert" class="av-catalogue-fct-image" style=""> <span class="image-overlay overlay-type-image" style="left: -5px; top: 0px; overflow: hidden; display: block; height: 182px; width: 190px;"> <span class="image-overlay-inside"> </span> </span> </a> <div class="av-catalogue-fct-item-inner"> <a href="https://farbencenter.at/wp-content/uploads/2018/03/SC_Haftgrund-pigmentiert_RGB-RZ-1030x871.png" class="av-catalogue-fct-item lightbox-added"> <div class="av-catalogue-fct-title-container"><div class="av-catalogue-fct-title"><h4>SIGMA Haftgrund pigmentiert</h4></div><div class="av-catalogue-h2o"></div></div> <div class="av-catalogue-fct-content"> Weiß pigmentierte, wasserverdünnbare Universal-Grundierung.<p></p> <ul> <li>haftvermittelnd</li> <li>verlängert die Offenzeit der Schlussbeschichtung</li> <li>niedrige Wasserdurchlässigkeit</li> <li>gute Wasserdampfdurchlässigkeit</li> <li>ohne strukturgebendes Korn</li> <li>tönbar über SIGMA Mix-System</li> <li>airless-spritzbar</li> </ul> </div> </a> <div class="av-catalogue-fct-pdflink"> <a href="https://farbencenter.at/wp-content/uploads/2018/03/SC_Haftgrund-pigmentiert_RGB-RZ-1030x871.png" class="av-catalogue-fct-item lightbox-added"> </a> <a class="prettylink pdf" target="_blank" href="index.php?file_download=file&userid=PUBLIC&filepath=%2FTM%2FSIGMA%20Coatings%2FTM-SIGMA-Haftgrund-pigmentiert.pdf"><span style="float:right"></span>Technisches Merkblatt</a></div> <div class="av-catalogue-fct-pdflink"> <a class="prettylink pdf" target="_blank" href="index.php?file_download=file&userid=PUBLIC&filepath=%2FTM%2FSIGMA%20Coatings%2FSDB-SIGMA-Haftgrund-pigmentiert.pdf"><span style="float:right"></span>Sicherheitsdatenblatt</a></div> </div> </li>
I duplicated the avia-catalogue item, the only code that is related to the lightbox is this:
if($link) { if($link == 'lightbox' && $id) { $link = aviaHelper::get_url($link, $id); } else { $link = aviaHelper::get_url($link); $blank = (strpos($target, '_blank') !== false || $target == 'yes') ? ' target="_blank" ' : ""; $blank .= strpos($target, 'nofollow') !== false ? ' rel="nofollow" ' : ""; } $item_markup = array("open"=>"a href='{$link}' {$blank}", "close" => "a"); }
I’m baffled, don’t know how to get rid of the additional lightbox-links. I know this makes the whole element clickable to get a bigger version of the product image, but it’d be enough to have only the thumbnail link to the bigger version of the image.
March 12, 2018 at 5:31 pm #925625I was able to solve it, I just had to add “noLightbox” to some of the div’s.
Edit:
That just removed the lightbox-duplicates, the div’s still link to the image. How do I get rid of this?Edit2:
I used this as a workaround:.av-catalogue-fct-container a.av-catalogue-fct-item{position: initial !important; pointer-events: none;} .av-catalogue-fct-container a.av-catalogue-fct-item.lightbox-added{position: initial !important; pointer-events: auto;}
It does the job in combination with “noLightbox”, but I’d like to get rid of the “a” tags in the source.
- This reply was modified 6 years, 2 months ago by jw_fct.
March 13, 2018 at 9:17 pm #926242Hi,
That would require to edit the html and require some advanced editing.
It is advanced editing, so consider to hire someone to help you out.Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.