WordPress.org

Ready to get started?Download WordPress

Forums

Socialize
[resolved] Change location of Socialize Plugin (7 posts)

  1. Mr Toast
    Member
    Posted 3 years ago #

    Hi can somebody help with Socialize.

    At the moment the 'call to action' comes up directly under the post.

    <article>
      <header>.....</header>
      <div class="entry">
      ...some text...
      <div class="socialize-container">......</div>
      </div>
      <footer>.....</footer>
      </article>
    
    How can I move it so that it shows up between the
    <footer> tags?
    I have looked at the source but I don't understand how to move it.

    I'd love some help!

    Cheers.

  2. Jon Bishop
    Member
    Plugin Author

    Posted 3 years ago #

    It is currently not possible.

    I am thinking of reworking the code a bit which might bring about the opportunity to integrate this functionality. It will most likely be a function you paste into your template to override the default settings. (ex: like <?php display_socialize(); ?>)

    I am currently busy with other plugin work but coming out with a new version of this plugin is high on my list of priorities.

  3. Mr Toast
    Member
    Posted 3 years ago #

    Hi Jon,

    Thanks for the reply. Yeah after investigating more i realised how the code was added to the article and why I couldn't change it. I managed to do a template specific hack where I left the article 'div' and 'footer' tags unclosed and then edited the code in socialise to close them once the text strings are replaced. Perfect for what I need at the moment.

    Cheers.

  4. nmask
    Member
    Posted 3 years ago #

    Hey Jon,

    I like your plugin for style and simplicity, but you promised to add this function (ex: like <?php display_socialize(); ?>).. I wounder is it added?!

    Thanks!

  5. Jon Bishop
    Member
    Plugin Author

    Posted 2 years ago #

    I just finished my latest release which required a rewrite of the plugin core. I pushed it out before I could add this functionality so I'll keep this as unresolved and add it to my to-dos for an upcoming release.

    So much to do and so little time :/

  6. Kevin Leary
    Member
    Posted 2 years ago #

    Thanks for the plugin Jon, it's just what I needed!

    I was hoping to include the widgets manually in my theme much like nmash, so I crafted the following solution. It's not the best way to do it, but hopefully it may save you a little time in the future:

    Added method to the SocializeFrontEnd class at the bottom of /frontend/socialize-frontend.php:

    // Add buttons to theme manually with template function
    function display_socialize() {
    
    	$socialize_settings = array();
    	$socialize_settings = get_option('socialize_settings10');
    	$content = $this->inline_wrapper($socialize_settings) . $content . $this->action_wrapper($socialize_settings);
    
    	return $content;
    }

    After that I'm able to use Socialize inside of my theme using the following:

    // Manually add the Socialize Plugin output
    if( class_exists('socializeWP') ) {
    	global $socializeWP, $socializeWPfrontend;
    	if( method_exists($socializeWPfrontend, 'display_socialize') )
    		echo $socializeWPfrontend->display_socialize();
    }
  7. streetlight708
    Member
    Posted 2 years ago #

    Ah, @kevinlearynet, I can't seem to get your solution to work? I added your code to the proper files, then tried to add it to a certain section of The Loop so it'd float nicely around my title tags.

    Any suggestions? I would really appreciate them!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic