問題タブ [jetpack]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
1552 参照

javascript - WordPress functions.php 拡張機能の add_action('init') が Jetpack アクティベーションを壊しているように見えますか?

別の開発者がテーマ内のファイルを操作せずに WordPress の function.php ファイルにコードを挿入するように作成したこのプラグインに問題がありました。ダッシュボード コントロールに関するいくつかの問題を解決する行を追加しましたif (!is_admin()) {が、wordpress.com に接続して Jetpack を有効にしようとすると、サイトの本文に次のエラー メッセージが書かれたサイトのフロント ページに移動します。

見つかりません、エラー 404 お探しのページは存在しません。サイトのホームページに戻って、探しているものが見つかるかどうかを確認してください。または、下の検索フォームを使用して検索してみてください。

このプラグインを無効にすると、Jetpack の有効化が機能するようになりましたが、問題の原因を知りたいです。コードの一部に関係していることは確かadd_action('init', 'check_user_logged_in');ですが、何に置き換えるかわかりません。init を wp_head に置き換えようとしましたが、ページの別のプラグインでスタイリングが壊れます。何か案は?これが以下のコードです。

0 投票する
0 に答える
558 参照

wordpress - Wordpress template file for custom post type category (type) and tag pages?

I'm working with the Jetpack Portfolio module.

I have a custom archive (archive-jetpack-portfolio.php) which works great when going to mysite.com/portfolio.

But, when I go to mysite.com/project-type/thisthing or mysite.com/project-tag/thatthing it is still loading the standard template archive (archive.php).

How do I either get WP to use archive-jetpack-portfolio.php for project-type (basically categories in JetPack) and project-tag pages (the optimal situation I believe) or to add custom template pages for these?

Have tried the following:

  • category-jetpack-portfolio.php
  • category-jetpack-portfolio-thatthing.php
  • category-thatthing.php
  • taxonomy-jetpack-portfolio.php
  • taxonomy-jetpack-portfolio-branding.php
  • taxonomy-branding.php

None of those seem to work.

Have googled all over the answer, but nothing.