Only an admin can add new tags

To restrict non-administrators from adding new tags in the WordPress admin area, you can use a combination of WordPress hooks and capabilities checks. The idea is to disable the ability for users who are not administrators to create new tags while still allowing them to select from existing tags when editing posts. Here’s a custom … Read more

Permalink issue with new blog posts > getting 301 redirect

Your WordPress site is set up to include the date in the permalink structure for blog posts. To avoid the 301 redirects and have your desired permalink structure https://website.com/sample-post/ In the Permalink Settings page, you’ll see several common options for permalink structures. Choose the Custom Structure option: In the input field, enter /%postname%/ after save … Read more

List of published post dates only outputting one date

you are overwriting the $testlist variable in each iteration of the loop. You need to concatenate each date to $testlist instead. please try to fetch all posts from the past year and create a js array containing their dates and make sure to call the test() function where you want this script to be executed … Read more

Error counting posts of category

Every time you step through the outermost foreach() loop, your $total_count gets reset. Try this: $categories = get_categories([ ‘hide_empty’ => 0, ‘parent’ => 0, ]); $total_count = 0; foreach ($categories as $category) { $subcategories = get_categories([ ‘hide_empty’ => 0, ‘parent’ => $category->term_id, ]); $total_count += $category->count; // Adds the main category count foreach ($subcategories as … Read more

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