admin管理员组文章数量:1305513
I am trying to open the thumbnail image on a new page using WordPress. For example. I have all the detail of a single post on a page and if someone clicks on the link given on a single page it opens the thumbnail on another page as a child theme.
Single Page Code "single.php"
<a href="WHAT SHOULD I DO HERE" ); ?>">link to Another Page </a>
Theme of Another Page with name single-thumnail.php
<?php
/***
Template Name: Advertisement
***/
get_header(); ?>
<?php echo get_the_post_thumbnail_url(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
I am trying to open the thumbnail image on a new page using WordPress. For example. I have all the detail of a single post on a page and if someone clicks on the link given on a single page it opens the thumbnail on another page as a child theme.
Single Page Code "single.php"
<a href="WHAT SHOULD I DO HERE" ); ?>">link to Another Page </a>
Theme of Another Page with name single-thumnail.php
<?php
/***
Template Name: Advertisement
***/
get_header(); ?>
<?php echo get_the_post_thumbnail_url(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Share
Improve this question
edited Jan 25, 2021 at 14:14
fuxia♦
107k38 gold badges255 silver badges459 bronze badges
asked Jan 25, 2021 at 13:55
Pak WorkForcePak WorkForce
314 bronze badges
1 Answer
Reset to default 0You can pass post slug in the query string with your new page URL.
single-thumnail.php?post=slug
Fetched thumb image by post id and show.
本文标签: Open Image Thumbnail in a new pagewhile clicking on the link
版权声明:本文标题:Open Image Thumbnail in a new page, while clicking on the link 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741803313a2398353.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论