标签: wordpress-thesis-theme

如何在 WP-admin UI 中隐藏高级自定义字段(ACF)?

检查下面的屏幕截图;我想做的就是在 WordPress 后端隐藏自定义用户的某些 ACF 字段。

在此输入图像描述

wordpress wordpress-theming custom-wordpress-pages wordpress-thesis-theme

3
推荐指数
1
解决办法
7819
查看次数

如何在Wordpress中使用wp_mail()函数

<?php
if (isset($_POST['sbt'])) {
//user posted variables
  $name = $_POST['name'];
  $email = $_POST['email'];
  $message = $_POST['message'];

//php mailer variables
  $to = get_option('aaaa@gmail.com');
  $subject = "Report";
  $headers = 'From: '. $email . "\r\n" .
    'Reply-To: ' . $email . "\r\n";

echo "check";

//Here put your Validation and send mail
$sent = wp_mail($to, $subject, strip_tags($message), $headers);
      if($sent) {
      echo "sent";
      }//mail sent!
      else  {
      echo "failed";
      }//message wasn't sent
}
?>
Run Code Online (Sandbox Code Playgroud)

我已经开发了自己的文字出版网站,我需要在联系表单中使用WP_mail()函数。

请帮我。

wordpress wordpress-theming custom-wordpress-pages wordpress-thesis-theme

2
推荐指数
1
解决办法
2万
查看次数

为什么get_post_meta不起作用?

简单的Wordpress问题 - get_post_meta没有检索自定义字段值.这是从自定义字段中提取的代码:

<img src="<?php echo FCG_PLUGIN_URL; ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, 'slider_image', true); ?>&h=250&w=400&zc=1" alt="<?php echo $post_title; ?>" />
Run Code Online (Sandbox Code Playgroud)

在制作中,这是我得到的HTML:

<img alt="Post Title" src="http://***.com/wp-content/plugins/jquery-slider-for-featured-content/scripts/timthumb.php?src=/&amp;h=50&amp;w=80&amp;zc=1">
Run Code Online (Sandbox Code Playgroud)

你可以看到字符串中的src = point是空的 - 好像没有任何帖子从中发布.我已经隔离并回显了get_post_meta,它是一个空格.我100%肯定它在帖子中的名字是正确的 - 有什么东西在我这里丢失吗?

php wordpress templates wordpress-thesis-theme

1
推荐指数
1
解决办法
2万
查看次数