404 when Previewing an unsaved draft

Open the wp-config file and replace the line that reads define(‘WP_DEBUG’, false); with: if ( isset($_GET[‘debug’]) && $_GET[‘debug’] == ‘1’ ) { define(‘WP_DEBUG’, true); } elseif ( isset($_GET[‘debug’]) && $_GET[‘debug’] == ‘2’ ) { define(‘WP_DEBUG’, true); define(‘WP_DEBUG_DISPLAY’, true); } elseif ( isset($_GET[‘debug’]) && $_GET[‘debug’] == ‘3’ ) { define(‘WP_DEBUG’, true); define(‘WP_DEBUG_LOG’, true); } After adding … Read more

Trim Post Content on Home Page

On your theme folder, open the index.php (or, home.php, or, front-page.php), and find, if there is a function named: the_content() Just change it to: the_excerpt() P.S.: If you can’t find the_content() in the mentioned file, try searching content.php, and in this case, change it with caution. Because in theme TwentyTwelve, it’s used with conditional tags … Read more

Live reload preview just reloads forever

This is from the Editorskit plugin, it is not a part of WordPress. If it’s broken you will need to contact their support routes. ( Based on finding the description text verbatim in a github search, resulting in a file in the preview extension of editorskit )

preview_post_link for Custom Post Types

Two problems here: #1 You’re missing the $accepted_args argument in: add_filter( $tag, $callback_function, $priority, $accepted_args ); Check out the Codex here for more info on that. #2 Note that $link . “?program_year=2016” is problematic, since it gives us this kind of link: /?p=123&preview=true?program_year=2016 But using instead add_query_arg( [ ‘program_year’ => ‘2016’ ], $link ) we … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)