How to fix and hidden Warning/ Notices: error in WordPress

How to fix and hidden Warning/ Notices: error in WordPress

Sometime your site make any mistake by code or value: variable is empty, null, themes error, plugins error... WordPress may be display them in your screen. Some times, it is terrible. How to fix? You need to check your code and fix them.Follow message your get, see path file make issue. Open the file with editor and fix it. Usually message error display because variable name get null or empty value. For resolve you need check null/ empty or set default value.Example: Warning: Cannot assign an empty string to a string offset in …


Bảo toàn nội dung soạn thảo trong custom metabox có sử dụng trình soạn thảo HTML

Bảo toàn nội dung soạn thảo trong custom metabox có sử dụng trình soạn thảo HTML để hiển thị ngoài giao diện. //$metabox_content= str_replace(array("\\r\\n", "\\r"), "<br/>", $metabox_content); $metabox_content=wpautop($metabox_content);echo $metabox_content;   …



Fix lỗi Permission denied (13) in Unknown lỗi không có quyền ghi session

Fix lỗi Permission denied (13) in Unknown lỗi không có quyền ghi session

Một trong những lỗi thường gặp khi cài đặt và sử dụng WordPress là lỗi không có quyền ghi tập tin session trên PHP. Lỗi này xảy ra vì quyền của thư mục ghi session PHP 1 lý do nào đó đã bị thay đổi (server update...)Nếu bạn gặp thông lỗi như sau xuất hiện dưới chân trang Warning: Unknown: open(/var/lib/php/session/sess_***, O_RDWR) failed: Permission denied (13) in Unknown on line 0Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0 Thì bạn có thể sử dụng lệnh sau để …


How to fix “Uncaught TypeError: $template.get is not a function” in Visual Composer

Sometime before when my site updated WordPress version 4.5. I get a issue with "Uncaught TypeError: $template.get is not a function" in Visual Composer plugin.I'm debugging and search with error message and found an answer help me fixed this bug by updating the html2element function in file /wp-content/plugins/js_composer/assets/js/backend/composer-view.js from: /** * Convert html into correct element * @param html */ html2element: function(html) { var attributes = {}, $template; if (_.isString(html)) { this.template = _.template(html); $template = …


How to fix Warning: Cannot modify header information – headers already sent by

This error you can read more at: http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F but if you don't resolved, please consult my problem header("Location:".admin_url('admin.php?page=polygon-template-style-html-manager-add-category&polygon_excute_msg=delete-success')); exit(); If put function exit() here you maybe get an error "How to fix Warning: Cannot modify header information - headers already sent by...". So, remove it and check again maybe it's ok. …


How to insert content, banner, ads in between content in WordPress ? Developing your theme

How to insert content, banner, ads in between content in WordPress ? Developing your theme

In this post, i share How to insert content (banner/ Ads/ Google AdSense) in between Post or Page in WordPress. In my Polygon Theme i put any Sidebar:P/s: I'm sorry if you don't understand something i wrote because my English not good. Can you help me repair something i wrong in content ?. Thank you !Sidebar with title "Entry (between entry)" i'll put some Text Widget (Google AdSense script, banner...) for display in between content (posts or pages). Use reasonable in a content Of course, we haven't to put it (your ads script, short content...) to all post because some reasons: …


How to get current user role in WordPress ?

Hi everybody, this post i share about "How to get current user role in WordPress ?". If you developing plugins or themes in WordPress you need get user role and current_user_can is function help you do that.<?php if(current_user_can('administrator') ) {//Do action here if role valid is administrator;}?>If you need to check more role, you can check current user role with array roles. <?php$user = wp_get_current_user(); $check_roles = array('administrator','editor', 'author','contributor'); if( array_intersect($check_roles, $user->roles ) ) { //Check anh do …


How to Fix error Image Upload Issue in WordPress

How to Fix error Image Upload Issue in WordPress

Today, i shared an article on how to fix common media problems in WordPress. Not too long after, my blog have a problem with media upload. Basically i couldn't upload any media (image), and if the upload goes through it will show images in the media library as broken. In this article, i will help you "how to fix upload issue in your site build in WordPress".This issue is most commonly caused by wrong file permissions. Your uploads directory should have correct file permissions otherwise WordPress will not be able to store your files in it or sometimes may not even display files from the …


Fix 403 Forbidden Access is denied, comment in WordPress

Hi you ! When you found this content, you're have a problem with comment in WordPress "can't comment in your website". When you customize permalinks in WordPress or install new plugins ... it requires you change content, optimize .htaccess fileAnd horrible your page display 403 Forbidden. When 403 Forbidden error in your website / blog, followed your have to change CHMOD types but can't fix 403 Forbidden: Access is denied. My blog really getting a problem with comments. Every time comment (no login status), it will redirect 403 Forbidden error on wp-comments-post.php. What happen …