Importing Google Fonts in Block Themes — Correct Way

Make sure the layout.css file is called correctly, both on the frontend and backend. No need to add fontFace, you have called it via @import : { “$schema”: “https://schemas.wp.org/trunk/theme.json”, “version”: 3, “settings”: { “layout”: { “contentSize”: “700px”, “wideSize”: “1200px” }, “typography”: { “fontFamilies”: [ { “fontFamily”: “\”PT Sans\”, sans-serif”, “name”: “PT Sans”, “slug”: “pt-sans” }, … Read more

Hide parent link in submenu on admin menu

As @Tom J Nowell pointed out in the comments, using the same slug for the admin menu and the first submenu has the effect of removing the repeated menu name in the submenu. function newintranet_tabs_admin_menu_option() { add_menu_page(‘CMC Intranet Tabs’, ‘CMC Intranet Tabs’, ‘manage_options’, ‘newintranet_tabs_admin_menu’, ‘newintranet_tabs_scripts_page’, ”, 200); add_submenu_page(‘newintranet_tabs_admin_menu’, ‘Add Tabbed Page’, ‘Add Tabbed Page’, ‘manage_options’, … Read more

How do I use fields => ids in an array with WP Query?

Why is $args null? $args is just a plain PHP array of query arguments. Arrays in PHP do not have properties (like $args->posts). The ->posts property only exists after you instantiate a WP_Query object. So at that point in your code, $args->posts will always be null or throw an error, because $args is not a … Read more

how to make the link of comment section “nofollow” safely?

to customise the link “You must be logged in”, you can use that in your template : comment_form([ “must_log_in” => “<a href=\”https://wordpress.stackexchange.com/questions/18007/\”>a question about unicorns</a>”, ]); other arguments are detailed in the official documentation : https://developer.wordpress.org/reference/functions/comment_form/

wp-env fails in GitLab CI with “YIKES! It looks like you’re running this as root”

In some quick testing, I found that if I defined WP_CLI_ALLOW_ROOT=1 after I was already running as root, then WP CLI wouldn’t complain. I don’t know a lot about GitLab CI, unfortunately, but I’d try this to see if it works: image: docker:24.0.7 services: – docker:24.0.7-dind variables: DOCKER_HOST: tcp://docker:2375 DOCKER_TLS_CERTDIR: “” before_script: – apk add … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)