Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1015883

    I did a search on this, but found ways to use the Social Share element in ALB, or how to do this via magic wand.

    What I am hoping to find is how automatically add these at bottom of posts without manually going through 175 posts and activating the social share button (and so new posts automatically show the buttons).

    I have all Social Share buttons checked in Enfold > Theme Options > Blog Layout > Share links at the bottom of your blog post

    I think there is probably a Custom CSS I can add someplace, or to a php document that will accomplish this as an automated thing for all existing posts and all future posts that I create? I just did not find that in my search. I will keep looking, and if I find it before y’all respond, I’ll link to it here.

    Thanks
    Jon

    #1015888

    Hey gatehealing,

    Are you using ALB to build out all of your posts?

    Best regards,
    Jordan Shannon

    #1015930

    For now, although I am hoping to use default builder so excerpts are automatically created vs me manually creating 175 of them in ALB. I have tried to use default by copy/pasting into default from alb then resaving, but when I do that and click into the post itself, only the excerpt is shown. I have asked about this in another thread where the subject refers to another thread being marked as Read when I still had a question (the one I just mentioned) (I know now that my follow up I query may not be seen once thread is marked as Read).

    #1015933

    Hi,

    If you are using the ALB to build posts then you have to do manually. You could refer to the following:

    And perhaps add the script given directly to the default page template to ensure it displays on all pages.

    Best regards,
    Jordan Shannon

    #1015986

    Thanks Jordan,

    I’ll see if that works. This really seems like something that would be good to add to the theme functionality. Ie when somebody has a pre-existing blog with lots of posts, it would be helpful to be able to just use default editor without the full post being truncated to an excerpt with Read More at the bottom (where when you click Read More, it just reloads the same excerpt). Or a checkbox that automatically adds the social share icons for posts in ALB (which they currently are . . .and I have the boxes checked in the Theme Options Blog Layout page, but I think that is only for if you use default editor? They certainly don’t show for me when ALB is used (as it is right now bc I cannot get the full blog post to show if I save in Default Editor.

    Seems like something may be wrong because so many other features on this theme are extremely intuitive and work great–I’d think that the Blog Social Share check boxes feature would play well with the Enfold ALB editor, but it doesn’t seem to.

    J

    #1015993

    Hi,

    Please add following code to the child theme functions.php to add the social share bar to all posts (at the bottom):

    
    
    add_filter( 'the_content', 'avia_add_social_share_bar' );
    function avia_add_social_share_bar( $content ) 
    {
        // Check if we're inside the main loop in a single post page.
        if ( is_single() && in_the_loop() && is_main_query() ) 
        {
            return $content . do_shortcode("[av_social_share title='Share this entry' style='' buttons='' share_facebook='' share_twitter='' share_pinterest='' share_gplus='' share_reddit='' share_linkedin='' share_tumblr='' share_vk='' share_mail='' av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='']");
        }
    
        return $content;
    }
    

    Best regards,
    Peter

    #1016163

    Hey Peter,
    Thanks a million! I’ll give it a shot.

    Jon

    #1016175

    Hi,

    I’ll leave this thread open for now if you stumble over issues :)

    Best regards,
    Peter

    #1016187

    Hi Peter,

    It works fine for posts in ALB. I cannot tell if it works for a post that I published with Default Editor as clicking into it shows a blank white screen (https://gatehealing.com/existential-dilemma-the-universe-vs-mud-pies/ This is a post that I saved in Default Editor and placed at the very end of my Blog Posts Page).

    I am hoping to be able to use Default Editor with Magic Wand since excerpts are automatically created in Default Editor, but not in ALB. I am exploring that issue in another thread.

    J

    #1016250

    Hi!

    I fixed it by adjusting the code to

    
    
    add_filter( 'the_content', 'avia_add_social_share_bar' );
    function avia_add_social_share_bar( $content ) 
    {
    	global $avia_config;
    
        // Check if we're inside the main loop in a single post page.
        if ( is_single() && in_the_loop() && is_main_query() && !empty($avia_config['conditionals']['is_builder']) ) 
        {
            return $content . do_shortcode("[av_social_share title='Share this entry' style='' buttons='' share_facebook='' share_twitter='' share_pinterest='' share_gplus='' share_reddit='' share_linkedin='' share_tumblr='' share_vk='' share_mail='' av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='']");
        }
    
        return $content;
    }
    

    Cheers!
    Peter

    #1016298

    while that does put the social icons at the bottom of the screen that comes up upon clicking into that Existential Dilemma post (last post on list. . . created/saved in Default Editor), the problem persists that when you click Read More, it just takes you to a screen with the excerpt and Read More again . . . but there are just no other posts on the screen….just the excerpt from the Existential Dilemma post.

    Is this something I can fix?

    Jon

    #1016307

    Hi!
    I’ll close this thread now because the initial issue is solved. We’ll continue in the other thread.

    Best regards,
    Peter

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Social Share not on blog posts’ is closed to new replies.