[英]Trouble with Wordpress 'Sobre' theme?
I am editing a purchased wordpress theme ('Sobre') for a friend and am having trouble with the background image to display. 我正在为朋友编辑购买的wordpress主题(“ Sobre”),并且显示背景图像时遇到问题。 On the content-page.php the code reads:
在content-page.php上,代码显示为:
$bg_image = sobre_get_post_option($queried_object_id, 'page_heading_bg/url', $default_value = null);
To which I've changed/replaced with: 我已更改/替换为的内容:
$bg_image = sobre_get_post_option($queried_object_id, '<?php echo get_template_directory_uri(); ?>/wp-content/uploads/2018/05/img1.jpg', $default_value = null);
When I live preview I continue to see a grey background. 实时预览时,我继续看到灰色背景。 When I view the source code that line of code is missing.
当我查看源代码时,缺少该行代码。 Any thing I can try/do differently?
我可以尝试/做其他事情吗?
您不会再次启动<?php
,当您已经在用php编写代码时,我会猜测这实际上是您想要的:
$bg_image = sobre_get_post_option($queried_object_id, get_template_directory_uri().'/wp-content/uploads/2018/05/img1.jpg', $default_value = null);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.