Hey
I writing a tutorial that I hope to post this time. I will share the link after it has been posted. I am working on phrases.
In a blog page.
// Modify Continue reading text. I changed it to Read more.
add_filter( 'beans_post_more_link_text_output', 'modify_read_more' );
function modify_read_more() {
return 'Read more';
}
// To remove the >> after Continue reading add
beans_remove_markup( 'beans_next_icon[_more_link]' );
// Below the Continue Reading >> are the words Filed under. I changed it to Located in.
add_filter( 'beans_post_meta_categories_prefix_output', 'modify_filed_under' );
function modify_filed_under() {
return 'Located in ';
}
// To remove the Filed under and categories list.
beans_remove_action( 'beans_post_meta_categories' );
Adjustments in a post.
// Modify Posted on text.
add_filter( 'beans_post_meta_date_prefix_output', 'modify_posted_on' );
function modify_posted_on() {
return 'Posted ';
}
// Modify author text. Removes the author name and replaces with what you add below. I added The author.
add_filter( 'beans_post_meta_item_author_text_output', 'modify_author' );
function modify_author() {
return 'The author ';
}
// Beside author: Comments text. Not working correctly!
add_filter( 'beans_post_meta_item_comments_text_output', 'modify_comments_text' );
function modify_comments_text() {
return 'Comments text ';
}
NB! Changing the Leave a comment to other phrases removes the link! How do I get it back? How do I remove Posted on, author name and leave a reply?
Comments section
// Modify: No comment yet, add your voice below!
add_filter( 'beans_no_comment_text_output', 'modify_no_comments_text' );
function modify_no_comments_text() {
return 'Changing no comments yet text ';
}
// Modify: "Add a Comment" text
add_filter( 'beans_comment_form_title_text_output', 'modify_add_comment' );
function modify_add_comment() {
return 'Add your comment below.';
}
// Not working...
beans_remove_action( 'beans_comment_form_title' );
Not working.
// Modify: "Comment *" text
add_filter( 'beans_comment_form_legend_text[_comment]_output', 'modify_comment' );
function modify_comment() {
return 'Your comment below.';
}
// Modify: "Post Comment" button text
add_filter( 'beans_comment_form_submit_text_output', 'modify_post_comment_btn' );
function modify_post_comment_btn() {
return 'Share your words';
}
// Modify "Moderator" text
add_filter( 'beans_moderator_text_output', 'modify_post_moderator_text' );
function modify_post_moderator_text() {
return ' Web dude';
}
Other information I have added to the tutorial.
Styling with CSS
Look at the data-markup-id name through your browsers Inspect. NB! Some Data Markup IDs might already have a class name associated with it. Then use the existing class and style it. Many will not have one and will need to have a class name added.
For instance: data-markup-id=”beans_post_more_link” and data-markup-id=”beans_post_meta_categories”.
beans_add_attribute( ‘beans_post_more_link’, ‘class’, ‘meta-read-more’ ); beans_add_attribute( ‘beans_post_meta_categories’, ‘class’, ‘meta-categories’ );
In your stylesheet be in CSS or your LESS stylesheet use the classes: .meta-read-more and .meta-categories to style these areas.
.meta-read-more,
.meta-categories {
background: red;
border: 1px solid #333;
}
Styling with UIKit
Instead of adding a CSS class one can instead add a UiKit attribute. Here I am adding an uk alert to the comments title.
beans_replace_attribute( ‘beans_comments_title’, ‘class’, ‘uk-alert’ );
What I am looking for is some adjustments to the issues I mentioned. If there are other phrases or information that would be good to add please let me know by posting below so that I can include them in the tutorial I have written but not posted on my web site yet. I am hoping after having updated this tutorial that I will also post it. Thanks.