Archived topic
Click the article link on page A to jump and then go to the new page B. How to s
22 replies · Started by RYAN on December 23, 2022
That is, when I click any article appearing on the home page, it will not appear on the new tab. How to set the home page? I can't set it in the menu
There is no option in the menu
I see. Can you share admin login credentials? We'll take a closer look at the issue.
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Yes, my friends I trust you
So, if you do not want the Home menu item to open in a new tab, uncheck the "Open the link in a new tab" in its menu settings. See: https://share.getcloudapp.com/GGuJWrmG
If you're referring to something else, let us know.
I know that
But I'm not talking about that. What I want is that when I click any article on the home page, I can open it on the newly created page, not on the original home page,
Just like other pages, when I click the article in it, a new page will pop up and open. I want this effect
So the current problem is that the home page does not have this effect. How can I set it and how can I have this effect like other pages
I see. Thank you for clarifying. Can you also try adding this Snippet:
add_filter('generate_featured_image_output', function($output){
if(is_home() && !is_admin()){
$my_search='href="';
$my_replace='target="_blank" href="';
$output = str_replace($my_search, $my_replace, $output);
}
return $output;
}, 10);
add_filter('generate_get_the_title_parameters', function($output){
if(is_home() && !is_admin()){
$my_search='href="';
$my_replace='target="_blank" href="';
$output = str_replace($my_search, $my_replace, $output);
}
return $output;
}, 10);
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
Ok, it's finally OK. Thank you for your patient reply. I'm very lucky to meet you
You're welcome, Ryan!
