Forums

Change order of plugin apps in posts (8 posts)

  1. jellyhead
    Member
    Posted 1 year ago #

    Hi Y'all!

    I am using a podcast & 2 social media plugins on my blog. They come up as SM icons, then the podcast, then the FB-like icon.

    Is there a way to change the order in which plugin places their code into the a post? They are all going after the post content.

    Thank you!!

  2. mattotoole
    Member
    Posted 1 year ago #

    I've been searching for an answer to the same problem, with no luck. What controls the order in which these things are displayed?

  3. jellyhead
    Member
    Posted 1 year ago #

    Hi Matt,

    I'm sorry to say that I never did work it out.
    I got around it by choosing a combination of plugins that displayed the icons in the order that I wanted them.
    Sorry I can't be more help!

    Best of luck!

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    When I ran into this (using like buttons, a podcast, and a rating) I had to do a little digging.

    I read through the plugin's code (and a LOT of trial by error) and figured out what functions caused the display.

    I was then able to hard code each plugins output exactly where I wanted it into the loop in my theme.

    It ain't easy, and it is different for every plugin

  5. jellyhead
    Member
    Posted 1 year ago #

    Thanks! Rev.
    So you edited the plugin? What happens when the plugin gets updated?

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    No no, I find the function that causes the display inside the plugin, and then I put that into my theme where I want the plugin.

    For instance, to display my podcast with ratings I use:

    <?php if (function_exists('the_powerpress_content') ) : ?>
    				<?php if( $episode_content = get_the_powerpress_content() ) : ?>
    					<div class="powerPress">
    						<fieldset class="episode-box">
    						<legend>Voodoo Empire Mix</legend>
    						<?php if(function_exists('the_ratings') ) : ?>
    							<?php the_ratings(); ?>
    							<br />
    						<?php endif; ?>
    						<?php echo $episode_content; ?>
    						</fieldset>
    					</div>
    				<?php endif; ?>
    			<?php endif; ?>

    To conditionally display each as appropriate. Sometimes I can find functions to call from plugin instructions, from plugin author websites, or from actually having to look at the plugin code

  7. jellyhead
    Member
    Posted 1 year ago #

    Great!
    Thanks for sharing that. It makes sense. Good to know for future projects!

  8. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Sure! It's real easy with some plugins.... with others you really have to dig around. But once I built my own theme, I really wanted fine grained control over where everything went.... that's when I really started poking around in the plugins.

    I don't know php real well, so for me its a lot of trial and error.

Topic Closed

This topic has been closed to new replies.

About this Topic