Site logo

Archived topic

How can i display two short codes next to each other?

7 replies · Started by Daniel on July 10, 2020

Viewing posts 1–8 of 8

Hello

I'm trying to display two shortcodes next to each other [wp_ulike] and [addtoany] right above the category tags : https://prnt.sc/tfqdou

I want this to display it on category pages, homage page and post page. How can I achieve this?

Thanks!

That worked but is there any way I can move the image (second shortcode) all the way to right side? https://prnt.sc/tgijs7

Try this as well:

.after-content-icons .addtoany_shortcode {
    margin-left: auto;
}

Hi, I'm not using an the Element, but trying to use the copyright bar (enabled in GP Premium Settings). And I'd like to display my affiliate links for GP and Flywheel (my host) using this format:

© 2020 MATCHLESS WEB STUDIO, LLC | POWERED BY GeneratePress + Flywheel

But when using the short codes I registered, likely incorrectly (see PHP below), the output is this:

© 2020 MATCHLESS WEB STUDIO, LLC | POWERED BY +

Where the only link output is the GP affiliate Link and it's assigned to the "+" that should be in between the two links.

Is there something that could be cleaned up with the PHP below that would correct my error?

Or would it be better for me to scrap the copyright bar and use an Element to produce the effect I'm looking for?

My site is https://matchlessweb.com/ if you'd like to have a look at the copyright bar with this output:

function gp_affiliate_link() {
return '';
}

add_shortcode("GP", 'gp_affiliate_link');

function flywheel_affiliate_link() {
return '
';
}

add_shortcode("Flywheel", 'flywheel_affiliate_link');

This archived topic is closed to new replies.