benorange
Forum Replies Created
-
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Family usersHi @keraweb,
Thanks for the link, I will consider access control. I didn’t understand everything so will do some more learning and leave this open for now.
Bw,
BenForum: Plugins
In reply to: [Discount Rules for WooCommerce] Discounts on specific productsGreat answer, that’s one item on my list with a plan. I am making a clone of the site this week to try out some of the new feature requests, so I’ll leave this topic open for now in case anything comes up.
Have a good day.
Bw,
BenHi Peter,
Thank you for thoughtful reply. I’m making a site clone later next week and I will start trying things out then. Everything up to now has worked out-of-the-box so I’m really studying as I am sure this project will need more than I know, need to make the jump from designer with the odd borrowed snippet to quasi-developer for some new requirements..
I don’t want to take up your time until I have a better idea of my plan so will follow up properly later but this is what I’m thinking so far, I know this will probably be much more complicated to work..
So there is a users database and new family database/table, parent ids will be not unique and can be assigned to multiple users. I guess I could use Heidi to create/populate new db and test a demo..
Then create a family.php file with similar to your query, something like:
<?php require-once('wp-load.php'); $get = $wpdb->get_results(" SELECT * from ".$wpdb->prefix."family_table" where PARENT_ID = 0001 "); echo "<pre>";print_r();echo "</pre>" ?>Then load URL https://domain.com/family.php
If that shows the children ids of the test parent, then repeat with showing the results for the children, following the standard model and db link to scores:
<?php // The Query $the_query = new WP_Query( $args ); // The Loop if ( $the_query->have_posts() ) { echo '<ul>'; while ( $the_query->have_posts() ) { $the_query->the_post(); echo '<li>' . get_the_title() . '</li>'; } echo '</ul>'; } else { // no posts found } /* Restore original Post Data */ wp_reset_postdata();Then edit query to use the parent ID for current user $$USER$$.
Then include your condition:
STUDENT_ID in (select STUDENT_ID from family_table where PARENT_ID = $$USER$$) or STUDENT_ID = $$USER$$Then retest for no crash with an only-child user.
And add a condition for connection failure like:
if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); }Then copy php file into a PHP snippet and insert into new family reports page on site.
I’d be grateful for a ‘you’re on the right track’ or ‘no, no, no’ if you have a minute. Thanks again.
I’ll follow up soon.
Bw,
BenForum: Plugins
In reply to: [WooCommerce Stripe Payment Gateway] Stripe and Sage(Opayo)Forum: Plugins
In reply to: [WP Super Cache] I thought gzip was enabled but test says notThanks @donncha
Forum: Plugins
In reply to: [WP Super Cache] I thought gzip was enabled but test says notIn case relevant, the caching works:
See snipForum: Plugins
In reply to: [Make Column Clickable for Elementor] CursorResolved, didn’t see the inline style so added !important to my css.
Forum: Plugins
In reply to: [Make Column Clickable for Elementor] CursorPlugin works great! Btw..
Forum: Plugins
In reply to: [WooCommerce] Presales – costsThanks, raised a ticket
Forum: Plugins
In reply to: [WooCommerce] Presales – costsHi @ihereira,
Thank you for reply. Are you saying that REST API feature for licensing digital downloads is included with free plugins? I was sure not.
Bw,
BenHi @jaysupport,
Perfect, thanks.
Forum: Plugins
In reply to: [RestroPress - Online Food Ordering System] No addon selectionForum: Themes and Templates
In reply to: [GeneratePress] Sticky header vs lightbox modalThat worked a treat! Thank you very much. Didn’t need to move it all, just the ‘X’!
Bw,
BenForum: Themes and Templates
In reply to: [GeneratePress] Sticky header vs lightbox modalThis is what you get when you click on a gallery item at bottom of page:SNIP
-You cannot see the “X” to close lightbox and return to page (users likely don’t understand they can also click on black space to cancel, close option is necessary)
I want it to look like this: SNIP 2
-Here you can see the close option but this is only possible if user realizes and scrolls back to the top of the page, retracting the sticky header.
Forum: Themes and Templates
In reply to: [GeneratePress] Sticky header vs lightbox modalHi @yingscarlett,
Yes, I expected so, that question was just asking about feasibility. What about the other question. Is there no way to use css to move modal down page or contain it somehow?
Thanks,
Ben