machepap
Forum Replies Created
-
Hello, I finally had a chance to review your last message. I do not use Elementor, and I don’t think I misconfigured anything, as the plugin was working as expected up until the point of updating plugins. BUT — the good news is, with the more recent updates (3.1.4) the problem has disappeared. Thanks for whatever you did, great to put this problem to bed!
- This reply was modified 1 year, 6 months ago by machepap.
Hi Anthony, thanks for the detailed reply, and apologies for being so slow getting back to you. I had a hard drive fail followed by data recovery and then repairs, just now getting back up to speed. I’ll go through this more thoroughly and get back to you asap.
@paranoia1906 Hi Anthony, Just checking back to see if you’ve made any progress with this issue? Thanks, Amy
Hello Vee, I just tested with your theme, Skinny. Same problem. Thanks.
Sorry for the slow response – for some reason I never received notice that you had replied. I am using a child theme of Bootstrap Basic theme. I just tested the parent theme and had the same issue. I also tested Bootstrap Basic4, again with the same issue. All these tests today were with WordPress version 6.2.2. thanks for your attention to this!
apparently there was a conflict with a redirection plug in, which has since been turned off. The firewall is currently disabled, waiting for updates to DNS now. Ticket # is 16759936142700
Forum: Plugins
In reply to: [Content Aware Sidebars - Fastest Widget Area Plugin] Error noticeyes, it appears to be resolved. Thanks!
Interesting, thanks. Ultimately, I’m just glad it works, and that this forum exists to help me through trying to figure out all this stuff on my own! ??
I’m not sure if it’s done in the best possible way, but I managed to write code that works! Actually, it works whether I use rewind_posts or wp_reset_postdata between the two loops, so I guess I don’t understand yet which, if any, should be used here.
I’m yet to add styling and links, but that’s the easy part. Here’s what I have so far in my functions.php, called into a widget via
do_shortcode();
Thanks again for your help!
<?php // Resource list widget for Topic category pages function sal_rsc_list() { // the first query while ( have_posts() ) : the_post(); $testValues = get_field('sal_topic_page'); $meta_query = array('relation' => '='); foreach($testValues as $testValue) : $meta_query[] = array( 'key' => 'sal_topic_page', 'value' => $testValue, 'compare' => 'LIKE', ); endforeach; endwhile; rewind_posts(); // Start a new loop while ( have_posts() ) : the_post(); $topicalResources = new WP_Query(array( 'posts_per_page' => -1, 'post_type' => 'resource', 'meta_key' => 'sal_topics', 'meta_value' => $testValue, 'meta_compare' => 'LIKE', 'orderby' => 'title', 'order' => 'ASC', )); while ($topicalResources->have_posts() ) { $topicalResources->the_post(); ?> <li><?php the_title(); ?></li> <?php } endwhile; /* Restore original Post Data */ wp_reset_postdata(); } // Add a shortcode add_shortcode('resourcelist', 'sal_rsc_list'); //end Resource list widget for Topic category pages
Thanks for your replies. To answer Alan’s first question — yes I did add that specifically, with that exact code.
@bcworkz – to clarify the schema — topics are child terms of “Topic” although maybe not so technically – I’ve set up a list of terms as a checklist for the “Resource” pages in a custom field (sal_topics) using a third-party plugin. The titles of the choices in this list match the titles of the Topic pages. I am confident that I can query for those fields. The thing I am/was unclear on is how to reference the title for the topic of the page I’m querying while outside of the loop for that page. It’s probably a very basic thing, but this site is my first ever time writing my own PHP.
You have both given me some good leads to learn more and try some things. I will post again when I make some progress or get stuck. In the meantime, I’m not sure yet that I understand what it means for queries to reset.
Forum: Fixing WordPress
In reply to: How to create a widget based on core wordpress gallery widget?yes! of course, thanks.
Forum: Fixing WordPress
In reply to: How to create a widget based on core wordpress gallery widget?Thank you for the quick response and the link – I should have mentioned that I looked at this page but noticed that the js file link is broken. I’m not sure if that is critical or if I only need the php?
Like I said, I’m new to this! Thanks for your help.
ok thanks
Forum: Fixing WordPress
In reply to: can’t install child theme, missing template?Hi again – I have since replaced the stylesheet content to the original and retested, the problem is not resolved. Here’s what’s in style.css now:
/*
Theme Name: Twenty Seventeen Child
Template: twentyseventeen
*/Forum: Fixing WordPress
In reply to: can’t install child theme, missing template?Thanks – I should’ve posted it that way here because that’s how I GD it originally. actually I tried it both ways (added the capitol T Because I didn’t know what else to try)