Exclude page ID AND current page from wp_query of a Parent page
WordPress Development Stack Exchange
by Hellooo
14h ago
I would like to display a list of all children pages of parent page ID #2. I exclude one of child page which is ID #4 : <?php $args = array( 'post_type' => 'page', 'posts_per_page' => -1, 'post_parent' => '2', 'post__not_in' => array(4), 'order' => 'ASC', 'orderby' => 'menu_order' ); $childrens = new WP_Query( $args ); if ( $childrens->have_posts() ) : ?> <?php while ( $childrens->have_posts() ) : $childrens->the_post(); ?> <p><?php the_title(); ?></p> <?php endwhile; ?> <?php endif; wp_reset_query(); ?> But I also would li ..read more
Visit website
WordPress editor mobile view crashes, says: Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node
WordPress Development Stack Exchange
by Psychedelic Wizard
14h ago
I am using the latest version of WordPress (6.5.2) and regardless of which theme I am using or if I turn the plugins all off, whenever I try to enter the tab or mobile responsive view on the page editor it crashes and gives the following error message: Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. I have tried reinstalling WP, changing themes and changing plugins, but am not having any luck at all. Nor have I been able to find a solution. It appears to be a problem with the WP core file: react-dom.min.js, but I am hesitant to mess with it ..read more
Visit website
Do Seeded Orderby Rand Queries Benefit from DB Caching?
WordPress Development Stack Exchange
by RodneyUK
14h ago
I'm aware that various object caching plugins give you the benefit of caching results from frequent database queries. So that repeated queries return a cached result set rather than running the query again. I've also heard that using Orderby => Rand repeats queries and doesn't allow caching because the results change every time. Am I correct in assuming that if I use the seed rand(x) Orderby, such as a date as an integer, I can benefit from caching? Has anyone tested this ..read more
Visit website
How can I make a custom post status private or draft?
WordPress Development Stack Exchange
by Tommizzy
14h ago
I have the following code where the "private" value is set to true but posts with this status show up on the front end. In the admin add/edit screen the post shows "Visibility" as "Public". function needs_video_status(){ register_post_status( 'needs-video', array( 'label' => _x( 'Draft - Needs Video', 'post' ), 'public' => false, 'private' => true, 'exclude_from_search' => true, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'l ..read more
Visit website
Redirect Issue on the main navbar [closed]
WordPress Development Stack Exchange
by Frank
14h ago
On the live site of client, one link on the main nav bar is redirecting the site to dating site even though the navbar is correctly linked to the site inner page. The site has been scanned through https://sitecheck.sucuri.net/ website and it shows that are no malware. Also when the site is duplicated on other domain the website doesn't seem to redirect to the dating site. Any suggestion on how to tackle this problem ..read more
Visit website
Global $post value outside the loop
WordPress Development Stack Exchange
by challet
14h ago
On a category archive page, in a filter called from a block outside a loop, I noticed that the get_post function with a null first parameter returns the first loop's post. Is it supposed to return such a value ? I would have imagined that the global $post variable should have a value only in a loop or on a post page ..read more
Visit website
Duplicated WP Multisite for testing environment is redirecting to production site
WordPress Development Stack Exchange
by Erick Holz
14h ago
My goal is to have a test.example.de testing environment for my www.example.de WP Blog. Sadly, the site is still redirecting me to the production-site. My subdomain is registered as a CNAME with a TTL of 3600 (INVX). I also added it to my domains on my server-hosting dashboard (UBERSPACE). Here are all of the steps I made: Copied html directory (whole production-site) to my local disk Created a new directory called dev.example.de (note that my hosting provider uberspace is handling subdomains like that, so no need for setting up a vhost. I've also tested it with a simple index.html before ..read more
Visit website
How to display post tags
WordPress Development Stack Exchange
by user1181153
14h ago
I'm converting an HTML template into a wordpress theme and I'm having some trouble displaying the post tags within the functions.php file. What I would like to do is add the following code into the functions file with the HTML code. I have been trying for a few days now and I have already been to the codex but nothing I try is working. <div > <a href="#" >tag 1</a> <a href="#" >tag 2</a> <a href="#" >tag 3</a> <a href="#" >tag 4</a> </div> Can anyone please help with this ..read more
Visit website
Which filters control the Categories page (or a custom taxonomy page) in the Admin?
WordPress Development Stack Exchange
by Kropotkin
3d ago
I have a custom taxonomy. When I go to the page in the admin where it can be managed - edit-tags.php?taxonomy=bundles&post_type=kea_activity I see a table with headings for Name, Description, Slug, Count. I just don't want Count to appear: I could just hide it with CSS but I would prefer to not show it with a filter. Is there any filter which can do this? I have searched everywhere and found nothing ..read more
Visit website
Can I make a Heading block above a query loop block disappear when that query loop has no results?
WordPress Development Stack Exchange
by Peter Cooper
3d ago
I have a query loop that disappears (by design) when it has no results (by not including a "No Results" block). I would like to find a way of making the Heading that precedes the query loop also disappear at the same time. The reason is that this pattern (Heading/Query loop) is repeated on 100 different posts, only some of which have any results. I want the Heading block to appear ONLY when the query loop has results ..read more
Visit website

Follow WordPress Development Stack Exchange on FeedSpot

Continue with Google
Continue with Apple
OR