• Hi, The social shares are showing at the very bottom of my post. I would like for it to be above the Other Posts You May Enjoy.

    Also, the header font is too big.

    TYIA

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    To move the buttons, you have a few options. The FAQ shows examples of the filters available for changing the locations. You’d likely want to follow along the lines of the first one (moving the before location to genesis_before_entry–I know you don’t want it there, but doing something similar with the after location, depending on where the related posts have been hooked in).

    Another option would be to select the manual placement option for posts and handle the output completely with code. I use something like this on my own site:

    
    add_action( 'genesis_after_content', 'leaven_add_buttons_downloads', 20 );
    function leaven_add_buttons_downloads() {
    	if ( ! function_exists( 'scriptlesssocialsharing_do_buttons' ) ) {
    		return;
    	}
    	echo wp_kses_post( scriptlesssocialsharing_do_buttons() );
    }
    

    So if your related posts are added similarly, then you could try this. Note: modifying the output with a filter or code as above will mean you’re editing important site files–please make sure you have backups, practice safe coding, etc.

    As for the style of the heading above the buttons, the plugin doesn’t actually style that at all–it’s just using whatever your theme rule is for h3 elements. You can target it more specifically by creating a new rule for .scriptlesssocialsharing h3.

    Hope that helps you get started!

    Thread Starter tammy1999

    (@tammy1999)

    thank you for your reply and since I’m not a programmer I have a question.

    The coding you gave me above, is that what I put in the Genisis hook?

    Also, I understand what you mean about the h3, but do I need to make a CSS or???

    TY

    Plugin Author Robin Cornett

    (@littlerchicken)

    The code example I shared above (or from the FAQ) could go in your theme functions file, if you are comfortable editing that (just please make sure you have backups and FTP access as a misplaced ; can bring down your site). Note: the code I shared above, I don’t think will work in your specific instance–although I can’t tell for sure just by looking at the source code of the page, I suspect that the related posts are added to the content itself, and my code above would move the sharing buttons down even farther than they are by default. It may take some tinkering.

    If you are not comfortable with editing your theme files directly, I believe there are plugins available to make it easier to add code like this to your site–I just can’t think of names offhand. Oh wait, maybe Genesis Simple Hooks. That may be a safer way to experiment with adding code to Genesis specific locations.

    As far as tinkering with CSS goes, you could edit your theme’s style.css file (again, use caution and have backups), or you could go into the Customizer and use the new Additional CSS module instead. I find that’s a nice way to easily add in a quick change.

    Thread Starter tammy1999

    (@tammy1999)

    Putting the code in in the theme functions file only moved it lower as you thought. Putting it in Genesis hooks, it doesn’t show at all.

    I did change the CSS with success. So the header is not as large.

    Plugin Author Robin Cornett

    (@littlerchicken)

    I am guessing that your related posts are being added to the content using the_content filter, which is the same filter Scriptless uses to add the buttons, and the issue is that the related posts are getting added first. So you can try the filter example from the FAQ in your functions.php file. Not tested, but I’m guessing something like this would be the thing to try:

    
    add_filter( 'scriptlesssocialsharing_locations', 'prefix_change_sss_locations' );
    function prefix_change_sss_locations( $locations ) {
    	$locations['after'] = array(
    		'hook'     => false,
    		'filter'   => 'the_content',
    		'priority' => 5,
    	);
    
    	return $locations;
    }
    

    Basically this is not modifying the default Scriptless location at all, except for the priority, which is set to be quite early (lower numbers run first–the default is much higher). So if you still have the filter in your functions.php file, try deleting it (and the code from my site if you used that) and replacing it with this one, and see where the buttons end up. (Also if you have the posts settings on manual, change it to after.) If 5 moves it to a place you don’t want, try 15, maybe. The default for Scriptless is 99. The related posts may be at 10, unless the plugin author has specified something else. HTH

    Thread Starter tammy1999

    (@tammy1999)

    Thanks for your help. That code did break my site and I was able to restore with backup.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change Location after post & Font size’ is closed to new replies.