php - 如何在页面顶部放置文本块?
问题描述
我想把这个“文本块”放在页面顶部的后面栏(见图)。我该怎么做呢?我将该部分放在所有内容上,但突出显示的(图片中)文本不会放在顶部。
提前致谢
这是我目前拥有的代码
get_header();
while ( have_posts() ) : the_post();
get_template_part( 'blocks/top', 'block' );
$contact_html = '';
$phone = get_field('phone');
if($phone){
$call_phone = call_phone($phone);
$contact_html .= '<li><a href="tel:'. $call_phone .'">'. $phone .'</a></li>';
}
$email = antispambot(get_field('email'));
if($email){
$contact_html .= '<li><a href="mailto:'. $email .'">'. $email .'</a></li>';
}
$chat_link = get_field('chat_link');
if($chat_link){
$contact_html .= '<li><a href="'. $chat_link .'">'. __('Chat with us') .'</a></li>';
}
$distributor_page_url = get_field('distributor_page_url');
if($distributor_page_url){
$contact_html .= '<li><a href="'. $distributor_page_url .'">'. __('distributor locations') .'</a></li>';
}
$text_block = get_field('text_block');
$locations = get_field('locations');
?>
<div class="container width-1130">
<div class="text-block">
<?php echo $text_block; ?>
</div>
</section>
<?
?>
<section class="section-over-top-bg section-contact">
<div class="container width-1130">
<?php if($contact_html): ?>
<ul class="contact-list d-flex justify-content-between align-items-center f-d-column-520">
<?php echo $contact_html; ?>
</ul>
<?php endif; ?>
<div>
<script type="text/javascript" id="aoform-script-d225dfc1-a9ea-47cc-bfe8-080e93dc5922:</script>
</div>
</div>
</section>
解决方案
推荐阅读
- acumatica - 在更新合同价格中覆盖流程委托
- typescript - Ionic 3 在选项卡上使用带有 DeepLinkMetadataType 的 IonPage - 摆脱 tab-0
- vba - 网页抓取数据目的地
- sql - SQL Server SSRS 多个查找值
- google-analytics - 如何在 Google Analytics(分析)仪表板小部件中仅显示来自特定来源的流量
- node.js - Angular5 webpack ReferenceError:未定义窗口
- vba - 输出到两个工作表
- postgresql - 检测何时在 Spring Boot 2 应用程序上刷新数据库会话
- android - 如何在进行构造函数注入时向构造函数提供参数?
- php - Laravel 未定义索引:使用 PHPWord 和 DomPDF 的文档