stuartcr
Forum Replies Created
-
Forum: Plugins
In reply to: [Gutenberg] Uploading Fontso the fix worked only once. after that i could not upload a second font.
Forum: Plugins
In reply to: [Simple Lightbox] i cant seem to get it workingthank you for getting back to me!!
i just started again, strange as i have not done anything differently.
BUT… i got it working!!
Forum: Plugins
In reply to: [Simple Lightbox] i cant seem to get it workingsooo i have tried everything. turned of all the plugins, swapped the theme. cannot get it working. so im aim for a fresh instal and start for stratch. so odd. i started an fresh WP install for testing and your plugin worked straight away!!!
ill try again tomorrow
Forum: Plugins
In reply to: [Simple Lightbox] i cant seem to get it workingand i add the images heres using :
[gallery]
https://newtopiadev.wpenginepowered.com/homepage-test/
again when i inspect i can see the “slb” code but it just not working, im not sure what i have done wrong?
Help?
Forum: Plugins
In reply to: [Simple Lightbox] i cant seem to get it workingmy settings
Forum: Plugins
In reply to: [Simple Lightbox] i cant seem to get it workingHey dude,
I’m trying to implement the lightbox on this homepage image grid,
https://newtopiadev.wpenginepowered.com/
below is my Code, it appears to output correctly, when i inspect but doesnt seem to work.
please can you help me?
<?php $postGridArgs = array( 'post_type' => 'artwork', 'posts_per_page' => 10, 'post_status' => 'publish', ); $postGridItems = new WP_Query($postGridArgs); if ($postGridItems->have_posts()) : echo '<style>'; echo '</style>'; ?> <script src="/wp-content/themes/flash-child/scripts/carousel-script.js"></script> <div class="outer-container"> <div class="container"> <div class="slider-wrapper"> <button id="prev-slide" class="slide-button material-symbols-rounded"> PREV </button> <ul class="image-list"> <?php while ($postGridItems->have_posts()) : $postGridItems->the_post(); $image = get_field('artwork_image'); ob_start(); if (!empty($image)) : echo '<a href="' . $image['url'] . '">'; echo '<img class="image-item" src="' . $image['url'] . '" alt="' . $image['alt'] . '">'; echo '</a>'; endif; $out = ob_get_clean(); // Activate links in output. if ( function_exists('slb_activate') ) { $out = slb_activate($out); } // Display output. echo $out; endwhile; wp_reset_postdata(); // Save output to variable. ?> </ul> <button id="next-slide" class="slide-button material-symbols-rounded"> NEXT </button> </div> <div class="slider-scrollbar"> <div class="scrollbar-track"> <div class="scrollbar-thumb"></div> </div> </div> </div> </div> <?php else : echo "<p>No posts found.</p>"; endif; ?>
Forum: Plugins
In reply to: [Simple Lightbox] i cant seem to get it workingTHANK YOU!!! for you fast response and help with fixing the issue!!
I tried your code and at first it didnt work, But there was a easy fix
ob_start().
should be
ob_start();
so final WORKING code is:
<?php $images = get_field('uk_clinic_images', 'option'); // Start output buffering. ob_start(); // Removed the extra period here. if ($images) { echo '<div class="luwi-gallery post-per-row-3">'; foreach ($images as $image) { echo '<a href="' . $image['url'] . '">'; echo '<img src="' . $image['url'] . '" alt="' . $image['alt'] . '">'; echo '</a>'; } echo '</div>'; } // Save output to variable. $out = ob_get_clean(); // Activate links in output. if (function_exists('slb_activate')) { $out = slb_activate($out); } // Display output. echo $out; ?>
thank you for your help again!!!
Forum: Plugins
In reply to: [Simple Lightbox] i cant seem to get it workingHi there!! thank you for your fast response!!
Im using Advanced Custom Fields to create the gallery.
<?php $images = get_field('uk_clinic_images', 'option'); if ($images) { echo '<div class="luwi-gallery post-per-row-3">'; foreach ($images as $image) { echo '<a href="' . $image['url'] . '">'; echo '<img src="' . $image['url'] . '" alt="' . $image['alt'] . '">'; echo '</a>'; } echo '</div>'; } ?>
and here is the image of my settings:
help?
Hi Konrad,
thank you so much for getting back to me.
I have implemented the simpler code you suggested
looks like i have used the incorrect function the explain my issue the_sub_field rather than get_sub_field.
thank you for explaining the difference.
what i need is for
“$categoryTagTerm” to be replaced by “array(‘New Cat, Uncategorised’)”so that the chosen terms are placed with in the sub-array
the same way “$PostTypeChoice” becomes the chosen post-type ie “testimonials”
and
“$PostsPerPage” becomes the chosen number of post to display for example “4”this
$postGridArgs = array( 'post_type' => $PostTypeChoice, 'posts_per_page' => $PostsPerPage, 'post_status' => 'publish', 'tax_query' => array( array( 'taxonomy' => $categoryTag, 'field' => 'name', 'terms' => $categoryTagTerm, 'operator' => 'IN' ) ) );
to this
$postGridArgs = array( 'post_type' => 'testimonials', 'posts_per_page' => '4', 'post_status' => 'publish', 'tax_query' => array( array( 'taxonomy' => 'category', 'field' => 'name', 'terms' => array('New Cat, Uncategorised'), 'operator' => 'IN' ) ) );
maybe there is a way to get the data i want, i assume its a string of values separated by commas, that creates the sub array?
I just got $PostTypeChoice and $PostsPerPage functioning so quick. Perhaps im approaching it all wrong, sorry im very new to this
Forum: Themes and Templates
In reply to: [Flash] Force menu to hamburger iconHi all,
so i have managed to get the menu to open and close on desktop BUT it starts open, which i do not want.
the menu is being created, somehow?! i cannot find how, but i know that this is the problem, “style=”display: block;”
how can i change or remove it?
<ul id=”primary-menu” class=”menu nav-menu” aria-expanded=”false” style=”display: block;“>
<ul id="primary-menu" class="menu nav-menu" aria-expanded="false" style="display: block;"><li id="menu-item-9755" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9755"><a href="#">About us</a></li> <li id="menu-item-9754" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9754"><a href="#">Services</a></li> <li id="menu-item-10309" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-10309"><a href="https://communitysupport.org.uk/testimonials/">Testimonials</a></li> </ul>
please help
Forum: Plugins
In reply to: [WP Mega Menu] Invalid CSS rendered causing styling issueyo i’m having the same issue.
https://www.clickreturn.co.uk/wp-content/uploads/2022/02/Screenshot-2022-02-15-at-00.33.03.png
i have tested this on a few website that i have made. i even did a fresh install yesterday, same problem, the CSS is broken.
the CSS is being create from the plugin.
here is my post (yes the odd code got render in the original post)
https://www.ads-software.com/support/topic/css-broken-after-coping-website/- This reply was modified 2 years, 9 months ago by stuartcr.
Forum: Plugins
In reply to: [WP Mega Menu] Css broken after coping websiteSo i have now tested this on a different website.
fresh installation of the plugin.
i believe wordpress 5.9 could be the issue.
like my previous post the CSS is breaking, all “>” symbols become (without the spaces) ” & g t ;”
see screenshot in previous post
HELP?
Forum: Developing with WordPress
In reply to: php function not work as expecteduh-mazing!! that worked!! thank you for your help!!
- This reply was modified 3 years, 1 month ago by stuartcr.
Forum: Developing with WordPress
In reply to: php function not work as expectedHi there,
i changed my code to this:
if ( ! function_exists( 'serviced_office_title' ) ) : function serviced_office_title() { if( get_field('is_this_office_available')=='yes' ){ return get_field('office_number'); } elseif( get_field('is_this_office_available')=='no' ){ return get_the_title(); return get_field('office_number'); } } endif;
BUT:
if “no”, does appear in the the H1 BUT not with the office number, just the page title.
return get_field(‘office_number’); <<< this isn’t working as expected, can i not have 2 “returns”.
is there a way to combine them?
where am i going wrong?? i’m getting there.
Forum: Developing with WordPress
In reply to: php function not work as expectedsorry to sound stupid. but how do i do that?
or are you actually explain it to me “return” instead of “echo”.
again this is very new to me.
thank you for you help