[Support request] Shortcode problem with lgc

Home Forums Support Shortcode problem with lgc

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #308145
    Hans

    Hi Tom or Leo,

    this image shows my html code:

    The shortcode is very simple:

    
    function f_vertraulich() {
      if (is_user_logged_in()) {
    	?><br><h3><strong>P. S.: </strong>Als Mitglied unserer Gremien stehen Ihnen hier auch die Unterlagen der nicht öffentlichen Sitzungen zur Verfügung. Ausgeschlossen sind jedoch Tischvorlagen, die nur in der Sitzung eingesehen werden können.</h3>
    	<?php
      };
    }
    add_shortcode('vertraulich', 'f_vertraulich');
    

    And at the end this is the output null to the screen.

    The shortcode is outputted before the content of the lgc columns. What do I make wrong????

    Hansimage

    GeneratePress 1.3.46
    GP Premium 1.2.96
    #308216
    Tom
    Lead Developer
    Lead Developer

    You would have to use output buffering in your shortcode. More info on that here: https://codex.wordpress.org/Shortcode_API#Output

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.