Tagged: ,

Viewing 30 posts - 1 through 30 (of 45 total)
  • Author
    Posts
  • #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,
    XN

    #501797
    #501980

    Thank 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’);

    #502031

    Hey,

    Please try it in functions.php and let us know if it works out for you or not.

    Thanks,
    Rikard

    #502049

    Hello Rikard,

    I inserted it in functions.php but nothing happened.

    Regards,
    XN

    #502123

    Hi!

    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!
    Elliott

    #502208

    Hello Elliott,
    I tried both ways; didn’t work.

    Regards,
    XN

    #502225

    Hey!

    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!
    Basilis

    #505013

    Nope 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!

    #505016

    Oh 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!

    #505017

    Hey!

    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, 2 months ago by Elliott.
    #505035

    Thanks 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,
    XN

    #505202

    Hey!

    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!
    Ismael

    #506791

    Thanks Ismael, now the featured image is small after inserting this code in functions.php
    Thanks again.

    Cheers!

    #506792

    But 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
    XN

    #507019
    #507585

    Hello 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.
    XN

    #508141

    Hey!

    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!
    Ismael

    #509846

    Thanks 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.)

    #510699

    Hey!

    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!
    Ismael

    #513265

    Hello 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
    XN

    #513266

    Also, 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,
    XN

    #513267

    O 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, 1 month ago by xa1970.
    #513283

    Guys, 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,
    XN

    #513458

    Hey!

    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!
    Ismael

    #513468

    Hello 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, 1 month ago by xa1970.
    #513606

    Hey!

    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,
    Ismael

    #514382

    Hey 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, 1 month ago by xa1970.
    #514894

    Hey!

    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,
    Ismael

    #514901

    Ismael, 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

Viewing 30 posts - 1 through 30 (of 45 total)
  • The topic ‘Blog Categories’ is closed to new replies.