Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
fix(latest-link): use home link only if the custom post type is 'post'
Browse files Browse the repository at this point in the history
  • Loading branch information
DAreRodz committed Oct 23, 2018
1 parent 5d7f323 commit 5182bd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wp-pwa.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ function get_latest_from_cpt($cpts) {
if (post_type_exists($cpt)) {
$cpt_object = get_post_type_object($cpt);
if ($cpt_object->show_in_rest) {
if (get_option('show_on_front') === 'page' &&
if ($cpt === 'post' &&
get_option('show_on_front') === 'page' &&
get_option('wp_pwa_settings')['wp_pwa_force_frontpage']) {
$link = get_option('home');
} else {
Expand Down

0 comments on commit 5182bd5

Please sign in to comment.