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
- Add custom css to specific user
- Change default color scheme in twentyfifteen child theme?
- WordPress Toggle Menu has stopped working
- Restrict access if logged out except for homepage
- Add meta data in head from theme
- Why is the term of my current page not returning a slug?
- Create New User Custom Field not Saving
- How to add styles in existing function?
- Keep Admin Logged In For a Year
- what is `get_section()` and how to use it?
- Override plugin function to show invoices even if not logged in
- get_field() with ID in one signal filter not working
- How to change form action of wp-login page with a function
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- function replace_text for entire page
- Changing author links on homepage to buddypress profiles – without affecting ability to link to author archive throughout the site
- i can’t use wordpress functions in ajax loaded php file
- Trying to load JavaScript only on pages within a PODS category/ custom post type
- How to add link rel tags on paginated posts?
- Woocommerce – Switching Price for Category
- Creating a “Related Meta” type field?
- Altering page / category names in breadcumbs
- Get value of pre-populated Gravity forms field as variable in my function
- How would I correctly implement a new if statement in a child functions file?
- Change user role based on total number of items ordered
- Help wiht adding fullcalendar.io to a WordPress page
- WP Enqueue Script Error
- Enqueue JS + CSS via a child theme functions.php file?
- Link to an externally created photo albums
- Multiple Notifications SetInterval
- Function stops working
- how can I change the read more link destinations and direct all to the same page?
- Shortcode displaying outside the div [duplicate]
- Hide empty custom field
- Removing sanitize_title_with_dashes Function with The Real Title
- How to add publish/draft button in Admin Post Lists
- Woocommerce custom calculation function
- button to toggle css styling / div visibility?
- add product thumbnail to checkout page only and include variation name
- Lost Your password Hook Not Showing Up
- Function/way to redirect to specific page whenever a specific text occurs on homepage?
- Redirect specific author posts to another url
- Is there is a way to check daily first login?
- my wordpress doesn’t save items to customized widget area
- How to add a cron job in my functions.php
- Add schema to Search result page’s body. Tried using is_search
- Remove all video attachment, both files and post/postmeta from database?
- Problem with email function
- admin-ajax.php 403 forbidden only when calling from external file
- Route wordpress with template
- Remove the delete link from pages without a plugin
- Shortcode Initialization in a Custom Theme