Tagged: Blog
-
AuthorPosts
-
September 19, 2015 at 12:38 am #505807
I have set up my main blog page to display just one category, called “Blog” as I use some other categories for specialty purposes.
The page works fine, displaying just that category: http://dev.solacesystems.com/blog/Problem is when you go to individual blog posts. The title at the very top of the page “Blog – Latest News” (how can I customize that text, by the way) is a hyperlink that takes people to the site’s home page, which isn’t logical or right, rather than to the main blog page.
The solution to THAT problem is to go in to the Enfold Settings and change “And where do you want to display the Blog?” to that page.
But then the filtration doesn’t work anymore, it then displays ALL blog posts regardless of category.How do I set my customized/filtered blog page to recognized by Enfold as the location of my blog?
September 19, 2015 at 8:10 pm #505967Hey JeeBar!
Please try this out, http://kriesi.at/documentation/enfold/replace-the-default-blog-latest-news-title/.
Cheers!
ElliottSeptember 21, 2015 at 7:45 am #506237Thanks for responding. Sorry but the instructions are pretty vague, and I need a little more guidance. Can’t risk screwing up my site playing around doing something that’s over my head.
It just says “use the following function.” Does that mean I add it to functions.php in my child theme?
And to set the title and URL to what I want, do I replace get_the_title($id) and get_permalink($id) with the actual title and URL I want like this?add_filter(‘avf_title_args’, ‘fix_single_post_title’, 10, 2);
function fix_single_post_title($args,$id)
{
if ( $args[‘title’] == ‘Blog – Latest News’ )
{
$args[‘title’] = Blog;
$args[‘link’] = /blog;
$args[‘heading’] = ‘h1’;
}return $args;
}September 21, 2015 at 2:37 pm #506441Hey!
Yes, you can simply add the code to Functions.php file of your child theme. If you use the code as is, it will show single post title and get its link. If you would like to adjust those, yes, you are going to need to change get_the_title($id) and get_permalink($id). if you elaborate on the changes you would like to make, we can gladly help you :)
Cheers!
YigitSeptember 22, 2015 at 12:31 am #506747I just want the text of the page title to be “Blog” instead of “Blog – Latest News” and
I want it to be a link to http://dev.solacesystems.com/blog instead of http://dev.solacesystems.com
Appreciate your assistance, thanks much.September 22, 2015 at 12:52 pm #506983Hey!
Please use the code as following
add_filter('avf_title_args', 'fix_single_post_title', 10, 2); function fix_single_post_title($args,$id) { if ( $args['title'] == 'Blog - Latest News' ) { $args['title'] = "Blog"; $args['link'] = "http://dev.solacesystems.com/blog"; $args['heading'] = 'h1'; } return $args; }
Best regards,
YigitSeptember 23, 2015 at 2:04 am #507443That worked like a charm, thanks so much for your help.
September 23, 2015 at 8:56 am #507540 -
AuthorPosts
- The topic ‘Setting Blog to be a Customized Page’ is closed to new replies.