Tagged: Blog, categories, Layout Builder, Tags
-
AuthorPosts
-
November 7, 2016 at 3:34 pm #709280
I am using the LAYOUT BUILDER with the BLOG
In the MAIN BLOG PAGE
we need to show: TAGS
we need to remove: AUTHOR, READ MORE BUTTONIn the CATEGORY PAGES
we need to show: TAGS
remove: AUTHOR, READ MORE BUTTONIn individual POST PAGES
we need to show: TAGS, CATEGORY, DATE, SHARE, SIMILARHOW TO DO THIS?
I have followed more threads on this topic and I find it confusing.
There is some added PHP code which you added (thank you!) but it did not solve the desired request.
Is there a step-by-step documentation on this?THANKS!
best regards,
Dara EmersonNovember 8, 2016 at 2:30 pm #709802Hey DaraEmerson,
follow these inscructions: https://kriesi.at/support/topic/using-alb-with-custom-post-type-and-meta-information/#post-580144, also check out the next post of Josue. Follow both posts. Let us know when you’re done and still need help. Send us a precise link where we can inspect the elements in question.
Best regards,
AndyNovember 8, 2016 at 3:15 pm #709853Dear Andy This is what is there already.
Either you or Yigit put this code in because when I tried the entire website disappeared.<?php
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/function custom_shortcode_func() {
ob_start();
echo “<span class=’post-meta-infos’>”;
echo “<time class=’date-container minor-meta updated’>”.get_the_time(get_option(‘date_format’)).”</time>”;
echo “<span class=’text-sep text-sep-date’>/</span>”;if ( get_comments_number() != “0” || comments_open() ){
echo “<span class=’comment-container minor-meta’>”;
comments_popup_link( “0 “.__(‘Comments’,’avia_framework’),
“1 “.__(‘Comment’ ,’avia_framework’),
“% “.__(‘Comments’,’avia_framework’),’comments-link’,
“”.__(‘Comments Disabled’,’avia_framework’));
echo “</span>”;
echo “<span class=’text-sep text-sep-comment’>/</span>”;
}if(!empty($cats))
{
echo ‘<span class=”blog-categories minor-meta”>’.__(‘in’,’avia_framework’).” “;
echo $cats;
echo ‘</span><span class=”text-sep text-sep-cat”>/</span>’;
}echo ‘<span class=”blog-author minor-meta”>’.__(‘by’,’avia_framework’).” “;
echo ‘<span class=”entry-author-link” ‘.avia_markup_helper(array(‘context’ => ‘author_name’,’echo’=>false)).’>’;
echo ‘<span class=”vcard author”><span class=”fn”>’;
the_author_posts_link();
echo ‘</span></span>’;
echo ‘</span>’;
echo ‘</span>’;
echo ‘</span>’;
$output = ob_get_clean();
return $output;
}
add_shortcode(‘the_post_meta’, ‘custom_shortcode_func’);DO I ADD the following shortcode for adding Tags within a Post?:
function custom_shortcode_func2() {
ob_start();
echo the_tags(‘‘.__(‘Tags:’,’avia_framework’).’ ‘);
$output = ob_get_clean();
return $output;
}
add_shortcode(‘the_post_tags’, ‘custom_shortcode_func2’);Thanks!
- This reply was modified 8 years, 1 month ago by DaraEmerson.
November 8, 2016 at 3:16 pm #709854Within the POST the category/categories, share are missing as well
how to add these?- This reply was modified 8 years, 1 month ago by DaraEmerson.
November 8, 2016 at 3:47 pm #709866http://www.tcm-team.at/category/eintopfe/
Tags are missing : how to add?
Author is showing: how to remove ?http://www.tcm-team.at/blog/
Tags are missing : how to add?Is this clear?
- This reply was modified 8 years, 1 month ago by DaraEmerson.
November 9, 2016 at 9:54 am #710134Hi!
Tags are missing : how to add?
Author is showing: how to remove ?Edit the includes > loop-index.php file, look for this code around line 232:
if(!empty($cats)) { echo '<span class="blog-categories minor-meta">'.__('in','avia_framework')." "; echo $cats; echo '</span><span class="text-sep text-sep-cat">/</span>'; }
Below, add this code:
if(has_tag()) { echo '<span class="blog-tags minor-meta">'; the_tags('<strong>'.__('Tags:','avia_framework').'</strong><span> '); echo '</span></span>'; }
Remove the author with this css code:
.html_elegant-blog .archive .post-entry .blog-author, .html_elegant-blog .archive .post-entry .comment-container + .text-sep { display: none; }
http://www.tcm-team.at/blog/
Tags are missing : how to add?The modification in the loop-index.php file that we suggested above should take care of this as well.
Best regards,
IsmaelNovember 14, 2016 at 11:15 am #711865Thanks Ismae!……
1 – Are you telling us to add the above code in the parent theme?
if so, what happens then with the updates? (I do not see numbered lines (line 232))
2 – We have a child theme set up for this with the following code in the functions.php:
can I add the code there?best regards,
Dara<?php
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/function custom_shortcode_func() {
ob_start();
echo “<span class=’post-meta-infos’>”;
echo “<time class=’date-container minor-meta updated’>”.get_the_time(get_option(‘date_format’)).”</time>”;
echo “<span class=’text-sep text-sep-date’>/</span>”;if ( get_comments_number() != “0” || comments_open() ){
echo “<span class=’comment-container minor-meta’>”;
comments_popup_link( “0 “.__(‘Comments’,’avia_framework’),
“1 “.__(‘Comment’ ,’avia_framework’),
“% “.__(‘Comments’,’avia_framework’),’comments-link’,
“”.__(‘Comments Disabled’,’avia_framework’));
echo “</span>”;
echo “<span class=’text-sep text-sep-comment’>/</span>”;
}if(!empty($cats))
{
echo ‘<span class=”blog-categories minor-meta”>’.__(‘in’,’avia_framework’).” “;
echo $cats;
echo ‘</span><span class=”text-sep text-sep-cat”>/</span>’;
}echo ‘<span class=”blog-author minor-meta”>’.__(‘by’,’avia_framework’).” “;
echo ‘<span class=”entry-author-link” ‘.avia_markup_helper(array(‘context’ => ‘author_name’,’echo’=>false)).’>’;
echo ‘<span class=”vcard author”><span class=”fn”>’;
the_author_posts_link();
echo ‘</span></span>’;
echo ‘</span>’;
echo ‘</span>’;
echo ‘</span>’;
$output = ob_get_clean();
return $output;
}
add_shortcode(‘the_post_meta’, ‘custom_shortcode_func’);- This reply was modified 8 years, 1 month ago by DaraEmerson.
November 14, 2016 at 12:28 pm #711890.html_elegant-blog .archive .post-entry .blog-author, .html_elegant-blog .archive .post-entry .comment-container + .text-sep {
display: none;
}Thanks for the CSS! This worked like a dream – getting somewhere in a way I can follow what is going on
November 14, 2016 at 12:36 pm #711895
http://www.tcm-team.at/category/rezepte/
ok the above has date and comments: YESbelow is missing date and comments:
does adding them involve more PHP?WE ARE NEARLY FINISHED – YES!
thanks for all your help.
Dara- This reply was modified 8 years, 1 month ago by DaraEmerson.
November 16, 2016 at 3:30 am #712710Hi,
1.) You create a folder called “includes” in the child theme folder and then create a copy of the loop-index.php file.
2.) You have to edit the template directly.
below is missing date and comments:
They are missing because you disabled it in the Theme Options > Blog Layout > Blog meta elements panel. You can add this in the Quick CSS field.
#top .av-blog-meta-date-disabled .minor-meta.date-container, #top .av-blog-meta-date-disabled .text-sep-date { display: inline-block; } #top .av-blog-meta-comments-disabled .minor-meta.comment-container, #top .av-blog-meta-comments-disabled .text-sep-comment { display: inline-block; }
Best regards,
IsmaelNovember 16, 2016 at 6:48 pm #713123OK – I will let you know in the next day hopefully. Thanks for keeping this window open.
: )November 16, 2016 at 10:34 pm #713231this did not seem to work to show the TAGS unless we did something wrong.
The CATEGORIES is also still not showing or have I missed somethingWe created the folder on the server in the Enfold Child and followed your instructions:
#710134 REPLY.Here is the example page:
The DATE/COMMENTS/AUTHOR is there now thanks from before.
there is some progress : )
- This reply was modified 8 years, 1 month ago by DaraEmerson.
November 18, 2016 at 12:41 pm #713947REVIEW:
______________________________________________
TAGS, CATEGORIES:
Visible in
Blog Page, Category PagesNOT visible in:
Post PagesHOW TO ADD? or WHAT have I missed in your instructions?
: )
––––––––––––––––––––––––––––––––––––––––––––––––Is it possible to add a Yoast Taxonomy Widget (would it work) with the Layout Builder?
My client wants two levels of Tags––––––––––––––––––––––––––––––––––––––––––––––––
I would like to take this opportunity to REALLY thank you for your patience and help. I used the “Layout Builder” with the posts because I wanted to have the full-width color bar above the sidebar and blog pages to keep with the websites design. This did not appear to be possible with the “Default Editor”. OR IS IT? I would suggest it be clearly stated that it is complicated to use the Layout builder with posts unless one is familiar with PHP. It would be great to add a step-by-step guide on how to do this in your documentation.
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
Waiting to hear from you so I can finish this up.
Thanks again!
DaraNovember 20, 2016 at 8:08 am #714420Hi,
NOT visible in:
Post Pages
HOW TO ADD? or WHAT have I missed in your instructions?If you’re using the advance layout builder, these elements (categories, tags, post meta info etc) will not be included automatically. You can either add them manually in a code or text block or create a custom shortcode.
// https://kriesi.at/support/topic/question-about-transferring-set-up-to-our-actual-site/#post-643745
// https://kriesi.at/support/topic/missing-category-info-in-post-meta-infos-using-alb/#post-588985Best regards,
IsmaelNovember 21, 2016 at 12:50 pm #714780WOW THANKS!
So….
With the code added it seems to be working now.
(hurrah!)
1 – We have information in the loop-index.php child file
2 – The Theme Functions.php file seems to be working. Thanks if you would check through the code to make sure there is no conflicting information:CODE IN THE PHP FUNCTIONS:
<?php/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/function custom_shortcode_func() {
ob_start();
echo “<span class=’post-meta-infos’>”;
echo “<time class=’date-container minor-meta updated’>”.get_the_time(get_option(‘date_format’)).”</time>”;
echo “<span class=’text-sep text-sep-date’>/</span>”;if ( get_comments_number() != “0” || comments_open() ){
echo “<span class=’comment-container minor-meta’>”;
comments_popup_link( “0 “.__(‘Comments’,’avia_framework’),
“1 “.__(‘Comment’ ,’avia_framework’),
“% “.__(‘Comments’,’avia_framework’),’comments-link’,
“”.__(‘Comments Disabled’,’avia_framework’));
echo “</span>”;
echo “<span class=’text-sep text-sep-comment’>/</span>”;
}if(!empty($cats))
{
echo ‘<span class=”blog-categories minor-meta”>’.__(‘in’,’avia_framework’).” “;
echo $cats;
echo ‘</span><span class=”text-sep text-sep-cat”>/</span>’;
}echo ‘<span class=”blog-author minor-meta”>’.__(‘by’,’avia_framework’).” “;
echo ‘<span class=”entry-author-link” ‘.avia_markup_helper(array(‘context’ => ‘author_name’,’echo’=>false)).’>’;
echo ‘<span class=”vcard author”><span class=”fn”>’;
the_author_posts_link();
echo ‘</span></span>’;
echo ‘</span>’;
echo ‘</span>’;
echo ‘</span>’;
$output = ob_get_clean();
return $output;
}
add_shortcode(‘the_post_meta’, ‘custom_shortcode_func’);function custom_shortcode_func2() {
ob_start();
echo the_category( ‘, ‘ );
$output = ob_get_clean();
return $output;
}
add_shortcode(‘the_category’, ‘custom_shortcode_func2’);function custom_tags_shortcode() {
ob_start();
the_tags(‘‘.__(‘Tags:’,’avia_framework’).’ ‘);
$output = ob_get_clean();
return $output;
}
add_shortcode(‘the_post_tags’, ‘custom_tags_shortcode’);November 21, 2016 at 12:51 pm #7147823 – Tags, Categories, Author, Date, Comment is now in Post pages, Main Blog Page, Category Pages, Tags pages: GREAT!
How to remove COMMENTS, DATE everywhere but the Post pages?
This is the CSS I have for removing the Author everywhere but the Blog pages
/*BLOG Remove author*/
.html_elegant-blog .archive .post-entry .blog-author, .html_elegant-blog .archive .post-entry .comment-container + .text-sep {
display: none;
}November 21, 2016 at 12:54 pm #714783Shall I ask about adding the Yoast Taxonomy Widget in another query?
I just wanted to know if we need to add more php to the file if we do add this Taxonomy Widget.November 22, 2016 at 10:07 pm #715620Adding to this.
When I used the Avia build editor on a ‘post’, it broke the WP formatting and I lost all the standard content I used to get with a WP post, like the title, social share and commenting. I got the social share and commenting back. But I’d like an easier way to get the blog meta info back on top.
What I’d like to do is maintain the blog title meta information.
So I’d like to keep the blog title, date and author (author is hyperlinked).What custom php do I need to add to make that happen?
Please let me know if you have any questions. Thanks!
–
GerardNovember 23, 2016 at 3:33 am #715692Hi,
If you’re using the advance layout builder, these elements (categories, tags, post meta info etc) will not be included automatically. You can either add them manually in a code or text block or create a custom shortcode.
@gerardbao: Please refer to these previous threads.// https://kriesi.at/support/topic/question-about-transferring-set-up-to-our-actual-site/#post-643745
// https://kriesi.at/support/topic/missing-category-info-in-post-meta-infos-using-alb/#post-588985
@DaraEmerson: Have you tried the Widget Area element for the Yoast Taxonomy Widget?Best regards,
IsmaelNovember 23, 2016 at 11:04 am #715813Thanks maybe you missed this question?
How to remove COMMENTS, DATE everywhere but the Post pages?November 25, 2016 at 5:51 am #716648Hi,
Yes, my bad. Please use this css code to remove the date and comments in the page and archives.
.page .comment-container, .page .date-container, .archive .comment-container, .archive .date-container { display: none; }
Best regards,
IsmaelNovember 28, 2016 at 3:03 pm #717788Ok, great, thanks
the text separators are still showing thoughNovember 28, 2016 at 3:22 pm #717801Hi,
Try adding this code in Quick CSS:
.post-meta-infos span.text-sep { display: none !important; }
Hope this helps :)
Best regards,
NikkoNovember 28, 2016 at 3:39 pm #717818Thanks! Quick reply! it works
but it also removes the dividing lines everywhere else
Dara- This reply was modified 8 years ago by DaraEmerson.
November 28, 2016 at 3:43 pm #717822but it also removes the dividing lines everywhere else
Here is the CSS I have:
/*BLOG Remove author*/
.html_elegant-blog .archive .post-entry .blog-author, .html_elegant-blog .archive .post-entry .comment-container + .text-sep {
display: none;
}/*remove COMMENTS, DATE everywhere but the Post pages*/
.page .comment-container, .page .date-container, .archive .comment-container, .archive .date-container {
display: none;
}.post-meta-infos span.text-sep {
display: none !important;
}- This reply was modified 8 years ago by DaraEmerson.
November 29, 2016 at 10:47 am #718154Hi!
Please remove the code I gave and replace it with:
.archive .post-meta-infos span.text-sep { display: none !important; }
Let us know if it works fine. :)
Best regards,
NikkoNovember 30, 2016 at 11:54 am #718703strange, when I add this code in and try to update it asks me if I really want to do this? that, on a blank page which opens up.
November 30, 2016 at 6:44 pm #718929Hi!
That’s weird that only happens when you try to reset or you have done changes in the theme options then you attempt leave the page. I have checked your site and it seems it’s all good now :)
Cheers!
NikkoNovember 30, 2016 at 6:46 pm #718930Oh please excuse there was a glitch.
it works now and thanks for the css!best regards,
DaraPS how to remove the comments?
css?November 30, 2016 at 9:04 pm #718980Hey!
You can switch off comments to new posts by going to Settings > Discussion > Default article settings checkbox Allow people to post comments on new articles
You can disable it for each post editing the post and uncheck Allow comments in the discussion meta box (this will also be needed for the older posts). Hope this helps :)
Regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.