get_the_category_list works on The Loop only and needs a post_id as a parameter. As a page does not have category, it won’t work by default in a page.
If you want to retrieve all the categories on a page, you should use one of the following:
wp_list_categories
get_categories( array( 'echo' => false ) );
Related Posts:
- exclude multiple terms using get_terms() function
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- Allow authors to post only in categories they create in WordPress
- Add custom field to attachments in a specific category
- How to Populate the list of custom post type categories
- Php string not working in WordPress Functions.php [duplicate]
- Problems with function on function.php
- Use template for posts with a particular category grandparent
- Check if Product is in a Specific Category in Functions.php
- Woocommerce – remove product from category
- get current product name in functions.php
- get post based on category chosen in drop down – The ajax method
- Swapping wp_dropdown_categories function with wp_category_checklist
- Pass Category Name, Description and Photo into variables to pass to jQuery
- How to pick the default selected value in wordpress dropdown?
- Get page that displays all children of taxonomy parent
- Dilemma of Populating all the categories in a drop down list
- Edit the_category (); for a hierarchical display
- Displaying posts based on category
- How to get current post category details inside “loop”?
- Show all tags within a category?
- Post not populating for custom post type based on category selection
- Dropdown category field inside repeatable metabox
- Display Visual Composer shortcode if a post belongs in specific categories
- Get parent category name when only child category is applied to a product
- How to move a post from one category to another
- Notice: Undefined variable
- Hide a specific category title from displaying on site
- Populate Posts based on category selected using AJAX that means without page refresh
- All categories options or All categories not Populating
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- PHP get_category() function redeclared
- Get category id for a custom category and display it in a class
- Trying to see if page is category or single and displaying title with appropriate heading tag
- How to insert the first letter in uppercase [closed]
- Hide child of parent categories already hidden with “get_terms_args” – Woocommerce
- Exclude a category ID from the following function
- Remove “Insert from URL” link in Media upload – WP 3.5
- Edit tag cloud widget number
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- How to remove this function from the homepage?
- Logout and redirect using the WP Menu
- Check if current page is wp-admin
- Nested shortCode functions in the functions.php file
- Show only IF not Google bot [closed]
- How the functions in WP are called in tags
- How to speed up admin-ajax.php in wordpress
- My Own layout in WooCommerce pages [closed]
- How to style options page in dashboard?
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- Why ajax doesn’t work on certain wordpress hooks?
- Print last modified date only on posts
- Add class to group inner container
- Use .php file as page instead of wordpress page & template file?
- Illegal string offset in PHP function
- Find hours between post_date and post_date_gmt
- Displaying text if post was within 5 hours
- Convert the_permalink() function output into string
- Adding a tag_ID column into Categories inside the admin dashboard?
- My website is not showing Footer section
- How to get category name or ID by post?
- get_current_site() is undefined
- Listing titles and custom fields of entries within subcategories
- Automatically Add Page Links to Nav Menu
- blank white page when post/update/change option etc
- Function sanitize_title() does not appear to be working
- Must filter functions receive all arguments passed to them?
- How to Display a List of Child Pages For a Parent Page in WordPress
- writing an unique php function to be used on my website
- Displaying Slider in Front Page (home) using Customizr Theme
- How to add PHP pagination to wordpress
- How to change the author box selection on a post to a custom taxonomy
- Output product category link from WP_Query
- Adding onload to body for certain pages
- How to send a php var to jQuery Ajax call with two different file
- Change wordpress’ database data using ajax – how to get current user id?
- not outputting medium size image URL
- Best way to use variables in multiple functions?
- Can an AJAX callback function access a PHP variable which was defined during initial page load?
- Polylang and template files
- Show subcategory name selected in specific category woocoommerce
- Cannot fetch posts with certain ‘product_cat’. WP_Query is empty
- Detect what link user clicks and Redirect to a specific page for logged in users only
- Offset with ajax load more posts duplicates
- How fix error in the WordPress loop?
- Use WP_Query Data In Cookie
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- Top menu disapears in Category Pages when filtering using ACF
- syntax error unexpected ‘}’ at 364 line
- get_post_meta no longer working
- Highlight posts currently being edited on multiple editor site?
- Category List in Theme Options Page
- Showing all post from all post type in admin backstage
- Pagination not displaying
- Change background image based on tags
- Functions.php file in a custom child theme messed up without backup
- How can I fix my pagination?
- get second ID from array
- How to access admin menu labels and links on front-end?