bvbaked
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: api broken in wordpress 6.8.3 or changed?That endpoint is a specific WooCommerce endpoint, so if it were to have changed it would be in the documentation for the plugin and not core WordPress. You may be best to check their documentation to see if anything changed with an update as that is where the response would be formatted
The two files you mentioned are part of the WordPress core API for users and terms, and the updates are focused around the editing process so should not have an impact on the products API endpoints.
Forum: Fixing WordPress
In reply to: WordPress with GitLabHi @naninfa0
Yes, that is the composer I referred to. You will have a composer.json file that needs to be committed as well that can control your WordPress install as well as other plugins if you wish.
You can refer to this article on Gitlab pipelines for some reference on how they work. The setup I use in my work is WordPress and plugins managed via composer with a pipeline that will run the composer install and transfer files to the various environments (staging/production etc.) when they are committed to.
An example: I create a feature branch, add some code, then commit and push. When I merge that branch into our development branch, the pipeline runs a composer install command which adds WordPress and plugins then transfers all those files to the development server for testing.
That allows us to not commit plugins and core WordPress files to the repo which can be troublesome to update and manage
- This reply was modified 10 months, 1 week ago by bvbaked.
Forum: Fixing WordPress
In reply to: WordPress with GitLabYes, this is very much possible and the agency I work at has hundreds of WordPress sites in Gitlab.
I would strongly recommend using composer to manage it. This provides some hefty benefits, such as not needing to commit all the core WordPress files (which you don’t need in your repo) as well as easily updating the version.
What you’ll do is commit the wp-content directory as these files are unique for you, but manage the rest via composer. This can also allow you to manage plugins, which also offers the same benefits of keeping your repo clean and easy to manage
There are many guides on how to do this, and I don’t have any specific ones I know of and highly recommend, but the knowledge is out there with a fairly easy search.
Just one tip, in case it doesn’t get mentioned – watch your wp-config file! It has particular information you do not want people seeing like database information that might land you in some hot water
Forum: Fixing WordPress
In reply to: Burst Statistics lost dataPlugin support issues are best taken up with their own support – you will likely get the best help by creating a ticket with them here .
You could also try updating the plugin if it is not already at the most current version
Forum: Fixing WordPress
In reply to: google tag manager moving from header to footerIs there a reason you’d like it in the footer instead of the header?
These sorts of items get loaded in the header for very specific reasons, the biggest is so that they load as soon as possible. If you were to load it in the footer, you may be missing specific tracking metrics that fire before the code is loaded making your data incorrect, which kind of defeats the purpose of tracking it in the first place.
Forum: Fixing WordPress
In reply to: Moving from Dev to ProdI have used WP CLI with a lot of success, so would definitely recommend that path forward, assuming you have the access to to it
Forum: Fixing WordPress
In reply to: Users not staying logged in consistentlyOut of respect to their privacy, you may want to remove that video since it does include personal information.
As for the main issue with the login state, it is handled via cookies so there is the slim possibility that something is interfering there such as an ad-blocker. Caching can also come into play where the page is cached in the logged out state and therefore after logging in it still shows them being logged out.
That might explain the intermittent issues
Forum: Fixing WordPress
In reply to: Pls help me understand the scope of my projectYeah, what sort of fields are you looking to add?
One very common approach is to use a plugin like Advanced Custom Fields (ACF) although there are other alternatives. I’ve used this for a long time and it makes adding fields quite simple and it has a free version for basic additions that may suffice
Forum: Fixing WordPress
In reply to: Responsive WebsiteI think the block editor is great, but there are some shortcomings.
One of them is changing configurations across breakpoints. You generally don’t get a lot of flexibility, but stacking is built in via the columns block. Set up your logos as columns in a columns block and check the stack on mobile option. That should take care of the row->columns problem
The right to left is not something I have generally seen supported unless I am missing a feature. I have been able to solve this by using a style variation – in this case you’d create one for the columns block to have the stacking enabled as well.
This does require a bit of knowledge of coding and some way of including a code snip in the theme (PHP and possibly some CSS). This is an article on creating block style variations you can reference, and honestly ChatGPT can probably provide the code snippet for you since this is not an overly difficult ask. Ask it to create a style variation for the columns block that changes the alignment from the end (right) to start (left) on mobile and it’ll probably give you exactly what you need.
To add it to your theme you can use a code snippet plugin that allows for PHP (likely easiest) or edit the theme file yourself if you are comfortable (likely more difficult).
Just be warned that editing theme files opens the possibility of losing your code on an update, so a child theme might be a more future-proof option but adds a little more complexity to this
Forum: Fixing WordPress
In reply to: Users keeps reappearing even after deletionIf you suspect malware or a hacked site, you should follow the recommended steps to recover your site.
This user may certainly indicate your site is compromised, so I would contact your hosting and work through getting it back to a clean state as soon as possible
Forum: Fixing WordPress
In reply to: Change Page width and blog in Mesmerize ThemeIt might depend on the version you have. I see typography style and colors are available in Pro, but not free.
The best course would be to contact their support, as they’d be able to direct you to your fix and highlight what options are available.
Forum: Fixing WordPress
In reply to: Optimise a Post within an AccordionSo that is style related and coming from either a theme or a plugin
.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single {
padding: 5.34em 6.67em;
}For that item, there is padding getting included. This is possibly styling for some other intended display where it makes sense, but in this case you unfortunately don’t want it. I also noticed the little ‘i’ icon is larger and a different shade of green so there are likely other styles brought in as well.
I don’t know if there are options to remove it from the editor, or if you’ll have to add some CSS in this case to remove it
Forum: Fixing WordPress
In reply to: Long queries after some timeHow big is your database and what kind of theme are you running (classic or block)?
The bigger the database, the longer queries will take to run, and the more complex queries will start taking even longer as they have to sort over more and more records. I work at an agency that uses classic themes and ACF page layouts and we’ve had issues with this causing the database to get far too large.
One suggestion would be to check your revisions. These are all saved as a separate post record with all of the post meta as well causing a lot of unnecessary records. Setting a low limit to the number of revisions kept might help to get rid of some of the size which may help speed things up, but it is hard to say.
A much harder route to improve performance would be to review the actual queries themselves and working to optimize them. That would be more relevant if the site was working well and only a few pages or queries are flagged as slow, which I’m not sure is the issue in your case.
You can learn about changing revisions here.
Forum: Fixing WordPress
In reply to: Ordering query loop block results with a custom meta fieldThere are two possible methods, both requiring some code additions
- Each query loop has an id assigned. You can find that by checking the code view of the block and there will be a queryId attribute. From PHP you can use a pre_get_posts hook and check for the ids you want to filter and add to the $query there to insert your filtering
- You could register a custom control via JS to insert a sorting attribute into the block. This would give you a toggle or dropdown to select how it sorts and this would also include similar code to above that modifies the query to include sorting in this instance
Check the WP_Query reference for the code to insert. You’d be adding either a full meta_query array or just a meta_key and meta_compare to the $query array with an order to get it going to right way
Hope that helps some
Forum: Fixing WordPress
In reply to: Page or Template?I think it depends on what you’re expecting to do with these sections in the future and what the display is.
I don’t disagree that this could be a separate template, but these sound somewhat reusable as well. For example, you may want to feature those upcoming walks elsewhere on your site as well. In that case, the query block could be created as a pattern for reuse elsewhere. Same with the others.
If your front page is expected to be very different from other pages (not just patterns and blocks, but the entire format) then I say you should use a template. However if it follows most of your other pages but with different content creating a template is not needed and you may be better off creating patterns for the things you reuse and use the standard page template.
In my opinion, templates are best for large scale differences that you either need to stand out or want to reuse.