Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return shortcode instead of echo #52

Open
unbunet opened this issue Dec 31, 2013 · 1 comment
Open

return shortcode instead of echo #52

unbunet opened this issue Dec 31, 2013 · 1 comment
Assignees
Labels

Comments

@unbunet
Copy link

unbunet commented Dec 31, 2013

The shortcode should be returned instead of being echoed. It will work the way it is in some circumstances but won't work in others (the output will appear on top of a page regardless of where the shortcode was put).

I suggest

public function parallaxcontentslider_shortcode_call( $atts ){
    // Extracting parameters
    extract( shortcode_atts( array (
                                    'categ' => '',
                                   ), $atts ) );

    ob_start(); 
    get_wp_parallax_content_slider( $categ );
    $slider = ob_get_contents(); 
    ob_end_clean();
    return $slider;
}

Nice plugin btw. I plan to make my theme plug & play ready for it.

@ghost ghost assigned jlethuau Jan 28, 2014
@jlethuau
Copy link
Owner

Hi,
I'll change that you're right, you're not the first to describe this strange behavior (output on top of pages)
Do you know exactly why it doesn't work with "echo" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants