I have a page containing a post grid. Within the text of these posts I want to use a shortcode to display the title of the page containing this grid. So, when my page title is "test" I want to be able to display "test" within the content of my post text in the post grid. I made this simple shortcode
function page_title_sc( ){
return get_the_title();
}
add_shortcode( 'paginatitel', 'page_title_sc' );
but this code displays the title of the post in my grid, not the title of the page containing this grid. Is there a way to change this shortcode so it can display the page title instead of the post title?