What does choosing a Post Page do?

Why will choosing a “Post page” be useful? Because if your homepage is a static page, where will the main post archive go? It no longer exists, but you can bring it back by choosing a posts page. You do this by choosing a page that has the URL you want, and that URL wll … Read more

Overwrite style.css styles from index.php style

Add this code in your theme’s functions.php add_action(‘wp_footer’, ‘my_home_page_styles’, PHP_INT_MAX); function my_home_page_styles() { if(is_front_page()) { ?> <style> #main { margin-left: 0 !important; } .container { width: 95% !important; } </style> <?php } } Don’t forget to clearing your cache before refreshing. Use Ctrl + F5 to refresh in Google Chrome.

When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load

The URLs are greyed out in the Settings page because of the entries in the wp-config.php file. If there are entries for these values, those values override the values in the wp-options table, and the override makes the Settings values uneditable. See this in the Codex: https://wordpress.org/support/article/changing-the-site-url/ It is possible to set the site URL … Read more

Testing if current page is the static page set as home page

You can use the function is_front_page(). Put this where you want to check if is frontpage if( is_front_page() ) { echo ‘I am the frontpage’; } It returns TRUE when the main blog page is being displayed and the Settings->Reading->Front page displays is set to “Your latest posts”, or when is set to “A static … Read more

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