GusGF
Forum Replies Created
-
Forum: Plugins
In reply to: [Secure Custom Fields] ACF date fields format questionsOkay so it looks like all dates queried from the WP DB directly will be in the format ‘Ymd’, like in a WP_Query query.
Using the ACF functions e.g.get_field(‘event_date’, false, false)
The second boolean parameter means…
false: return a date in the WP DB format i.e. ‘Ymd’
true: use the ACF’s return format set in the plugin- This reply was modified 3 years, 9 months ago by GusGF.
Okay all sorted for some reason I ended up on his list of blocked users which he apparently clears manually daily. If anyone else is having the same problem you may need to contact him.
Forum: Developing with WordPress
In reply to: Filter ‘wp_insert_post_data’, when called?Okay apparently this filter not only runs when you create a new post but also when you update a post. So much for the WP documentation letting us know this ??
Forum: Developing with WordPress
In reply to: messing with post_status to secure postsThanks cubecolour, yes was aware of that but I guess I need assurance. Correct me if I’m wrong but if a malicious user without a login loaded up the website and made a change to the site’s JS then for them to see records subsequently created by legitimate users the following would need to happen.
1. These users would need to be using the same computer/browser as the malicious user.
2. No hard refresh of the browser being used should have occured on that computer.Thanks bcworkz, yes was aware of this but not absolutely sure hence the question and again just needed assurance.
Thanks to you both much appreciated ??
Forum: Developing with WordPress
In reply to: Set the error reporting level in WPThank you Dion.
Forum: Developing with WordPress
In reply to: How to generate debug messages for my locally hosted siteThank you managed to get this working from the links provided. Essentially putting the following code in wp-config.php
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true );
And referencing ‘debug.log’ in wp-content.
Forum: Developing with WordPress
In reply to: Debugging PHP in VS Code issuesApologies for not responding and thank you for trying to help. Not sure how I resolved it in the end but I did.
Okay seems to be sorted. The problem was Git version control was interferring with the plugin updating. Since setting git version control to only monitor the theme folder rather than ‘public’ it’s been working.
Forum: Developing with WordPress
In reply to: meta_value_date & sorting not workingYes Jacob that does indeed seem to work ??
Forum: Developing with WordPress
In reply to: How PHP filenames relate to how WP works?Hi, thank you. Not sure if you saw my last post but I misinterpreted a page and thought it was fetching posts when in fact it wasn’t hence my utter confusion. My mistake sorry.
Forum: Developing with WordPress
In reply to: How PHP filenames relate to how WP works?Sorry folks my mistake. When running the page driven by page-past-events.php I mistook the output to be an event when in fact it was just a line with today’s date. Apologies
Forum: Developing with WordPress
In reply to: How PHP filenames relate to how WP works?I’m following a course of study on WP and we’ve created a theme in which we implemented a custom post type called ‘event’. I don’t believe it’s anything too complicated and I seem to have lost my way as I don’t understand this latest step on custom queries and manipulating default URL queries. Really the only files of interest are…
functions.php
archive-event.php
page-past-events.php
The theme we’ve created is called fergus.We implemented a template file called archive-event.php which generates a list of events. In addition to this there is a pre_get_posts event hook which calls a function in functions.php and this is used to filter out past events as the user only I imagine wants to see stuff happening in the future. We then copied the code from archive-event.php to page-past-events.php, a template for a page only listing past events, though we hadn’t yet implemented the code to do this.
page-past-events.php is a copy of archive-event.php yet when I view their pages one shows upcoming events and the other past events. So I’m wondering if there is some kind of default URL query butting in :confused:
Forum: Developing with WordPress
In reply to: How PHP filenames relate to how WP works?I’ve quickly looked at the reference you provided and what I don’t think it answers is the last paragraph of my question as I believe you all too quickly scanned my question.
The link to template hierarchy I will be looking at closely in the next day or two so thank you for that.
I’m a bit confused why you think my question or at least part of my question is related to plugins? Maybe you could explain.
Forum: Plugins
In reply to: [Secure Custom Fields] the_field vs get_fieldThank you for your help that explanation does indeed sort out my understanding ??
Forum: Developing with WordPress
In reply to: `if (is_page(‘blog’))` does not work<?php if (get_post_type() == ‘post’) echo ‘class=”curren…
This actually works much better. is_archive() will only work for archives like ‘author’ & ‘category’ for example