[WordPress] Use "file_get_contents()" To Load File
When we using PHP to develop a WordPress plugin, we always need to read/load some file. Simply put, we can use file_get_contents()
to do it.
When we using PHP to develop a WordPress plugin, we always need to read/load some file. Simply put, we can use file_get_contents()
to do it.
If we want to replace some content of a string (it is a common thing), we can use str_replace()
to do it.
We may be need to get the user data when we developing a WordPress plugin, for example, check the current user has registered; or list the writer of the site on a page... etc., The application scenarios are endless.
Read More »[WordPress] How to Use PHP Program to List the User DataWhen we developing the WordPress plugin, we can simply use register_setting()
, get_option()
, and update_option()
function to store some plugin settings in the database.
Today I want to record a bit of strange requirement: how to use WordPress core function in external PHP file. I think some people may need it in future, because I see the same problem on stackoverflow (https://stackoverflow.com/questions/29791763/use-get-option-in-external-php-file).
Read More »[Solved] How to Use WordPress Core Function in External PHP FileMany different themes provide many different function page, some page have pretty UI and surprise function, but if you check their content in wp-admin, you will find the page content is blank!
Read More »[WordPress] Use PHP Program To Edit A Specific Page ContentToday when I trying to add a new function on my WordPress website, the code I create have no any display, but there is a new warning message pop up:
Read More »[Solved] Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'change page_content' not found or invalid function name inToday when I developed a WordPress plugin, the menu program encountered the following syntax parse error message:
Read More »[Solved] Parse error: syntax error, unexpected ''lists_page'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /var/www/html/wp-content/plugins/reserve-course/reserve-course.php on line 54When we developing the WordPress plugin, if we upload the plugin to the test website directly, sometimes may cause the website display fatal error.
Read More »[WordPress] How To Enable The DEBUG Function To Detect ErrorThe websites built with WordPress such as blog-type, tag cloud is an often widget on the sidebar, and the styles are often base on the current website theme.
Read More »[WordPress] Customize The Size and Style of The Tag Cloud