admin管理员组文章数量:1130349
please help me to display only tables on a canonical page
main page
<table style="height: 198px; width: autopx;">
<tbody>
<tr style="height: 20.8px;">
<td style="width: 333.283px; height: 20.8px; text-align: center;"><strong>Filename</strong></td>
<td style="width: 56.7167px; height: 20.8px; text-align: center;"><strong>Size</strong></td>
<td style="width: 195px; height: 20.8px; text-align: center;"><strong>Download</strong></td>
</tr>
</tbody>
</table>
want to display table content only on the download page
now using <?php the_content(); ?>
which shows full content
please help
please help me to display only tables on a canonical page
main page https://www.printerdriverforwindows/hp-deskjet-ink-advantage-3700-driver
<table style="height: 198px; width: autopx;">
<tbody>
<tr style="height: 20.8px;">
<td style="width: 333.283px; height: 20.8px; text-align: center;"><strong>Filename</strong></td>
<td style="width: 56.7167px; height: 20.8px; text-align: center;"><strong>Size</strong></td>
<td style="width: 195px; height: 20.8px; text-align: center;"><strong>Download</strong></td>
</tr>
</tbody>
</table>
want to display table content only on the download page
now using <?php the_content(); ?>
which shows full content
please help
Share Improve this question asked Dec 25, 2018 at 3:07 Ashija PramodAshija Pramod 12 bronze badges1 Answer
Reset to default 0You can try this. Let put the following code at the end of file functions.php on the theme or child theme.
add_action('wp_head', 'custom_show_table_on_download_page', 20);
function custom_show_table_on_download_page() {
if(is_single()){
echo '<style type="text/css">.dpage {display: none !important;}</style>';
}
}
please help me to display only tables on a canonical page
main page
<table style="height: 198px; width: autopx;">
<tbody>
<tr style="height: 20.8px;">
<td style="width: 333.283px; height: 20.8px; text-align: center;"><strong>Filename</strong></td>
<td style="width: 56.7167px; height: 20.8px; text-align: center;"><strong>Size</strong></td>
<td style="width: 195px; height: 20.8px; text-align: center;"><strong>Download</strong></td>
</tr>
</tbody>
</table>
want to display table content only on the download page
now using <?php the_content(); ?>
which shows full content
please help
please help me to display only tables on a canonical page
main page https://www.printerdriverforwindows/hp-deskjet-ink-advantage-3700-driver
<table style="height: 198px; width: autopx;">
<tbody>
<tr style="height: 20.8px;">
<td style="width: 333.283px; height: 20.8px; text-align: center;"><strong>Filename</strong></td>
<td style="width: 56.7167px; height: 20.8px; text-align: center;"><strong>Size</strong></td>
<td style="width: 195px; height: 20.8px; text-align: center;"><strong>Download</strong></td>
</tr>
</tbody>
</table>
want to display table content only on the download page
now using <?php the_content(); ?>
which shows full content
please help
Share Improve this question asked Dec 25, 2018 at 3:07 Ashija PramodAshija Pramod 12 bronze badges1 Answer
Reset to default 0You can try this. Let put the following code at the end of file functions.php on the theme or child theme.
add_action('wp_head', 'custom_show_table_on_download_page', 20);
function custom_show_table_on_download_page() {
if(is_single()){
echo '<style type="text/css">.dpage {display: none !important;}</style>';
}
}
本文标签: functionsOnly display table in thecontent() in canonical page
版权声明:本文标题:functions - Only display table in the_content() in canonical page 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749069643a2311376.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论