サポート » プラグイン » All in One SEO 4.0.17タイトルが表示されない

  • All in One SEO 4.0.17インストールしたのですが、プラグインで設定しているトップページタイトルのみが表示されない。

    新規インストールをしています。

    公開前のサイトとなります。

    ヘルプの必要なページ: [リンクを見るにはログイン]

15件の返信を表示中 - 16 - 30件目 (全32件中)
  • トピック投稿者 fuusen69

    (@fuusen69)

    テーマは自作です。alcuesto様に直接メッセージを送る方法等はありませんか?見ていただけるのであればIDをお作りしたいと思いまして

    大変恐れ入りますが、wordpress.orgのガイドラインに抵触しますので、
    当フォーラム内で直接のメッセージのやり取りなどは出来ないです。

    自作というのは、先ほどのご回答も合わせると、元々あるテーマを編集して自作したという認識でよろしいでしょうか。
    であれば、編集した部分のコードが上手く反映されていないか、元々のテーマの仕組みによる問題かもしれません。

    トピック投稿者 fuusen69

    (@fuusen69)

    なるほど、だめなんですね。
    テーマは一から作ってます。
    今プラグインを停止しました。
    設定→一般に表示している内容が表示されています。

    All in One SEOの旧バージョン(3.7.1)なら、問題無いのであれば、
    旧バージョン(3.7.1)をインストールしたらいかがでしょうか。

    特に支障は無いかと思いますが。

    横槍失礼します。

    今回の問題が解決するかどうかは分かりませんが、タイトルを出力する方法が古い (WP 4.0以前) ようなので、新しい方法 (add_theme_support( 'title-tag' )) に変更してみてはどうでしょうか。

    こちらのページが参考になると思います。
    https://tech-dig.jp/get-title/

    トピック投稿者 fuusen69

    (@fuusen69)

    ishitaka さま

    ありがとうございます。
    functions.phpに追加するだけのものなのでしょうか?

    add_theme_support( 'title-tag' );

    を functions.php に追加すると、自動でタイトルタグが挿入されるようになります。そのままだと既存のタイトルと重複してしまうので、既存のタイトルの出力を削除することになります。

    トピック投稿者 fuusen69

    (@fuusen69)

    ishitaka さま

    追加しました。
    functions.phpの入れる場所が悪いのか変わっていないような気がします。

    追加するとallinoneタイトルは表示されず

    設定→一般に表示している内容が表示されています。

    ソース上ではallinoneタイトルは表示されています。

    <title>JR関⻄本線</title>

    allinoneのソース上にも
    <title>JR関西本線(JR亀山駅ーJR難波駅)路線図・停車駅・時刻表</title>

    両方あるようです。

    ヘッダーより<title>JR関⻄本線</title>を削除すると
    <title>JR関西本線(JR亀山駅ーJR難波駅)路線図・停車駅・時刻表</title>が表記されるようになりますが、
    今度はサブページの後ろの表記がおかしくなっているように感じます。

    • この返信は3年、 1ヶ月前にfuusen69が編集しました。
    • この返信は3年、 1ヶ月前にfuusen69が編集しました。
    • この返信は3年、 1ヶ月前にfuusen69が編集しました。
    • この返信は3年、 1ヶ月前にfuusen69が編集しました。

    追加するとプラグインタイトルは表示されず

    設定→一般に表示している内容が表示されています。

    それで問題ないと思うのですが、何か問題がありますでしょうか?

    • この返信は3年、 1ヶ月前にishitakaが編集しました。
    トピック投稿者 fuusen69

    (@fuusen69)

    プラグインタイトルはJR関西本線(JR亀山駅ーJR難波駅)路線図・停車駅・時刻表で設定しておりますが、WP設定→一般のタイトルが表示されるようになりました。

    • この返信は3年、 1ヶ月前にfuusen69が編集しました。

    今度はサブページの後ろの表記がおかしくなっているように感じます。

    あとは、All in One SEO プラグインの設定を変更してみてください。

    タイトルタグが重複しています。古い表示 (header.php あたり?) を削除しないと、新しいタイトルは反映されないと思います。

    トピック投稿者 fuusen69

    (@fuusen69)

    そこが一番わからない場所です><

    トピック投稿者 fuusen69

    (@fuusen69)

    ちなみにヘッダーは

    <!DOCTYPE html>
    <html <?php language_attributes();?>>
    <head>
    <meta charset=”<?php bloginfo(‘charset’);?>”>
    <title>
    <?php if(!is_home()){
    wp_title(‘|’,true,’right’);
    }
    bloginfo(‘name’); ?>
    </title>
    <meta name=”google-site-verification” content=”_LnSM5NKy-PkmLbMfGgR7276phbysrV85Wc7Rjs6cnk” />
    <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
    <script async custom-element=”amp-ad” src=”https://cdn.ampproject.org/v0/amp-ad-0.1.js”></script&gt;
    <!–[if lt IE 9]>
    <script src=”html5shiv.js”></script>
    <![endif]–>

    <link rel=”stylesheet” href=”<?php echo get_stylesheet_uri();?>” />
    <link href=”<?php echo(get_template_directory_uri()); ?>/css/import.css” rel=”stylesheet” type=”text/css” />
    <?php wp_enqueue_script(‘jquery.scrollUp’, get_template_directory_uri() . ‘/js/jquery.scrollUp.js’, array(‘jquery’)); ?>
    <?php wp_enqueue_script(‘jquery.accordion’, get_template_directory_uri() . ‘/js/jquery.accordion.js’, array(‘jquery’)); ?>
    <?php wp_enqueue_script(‘jquery.scroll’, get_template_directory_uri() . ‘/js/jquery.scroll.js’, array(‘jquery’)); ?>

    <!–[if lt IE 9]>
    <?php wp_enqueue_script(‘html5shiv’, get_bloginfo(‘template_url’) . ‘/js/html5shiv.js’, array(‘jquery’)); ?>
    <![endif]–>

    <?php wp_head(); ?>

    </head>

    <body <?php body_class(); ?>>
    <script type=”text/javascript”>

    window.onload = function(){

    jQuery(function($){
    $(function(){
    // 設定
    var $width = “100%”; // 横幅
    var $height = “100%”; // 高さ
    var $interval = 4000; // 切り替わりの間隔(ミリ秒)
    var $fade_speed = 2000; // フェード処理の早さ(ミリ秒)
    $(“#slide ul li”).css({“position”:”relative”,”overflow”:”hidden”,”width”:$width,”height”:$height});
    $(“#slide ul li”).hide().css({“position”:”absolute”,”top”:0,”left”:0});
    $(“#slide ul li:first”).addClass(“active”).show();
    setInterval(function(){
    var $active = $(“#slide ul li.active”);
    var $next = $active.next(“li”).length?$active.next(“li”):$(“#slide ul li:first”);
    $active.fadeOut($fade_speed).removeClass(“active”);
    $next.fadeIn($fade_speed).addClass(“active”);
    },$interval);
    });

    $(function(){
    $(“img.rollover”).mouseover(function(){
    $(this).attr(“src”,$(this).attr(“src”).replace(/^(.+)(\.[a-z]+)$/, “$1_on$2”));
    }).mouseout(function(){
    $(this).attr(“src”,$(this).attr(“src”).replace(/^(.+)_on(\.[a-z]+)$/, “$1$2”));
    }).each(function(){
    $(““).attr(“src”,$(this).attr(“src”).replace(/^(.+)(\.[a-z]+)$/, “$1_on$2″));
    });
    });
    });
    }
    </script>

    <header class=”header1″>
    <!– headerここから –>
    <div class=”header-flex”>
    <div class=”logo-area”>
    <h1 id=”logo”>“>JR関西線</h1>
    <div id=”title_t”>
    <h2>JR関⻄本線(亀山駅−難波駅)の路線図・JR関西本線の歴史<br class=”res767″>停車駅一覧・コンビニ情報・時刻表 – 駅探
    </h2>
    JR関西本線の時刻表 関西本線路線図・関西本線停車駅・関西本線駅情報・WIFI情報 – 駅探
    </div></div>
    /images/twitter.gif” width=”95″ height=”15″ alt=”twitter” class=”twitter”>
    </div>
    <!– headerここまで –>
    </header>
    <section id=”main_title”>
    <h2 class=”midasi”>JR奈良線京都山城お茶の京都</h2>
    /images/ochanokyoto.png” width=”100%” height=”auto” alt=”JR関西本線お茶の京都”></section>
    <section>
    <h3 class=”midasi”>JR関西本線季節のキハ120車両</h3>
    <div id=”slide” class=”slide-h”>

    • /images/mv01.png” width=”100%” height=”auto” alt=”JR関西本線キハ120”>
    • /images/mv02.png” width=”100%” height=”auto” alt=”JR関西本線夏のひまわりとキハ120電車”>
    • /images/mv03.png” width=”100%” height=”auto” alt=”JR関西本線木津川とキハ120電車”>
    • /images/mv04.png” width=”100%” height=”auto” alt=”JR関西本線雪が降る木津川とキハ120電車”>

    </div>
    </section>

    <div id=”wrap”>
    <!– JR関西線navここから –>
    <nav>
    <h3 class=”midasi”>JR関西線ナビゲーション</h3>
    <ul id=”nav_menu”>
    <?php wp_nav_menu(array(‘theme_location’=>’nav-menu’)); ?>

    <ul class=”drawer_menu”>
    <?php wp_nav_menu(array(‘theme_location’=>’drawer-menu’)); ?>

    </nav>
    <!– ハンバーガー –>
    <div id=”navToggle”>

    <div>
    <span></span> <span></span> <span></span>
    </div>
    <p class=”menu-text”>MENU</p>
    </div>
    <script type=”text/javascript”>
    // ハンバーガー
    const btn = document.querySelector(‘#navToggle’);
    const nav = document.querySelector(‘.drawer_menu’);

    btn.addEventListener(‘click’, () => {
    nav.classList.toggle(‘open-menu’)
    navToggle.classList.toggle(‘open-menu’)
    });

    </script>

    • この返信は3年、 1ヶ月前にfuusen69が編集しました。
    <title>
    <?php if(!is_home()){
    wp_title('|',true,'right');
    }
    bloginfo('name'); ?>
    </title>

    ここではないでしょうか。

    ※ このフォーラムでコードを貼り付ける場合は、コードを選択し [code] ボタンをクリック(逆クォートで囲む)してください。詳細は、フォーラムガイドラインの「コードの投稿」セクションをご覧ください。

15件の返信を表示中 - 16 - 30件目 (全32件中)
  • トピック「All in One SEO 4.0.17タイトルが表示されない」には新たに返信することはできません。