Tagged: Blog, categories
-
AuthorPosts
-
September 11, 2015 at 4:01 am #501373
hello can blog categories open with ‘read more’ option? http://xandrianoir.com/blog-and-reviews/
At the moment, if clicked on a category on the right, the page opens all the posts full, not with list and read more option.Regards,
XNSeptember 11, 2015 at 5:12 pm #501797Hey xandria!
Please see here, https://kriesi.at/support/topic/display-only-excerpt-on-archive-page/#post-364919.
Cheers!
ElliottSeptember 12, 2015 at 7:11 am #501980Thank you Elliot,
Can I put this code anywhere in functions.php or somewhere specific? (I am a newbie.)
function change_blog_archive_style() {
global $avia_config;
if(!is_single()){ $avia_config[‘blog_content’] = “excerpt_read_more”; }
}
add_action(‘get_header’, ‘change_blog_archive_style’);September 12, 2015 at 9:54 am #502031Hey,
Please try it in functions.php and let us know if it works out for you or not.
Thanks,
RikardSeptember 12, 2015 at 10:36 am #502049Hello Rikard,
I inserted it in functions.php but nothing happened.
Regards,
XNSeptember 12, 2015 at 3:36 pm #502123Hi!
Sorry, it should be.
function change_blog_archive_style() { global $avia_config; $avia_config[‘blog_content’] = “excerpt_read_more”; } add_action(‘get_header’, ‘change_blog_archive_style’);
It would be best to add it to the functions.php file of a child theme.
If it’s still not working then add this on line 39 in the /enfold/includes/loop-index.php file.
$blog_content = "excerpt_read_more";
Cheers!
ElliottSeptember 13, 2015 at 7:39 am #502208Hello Elliott,
I tried both ways; didn’t work.Regards,
XNSeptember 13, 2015 at 8:39 am #502225Hey!
Please try
function change_blog_archive_style() { global $avia_config; $avia_config['blog_content'] = "excerpt_read_more"; } add_action('get_header', 'change_blog_archive_style');
and copy it from the forum post not email please
Cheers!
BasilisSeptember 17, 2015 at 5:18 pm #505013Nope Basilis, it did not work. Any other magic potion ? :)
And what is If it’s still not working then add this on line 39 in the /enfold/includes/loop-index.php file.. What is the text of line 39?
Cheers!
September 17, 2015 at 5:21 pm #505016Oh sorry Basilis, it worked bu the featured image is gigantic. Also it is in the center of the page with no sidebar. How can I give sidebar?
Sorry again.
Cheers!September 17, 2015 at 5:22 pm #505017Hey!
It means you add it on line 39 in the file. Right below this.
if(AviaHelper::builder_status($current_post['the_id']) && !is_singular($current_post['the_id']) && $current_post['post_type'] == 'post') { $current_post['post_format'] = 'standard'; $blog_content = "excerpt_read_more"; }
EDIT: Looks like we posted at the same time. You can set the archives sidebar layout in Dashboard > Enfold > Sidebar Settings.
Regards,
Elliott- This reply was modified 9 years, 3 months ago by Elliott.
September 17, 2015 at 5:37 pm #505035Thanks Elliott.
But changing to sidebar in Enfold> sidebar beings all pages in the sidebar (even the ones that are not on the site.)
Two things:
How can I have sidebar only on blog category that is same as blog sidebar?
How can I featured image on the category page small?
Please click on the category here to see. http://xandrianoir.com/blog-and-reviews/Thanks,
XNSeptember 18, 2015 at 3:46 am #505202Hey!
1.) If you want to enable the sidebar for category pages, go to Enfold > Sidebar Settings panel then set the sidebar on Sidebar on Archive Pages option.
2.) Once you enable the sidebar on the category pages, the featured image size will decrease automatically. Or try to use this in the functions.php file to set a different blog style for archive pages:
add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2); function avia_change_category_blog_layout($layout, $context){ if($context == 'archive') $layout = 'single-small'; return $layout; }
Cheers!
IsmaelSeptember 22, 2015 at 6:42 am #506791Thanks Ismael, now the featured image is small after inserting this code in functions.php
Thanks again.Cheers!
September 22, 2015 at 6:45 am #506792But I guess I can’t have the side bar? Because if I activate the sidebar on archives then it brings all the pages in the sidebar of portfolio. And I don’t want portfolio to have a sidebar in categories. Any solution to bring sidebar only on blog categories but not on portfolio categories?
Thanks
XNSeptember 22, 2015 at 1:48 pm #507019Hi!
refer to this post: https://kriesi.at/support/topic/portfolio-sidebar-removal/#post-72354
Regards,
AndySeptember 23, 2015 at 10:24 am #507585Hello Andy,
I read the post you sent but my case is different.
I don’t want sidebar on portfolio category page (and I don’t have the sidebar there because I deactivated from Enfold.) But I need sidebar blog categories, the sidebar that comes on blog page.
I hope I am not causing any confusion.
Thanks for your help.
XNSeptember 24, 2015 at 3:33 am #508141Hey!
Please enable the sidebar for archive pages in the Sidebar Settings panel then add this in the functions.php file:
add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2); function avia_change_post_layout($layout, $post_id){ if(is_tax('portfolio_entries')) { $layout['current'] = $layout["fullsize"]; $layout['current']['main'] = "fullsize"; } return $layout; }
This will DISABLE the sidebar on portfolio category pages.
Cheers!
IsmaelSeptember 28, 2015 at 7:42 am #509846Thanks guys, everything is falling in the right place now. Last thing (perhaps), tags are for posts and portfolio items both. Tags that are for posts, are fine in opening with blog sidebar, but tags for portfolio items are also showing blog sidebar. Can I have a code for not showing blog sidebar on portfolio tags?
Regards,
XN(I am sure this will be last.)
September 29, 2015 at 12:25 pm #510699Hey!
Can you please provide a link to the tags archive page? Try to replace the code with this:
add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2); function avia_change_post_layout($layout, $post_id){ if(is_tax('portfolio_entries') || is_tag()) { $layout['current'] = $layout["fullsize"]; $layout['current']['main'] = "fullsize"; } return $layout; }
Cheers!
IsmaelOctober 4, 2015 at 4:58 am #513265Hello Ismael,
Please visit http://www.xandrianoir.com and click on tags in the footer, for example ‘drip’ (which is portfolio tag) and then try ‘karachi’ (which is blog tag). They both have blog sidebar. I need portfolio tags not to have sidebar. Possible?
Regards
XNOctober 4, 2015 at 5:01 am #513266Also, I just checked, my ‘read more’ on my blog posts. is not opening the post. Please reply on this one really fast because my readers must be thinking I have gone nuts not allowing them to read my posts.
http://xandrianoir.com/blog-and-reviews/Appreciate your efforts.
Regards,
XNOctober 4, 2015 at 5:08 am #513267O shoot, I mistakenly deleted the last code on functions-enfold.php and nnow MY SITE DOESNT OPEN AT ALL. Even admin is not accessible. http://www.xandrianoir.com
PLEASE PLEASE PLEASE HELP .
Fatal error: Cannot redeclare avia_change_post_layout() (previously declared in /home3/xandrianoir/public_html/www.xandrianoir.com/wp-content/themes/enfold/functions.php:524) in /home3/xandrianoir/public_html/www.xandrianoir.com/wp-content/themes/enfold/functions-enfold.php on line 1409)
Please please please help.
- This reply was modified 9 years, 2 months ago by xa1970.
October 4, 2015 at 7:02 am #513283Guys, I have removed the repeated code from the function-enfold.php on my cpanel and overwrite it. The website is functional now.
Please just revert to my ‘read more’ not opening question now (for now).
Thanks,
XNOctober 5, 2015 at 5:12 am #513458Hey!
You should add the code on functions.php, not functions-enfold.php.
add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2); function avia_change_post_layout($layout, $post_id){ if(is_tax('portfolio_entries') || is_tag()) { $layout['current'] = $layout["fullsize"]; $layout['current']['main'] = "fullsize"; } return $layout; }
Regarding the ready more issue, did you add any filters other than one we recommended above?
Cheers!
IsmaelOctober 5, 2015 at 5:30 am #513468Hello Ismael,
Do I have to replace any code or just add this one in the end? Also, on my blog, ‘read more’ and the title of posts are not opening the post in full. Will this code solve that issue too?I don’t understand what are filters.
Regards,
XN- This reply was modified 9 years, 2 months ago by xa1970.
October 5, 2015 at 11:11 am #513606Hey!
I think it’s better if you add the login details here. We will add it for you and we’ll investigate the “read more” link issue.
Best regards,
IsmaelOctober 6, 2015 at 2:34 pm #514382Hey Ismael,
I don’t know if I should write it in this thread or make a new one but since all the codes I am inserting are related to this thread so better here. I can’t login wp-admin. This is what comes when I try to log in:
Warning: Cannot modify header information – headers already sent by (output started at /home3/xandrianoir/public_html/www.xandrianoir.com/wp-content/themes/enfold/functions-enfold.php:1) in /home3/xandrianoir/public_html/www.xandrianoir.com/wp-includes/pluggable.php on line 1207
I don’t know what happened now.
How will you log in if I provide the credentials here?Please help.
Regards,
XN- This reply was modified 9 years, 2 months ago by xa1970.
October 7, 2015 at 5:06 am #514894Hey!
Did you add the code as a separate function? It will give you an error because the function already exist. I modified it a bit because you requested to make it work for tag archive pages. You have to put it in place of the existing function.
To fix the error override the functions.php via FTP. Edit the functions.php file, NOT the functions-enfold.php file.
Regards,
IsmaelOctober 7, 2015 at 5:15 am #514901Ismael, please ignore my ignorance here but I don’t know what does ‘separate function ‘ means.
Also, the last code sent to me in this thread, I have not entered it yet. I tried log in but it does not give log in page. Do you want me to got to functions.php from FTP and insert it there then overwrite the file? Do I have to replace any code there?
Thanks
XN -
AuthorPosts
- The topic ‘Blog Categories’ is closed to new replies.