Misuse of "page_on_front" option in the whole code ?
-
Hi,
The option “page_on_front” will, in some cases, return an ID even if the front page has been set to show the latest posts:
it will return the ID of the page that was set BEFORE switching to latest posts.
Just to make it clear: for example you set the front page to page ID 2
Then you set the front page to show the latest posts
=> option “page_on_front” will still return ID 2, even if no page is displayed on frontFor example, in the plugin’s Settings page, the setting “When using static front page, redirect the language page (example: http://localhost/example/en/) to the front page in the right language” will not be disabled EVEN in the case I chose the front page to display the latest posts:
The testget_option('page_on_front')
should be replaced byget_option('show_on_front') == 'page'
If i’m not wrong, the whole code should be reviewed.
But I installed WordPress some days ago, so don’t take for granted all what I say:)
- The topic ‘Misuse of "page_on_front" option in the whole code ?’ is closed to new replies.