Forum Replies Created
-
AuthorPosts
-
christiane
MemberDear Sakin, never mind. I found another snippet that will do. Thanks anyway!
Christianechristiane
Member@Sakin: I know, but I was hoping that you can recommend a plugin for this kind of shortcodes. Or you could tell me how to alter the existing code I sent you that the result is when no comments = “0 comment”. Can you???
christiane
MemberHi Sakin,
another question (because your answers are simply too good!): How can I add a shortcode for comments count for individual pages? I found this following code, but it does not show the “if comments=0 than ‘no comments yet'” when I use the shortcode [comments id=”21″]
Do you have a tipp how to alter the code or have another clever one?
Thanks again and again … 😉
Christianefunction comments_shortcode($atts) {
extract( shortcode_atts( array(
‘id’ => ”
), $atts ) );$num = 0;
$post_id = $id;
$queried_post = get_post($post_id);
$cc = $queried_post->comment_count;
if( $cc == $num || $cc > 1 ) : $cc = $cc.’ comments’;
else : $cc = $cc.’ comment’;
endif;
$permalink = get_permalink($post_id);return ‘‘ . $cc . ‘‘;
}
add_shortcode(‘comments’, ‘comments_shortcode’);christiane
MemberSorry, I was mistaken. I had the impression that the the @media … applies to single elements, not to the complete site. I found a solution to work around and make the pages fit for smaller displays (“overflow:scroll;” for only one table – the other one due to its design can stay as it is).
christiane
MemberHello Sakin,
I have a question regarding responsive table layout. I want to apply the following code (s.b.) only to certain table layouts, not to all. But when I add the code to the custom css it changes all tables. How can I exclude a table layout from the responsive changes?Thanks for your help
Christiane@media screen and (max-width: 600px) { table {width:100%;} thead {display: none;} tr:nth-of-type(2n) {background-color: inherit;} tr td:first-child {background: #f0f0f0; font-weight:bold;font-size:1.3em;} tbody td {display: block; text-align:center;} tbody td:before { content: attr(data-th); display: block; text-align:center; } }
christiane
MemberI did it
christiane
MemberYou are the best, thanks! It works perfectly.
christiane
MemberOne more … The Featured Content Subheadline Text is the same font-family as the text paragraphs. It should be different as it is an introduction and therefore more special. What line can I use to change it in Custom CSS box?
christiane
MemberGreat, thanks a lot!
christiane
MemberOh, thanks. That was easy! 😉 But the font of the corresponding featured content needs to be changed according to the new font we choose for the text paragraphs. (see http://havanamyway.com) Do you have a home remedy for that as well?
christiane
MemberPerfect help! Thanks a lot!!!
christiane
MemberHi Sakin, thanks for answering. We use theme Adventurous 1.6.1
christiane
MemberPlease can you explain to me where exactly to edit the comment form to change the title from “Leave a reply” to something else? Thanks!
christiane
MemberThanks Sakin. It works when I install them directly at the hosting site.
-
AuthorPosts