「メイド・イン・ヘブン」スキン適用中

Cocoonフォーラム

サイト内検索
書き込みの前に以下の3点をご確認ください。
  1. 1つのトピックにつき1つの質問を書き込んでください
  2. 不具合・カスタマイズ対象ページのURLを提示高速化を無効にしてください
  3. 該当部分のキャプチャ・環境情報とともに書き込んでいただけると助かります

何を書き込んだら良いか分からない場合は、以下のテンプレートをコピペしてご利用ください。

不具合・カスタマイズ対象ページのURL:

相談内容:

不具合の発生手順:

解決のために試したこと:

※文字だけでは正しく伝わらない可能性があるため、スクショ画像の添付もお願いします。
※高速化設定をしている場合は無効にしてください。
環境情報:

※↑こちらに「Cocoon設定 → テーマ情報」にある「環境情報」を貼り付けてください。

環境情報の取得方法はこちら。
https://wp-cocoon.com/theme-report/
高速化設定を無効にするにはこちら。
https://wp-cocoon.com/theme-trouble/

フォーラム利用ガイドリンク

  1. フォーラムガイドライン
  2. よくある質問と答え(FAQ)
  3. サポート対象外のケース
  4. 原因不明の不具合用トラブルシューティング
  5. トピックにHTMLを貼り付ける方法(推奨ツール:notepad.pw
  6. 真っ白画面でのエラーメッセージの確認方法
  7. ブラウザ環境チェックツール
  8. Cocoonカスタマイズ依頼

フォーラム質問後、問題等が解決した場合は結果を書き込んでいただけると幸いです。同様の問題で調べている方には、結果が一番気になる部分となります。

人気記事ショートコードでCocoonの...
 
共有:
通知
すべてクリア

人気記事ショートコードでCocoonのデフォルトのエントリーカードのような表示に?

3 投稿
1 ユーザー
3 Likes
1,751 表示
リフィトリー
(@leafytree)
Illustrious Member Moderator
結合: 5年前
投稿: 6845
Topic starter  

新着記事ショートコードで、デフォルトのエントリーカードっぽい表示にするCSSを書いてみたら、それっぽくなったので、人気記事ショートコードでも、できるのでは?と思い、やってみたら、人気記事ショートコードのオプションには、スニペットを表示するオプションが無かった、というオチ。 ? 

 

それでも、まあ、何かのヒントになれば・・

 

ショートコード(クラスを付けています)

[popular_list count=5 cats=3,5 type=large_thumb class="like-entry-cards" snippet=1 children=1]

 

CSS

/*ショートコードでエントリーカードのような表示に*/
.popular-entry-cards.widget-entry-cards {
  counter-reset: p-rank;
}

.like-entry-cards .popular-entry-card-link.a-wrap {
  padding: 2%;
  max-width: none;
  margin-bottom: 3%;
  border: 1px solid #ccc;
}

.like-entry-cards .popular-entry-card-thumb.widget-entry-card-thumb.card-thumb {
  width: 320px;
  float: left;
  margin-right: 1.6%;
  margin-top: 0;
  counter-increment: p-rank;
}


.like-entry-cards .popular-entry-card-content.widget-entry-card-content.card-content {
  margin-left: 330px;
  padding-bottom: 1.2em;
}

.like-entry-cards .popular-entry-card-title.widget-entry-card-title.card-title {
  font-size: 18px;
  margin: 0 0 5px 0;
  line-height: 1.2;
  font-weight: bold;
}

.like-entry-cards .popular-entry-card-snippet.widget-entry-card-snippet.card-snippet {
  font-size: 0.8em;
  max-height: 7.8em;
  line-height: 1.3;
  overflow: hidden;
}

.like-entry-cards .popular-entry-card-date.widget-entry-card-date.display-none {
  bottom: 0;
  position: absolute;
  right: 0;
  text-align: right;
  line-height: 1;
  display: block;
}

@media screen and (max-width:1280px) {

  .like-entry-cards .popular-entry-card-thumb.widget-entry-card-thumb.card-thumb {
    width: 38%;
  }

  .like-entry-cards .popular-entry-card-content.widget-entry-card-content.card-content {
    margin-left: 40%;
  }

}

@media screen and (max-width: 480px) {

  .like-entry-cards .popular-entry-card-content.widget-entry-card-content.card-content {
    margin-left: 0;
  }

  .like-entry-cards .popular-entry-card-thumb.widget-entry-card-thumb.card-thumb {
    margin-bottom: 6px;
  }

  .like-entry-cards .popular-entry-card-title.widget-entry-card-title.card-title {
    font-size: 16px;
    line-height: 1.3;
  }

  .like-entry-cards .popular-entry-card-snippet.widget-entry-card-snippet.card-snippet {
    margin-bottom: 0;
    clear: both;
    font-size: 13px;
    /*display: none;スニペットをスマホ表示で非表示にする場合に使用*/
  }

}

.popular-entry-cards.widget-entry-cards .no-1 .card-thumb::before {
  background:#cca11f
}

.popular-entry-cards.widget-entry-cards .no-2 .card-thumb::before {
  background:#b1b1b3
}

.popular-entry-cards.widget-entry-cards .no-3 .card-thumb::before {
  background:#b37036
}

.popular-entry-cards.widget-entry-cards .card-thumb {
  counter-increment:p-rank
}

.popular-entry-cards.widget-entry-cards .card-thumb::before {
  content:counter(p-rank);
  position:absolute;
  top:0;
  left:0;
  padding:4px;
  width:18px;
  height:18px;
  line-height:18px;
  background-color:#666;
  color:#fff;
  opacity:.9;
  text-align:center;
  font-size:13px;
  z-index:1
}
This topic was modified 3年前 2回 by リフィトリー

   
わいひら reacted
引用
リフィトリー
(@leafytree)
Illustrious Member Moderator
結合: 5年前
投稿: 6845
Topic starter  

見た目は、以下のような感じに。 ? 

 

This post was modified 3年前 by リフィトリー

   
わいひら reacted
返信引用
リフィトリー
(@leafytree)
Illustrious Member Moderator
結合: 5年前
投稿: 6845
Topic starter  

新着記事ショートコードの方のリンクも一応、貼っておきます。

 

以下のリンクは、ショートコードで、デフォルトのエントリーカードっぽい表示にしたい場合のCSS

 

投稿ページのカテゴリー一覧のページをトップに設定したい

https://wp-cocoon.com/community/postid/45471/

 

 

以下は、ショートコードでスキンのSeasonのエントリーカードっぽい表示にするCSS

 

トップページ「カテゴリごと(2カラム)」において新着記事を特定カテゴリーだけ非表示にしたい

https://wp-cocoon.com/community/postid/46641/


   
わいひら reacted
返信引用
共有:

問題の解決に至った場合には、トピック冒頭の「解決済み」をクリックしていただけますと幸いです。

また、有用な回答があった場合は返信右下にある「いいね!」もご活用ください。回答者の励みになります。

「いいね!」機能はフォーラム登録者のみが利用できる機能です。

CC BY-ND 2.1)準じていれば(リンクを貼っていただければ)転載も自由です。カスタマイズ記事を書く際にコード等をコピペ利用していただいて構いません。

フォーラムの使い方がよくわからない場合は、テストトピックで自由にテストしていただいて構いません。

最近の書き込みはこちら。

詳細なカスタマイズ依頼をするならこちら。

タイトルとURLをコピーしました