diff --git a/includes/class-gravityview-entry-link-shortcode.php b/includes/class-gravityview-entry-link-shortcode.php index 0eff217ade..dab70ad456 100644 --- a/includes/class-gravityview-entry-link-shortcode.php +++ b/includes/class-gravityview-entry-link-shortcode.php @@ -133,6 +133,10 @@ private function shortcode( $atts, $content = null, $context = 'gv_entry_link' ) $this->view_id = empty( $this->settings['view_id'] ) ? GravityView_View::getInstance()->getViewId() : absint( $this->settings['view_id'] ); + if ( empty( $this->view_id ) && get_the_ID() ) { + $this->view_id = get_the_ID(); + } + if ( empty( $this->view_id ) ) { gravityview()->log->error( 'A View ID was not defined and we are not inside a View' ); diff --git a/readme.txt b/readme.txt index c2a0c39197..b6d47c2d09 100644 --- a/readme.txt +++ b/readme.txt @@ -27,6 +27,7 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h * Timeout issue when rendering a page/post with GravityView Gutenberg blocks when Yoast SEO is active. * View editor fields added to the Single or Edit Entry layouts inheriting options from the View type set in the Multiple Entries layout. * An issue in the Search Widget configuration where adding a Date field caused the search mode ("any" and "all") to no longer be toggleable. +* `[gv_entry_link]` shortcode not rendering inside the Custom HTML block. = 2.25 on June 5, 2024 =