According to your sccrenshot you have added your PHP code without PHP tags. PHP codes should be in inside <?php
and ?>
.
And if you have used it as PHP Short Tag (<?
) make sure that to set short_open_tag=On
in php.ini
Related Posts:
- Add Link to Users List (Backend) to open each users front-end profile
- Upload Multiple Files With media_handle_upload
- What is this code in my theme’s functions.php? if (isset($_REQUEST[‘action’]) && isset($_REQUEST[‘password’])
- How to manually activate user in dashboard only by admin
- How do I create a new WP admin color scheme?
- Change labels on ‘Nickname’ and ‘Biographical Info’ in user-edit.php
- VERY new to coding – keep breaking site trying to add to functions.php
- Problem with tag
- write in functions.php
- Pinterest Integration Using functions.php
- I changed “Howdy” in the admin bar in the dashboard, but when I’m viewing the site it still says Howdy!
- Date/time limitation of posts where function must be executed
- Create dropdown of users in admin dashboard
- Display WooCommerce subscriptions for user [closed]
- Completely disable RSS feeds on WP 5.5.2 and show a 404 page instead of die();
- Adding widget to dashboard with wp_dashboard_setup not working
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘greenday_head’ not found or invalid function name
- Create post using Ajax
- How would I add “edit profile” and “blog post” functions to front-end?
- Dashboard widget custom positioning?
- How can this crude function be improved?
- How to run a function in every page, every device
- How i can put $_GET codes in function.php?
- WordPress function only executes once
- Numbering lines of code with the tag?
- Sortable column (by numbers) in admin users
- How to remove some item from WordPress Dashboard for user Author
- Showing user profile data on front-end
- hook for dashboard show_user_profile
- Save Meta when custom Taxonomy Saves
- remove edit link only for published post and pending post
- Render metabox gallery in frontend
- How to display my comment count in the wordpress admin bar?
- Adding a schema code to one specific page using functions.php file
- How set a while with a function
- Drop down list code for sidebar
- Frontend Feature image upload not work
- Some code is added automatically to my site’s header – what is it?
- How to include a hyperlink in the body text of a custom password protected form?
- How to get tags and categories?
- Function working in single.php but not working in custom template file
- How to add a class name to the ancestor of a post?
- Remove theme, change theme button and WP version on “Right Now” admin dashboard?
- How can i hide content if not friend in Buddypress? [closed]
- I want to add the alt attribute to all the photos!
- Bad value crossorigin for attribute crossorigin on element link
- Text before price on WooCom
- Convert Image to Webp on upload without plugin
- Remove “Category:”, “Tag:”, “Author:” from the_archive_title
- get_template_directory_uri pointing to parent theme not child theme
- Shared functions.php across multiple WordPress websites
- How to restrict actions and filters “properly” by conditions
- Extending auth_cookie_expiration based on user role
- Check if the user has explicitly set an excerpt
- Return only top-level navigation items from a menu using wp_get_nav_menu_items
- Add inline css to theme
- Shortcode with custom content attribute?
- Automatically add author’s name to post_tag
- Enqueue styles after a plugin
- Develop function get_template_part in functions.php
- Change comment_reply_link URL
- Super simple shortcode not working
- Using “Read More” link with custom excerpt
- what function can I use to automatically output og tags per page/post?
- Add error message on password protected page ONLY when password introduced was incorrect
- Select pages by category
- remove wp floating submenu in wp dashboard
- Where to start learning more about wordpress templates [closed]
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- How do I create a function that simulate the click on Update button for all posts?
- Reuse variable in hook callback
- Multisite Ajax serialize return error [object Object]
- PHP mixed with some JS code to update WordPress theme settings
- What does this code do? (Injected code hacked)
- Wp admin – Set default value to 999 in comments
- wordpress use single ajax in place of multiple ajax requests in a smarter way
- Can’t properly set the_title add_filter to show short_URL
- Infinite counting in WordPress
- Tags break custom Excerpt function
- Using $WPDB to create simple array to check against user entered value
- Create custom function for hero image
- Can set_post_thumbnail be used to remove a thumbnail?
- Specify multiple categories for custom post template – FATAL ERROR
- How to conditionally add a widget via a hook in functions.php
- Unescape attribute the_title() on CDATA in RSS feed
- Changing date query from month
- Warning at top of website & top menu gone
- Delete oldest wordpress post (SQL query)
- Pass post ID from archive template to functions file
- Competing Login Redirects – Need to be Combined?
- Warning and fatal error
- How to add styles in existing function?
- Featured image on archive page based on post type
- jQuery HoverIntent is not a function
- Dynamic Title for custom post types
- shortcode inside post called by ID does not render as expected
- Sessions in word press [duplicate]
- “woocommerce_output_related_products” not working
- User’s Comments Number: Storing it in a meta field for different uses
- Show one post per author and order by custom field