So currently if I want to edit an existing reusable block, I have to open some page and from there click 3 dots in the corner and then access reusable blocks from dropdown menu there? Like, there isnt a basic link for that in main WordPress nav?
I have a few columns and in each I have a group (an image, heading and paragraph). How do I add a link on the group without duplicating links for each element (image, heading, paragraph) which are inside that group?
I would like to empty/delete debug.log each time before I write something to it. Because it would be easier to find info in it when analyzing. How can I do it?
I have ~700 hierarchical product categories and majority of them I need to add in dropdown menus under main links in navbar. Under "View all" a lot of stuff is messed up. Some parent items have children listed but most of them don't. Also window for working with these options is terribly small so I...
I have created a simple blog. What is a good way (relatively simple) to create functionality for inserting images between paragraphs? I was thinking that I could upload images using <input type="file" multiple name="files[]" /> and store them in /images/blog. Upon uploading, images would be resized...
This creates 50 posts. How can I set that one column 'post_something' to be one of the values from array? class PostSeeder extends Seeder { public function run() { Post::factory()->count(50)->create(); } }
I've tried setting default directory on regular user so I logged in as a root and did this: usermod --home public_html myuser usermod --home /public_html myuser usermod -d /home/myuser/public_html myuser Third one probably did the thing I wanted, after logging in as a regular user I see the correct...
I am creating a new user with usual data $userdata = array( 'user_login' => $user_nickname, 'first_name' => $user_first_name, 'last_name' => $user_last_name, 'user_pass' => wp_hash_password($user_password), 'user_email' => $user_email, 'role' => $user_role ); $user_id = wp_insert_user($userdata);
I am creating instant search which is calling url like so /posts?search=something&posts_per_page=5 or /product?search=something&per_page=5 This works but isn't as fast as I was hoping to be and returned data has quite a lot rubbish I would say. I get content, excerpt, meta, product category, tag, Yo...
In main PHP files developers put this for security at the top of a file. Should this be placed also in partial smaller files which are called with get_template_part('partials/...')? Because when inspecting some themes I didn't see the code so far defined( 'ABSPATH' ) || exit;
Is it possible for VScode to be aware of wordpress functions inside a theme? If I am calling a function in page.php template, it would be cool if I could just alt+click it and it would open that function in a new tab so I can edit it. This way productivity would be better, currently I use search all...
This is the code for showing archive of posts as pure links. The problems is that date format is slightly wrong, year should have a dot at the end (F Y.) Docs https://developer.wordpress.org/reference/functions/wp_get_archives/ Currently it is displaying: Prosinac 2021 (9) ...while it needs to show...
I am trying to get the most popular tags for each category. Any idea how to accomplish this? The following code retrieves the most popular tags. But how to get popular tags only for a specific category ID? $terms = get_terms(array( 'taxonomy' => 'post_tag', 'orderby' => 'count', 'order' => 'DESC', '...
After uploading original image, the quality is good BUT there is a noticeably difference on a resized one. It looks slightly blurry and white color isn't as white. wp-content/uploads/image.jpg wp-content/uploads/image-583x390.jpg I am literally seeing the difference when opening pure URLs so it is n...
I am not sure what is the difference between theme_location and menu? https://developer.wordpress.org/reference/functions/wp_nav_menu/ add_action('after_setup_theme', 'theme_setup'); function theme_setup() { register_nav_menus(array( 'primary' => ('Primary Menu', 'ms'), )); } Both of this work the s...
Shouldn't there be a featured posts option in vanilla WordPress? I don't see that under Screen Options. If that is not enabled by default, is there a function which then enables me to select which posts should be featured in the BACKEND? Something like add_theme_support(...) because I can't find it?...
So http2 is out for a while, do you optimize something around it or you just let it go? :) I am using Gulp for years now and been merging css (scss) when developing. I am thinking about splitting it up in smaller pieces now
As the title says, is it possible to show a list of posts which belong to both specific category and a specific tag, WITHOUT manual querying? I am trying to create some filters and I was hoping to create it simply with just URL triggering...
I am creating custom theme for a client. I have registered a CPT, this is usually only a template which shows all posts that belong to this post type, but I would like to add more content to it with slightly different design. What would be the most convenient place to set it up? I am using ACF PRO....
Is it possible to retrieve posts which are inside two or more categories? What would be the URL to get them? I have tried these two: http://localhost/web/?cat=[2704,784] // Results are the same as http://localhost/web/?cat=2704 http://localhost/web/?cat=2704&cat=782 // Results are the same as http:/...
I am curious how WP auto updates if we turn that option on: Does it update whenever there is a new version, like instantly? Is the website visible perfectly normal to visitors and they don't see a message about this - in cases where a cache plugin is activated?
Usually I select a word in editor, click on a button to add a link, I type in the name of the post I want to link to, select it and out of habit I press Enter. This doesn't confirm adding the link but deletes it. Pretty annoying I know I should click the blue button to confirm it but it would be bet...
I have a list of items which I often need to copy paste in editor. Is there a way I could preformat elsewhere so that WordPress understands and formats the list as actual list? For example, if I have a list like this created in Sublime Text, I can easily prepend * to each items for Markdown and Redd...
Whats the deal with WP themes on ThemeForest costing like $2000? https://themeforest.net/search?platform=WordPress&rating_min=4&sales=rank-3,rank-4&sort=price-desc#content They seem pretty shitty as well. Are they trying to get user attention just because we can sort by price? Even $100 themes seem...
I am trying to learn how to create goals in Google Analytics with Contact Form 7. I have multiple pages with the same form, how can I see the URL on which page user sent a message? So I can see which page converted the most https://contactform7.com/tracking-form-submissions-with-google-analytics/
Here is a simple code which will show word count for each post in admin listing. Works only after a post have been saved. Why is the number so different compared to the one in editor? add_filter('manage_posts_columns', 'my_columns'); function my_columns($columns) { $columns['wordcount'] = 'Word coun...
I am using ACF PRO to set field groups on various pages. Each field group is duplicated for each language. I have updated plugins yesterday and now I see all bunch of red exclamation marks which on hover show message that I should set translation preferences for each field. Those options are: Don't...
How can I control REST API? I am creating a website with React for learning purposes, so I am only fetching data from WordPress. For blog page I would like to get all posts for currently paginated page, and I get this because inside WordPress I am controlling this by settings posts_per_page to 9 add...
I am not sure how to use Query Monitor with REST API? When I open regular pages all data is there to inspect but here I don't know where to start :) I am just curious In docs they say "It includes some advanced features such as debugging of Ajax calls, REST API calls, and user capability checks"