Home Forums Newsletter Plugin Support Own theme – only [newsletter] instead of the form

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10394
    sebastian
    Participant

    Hello,

    the title describes the problem: I have written a theme for wordpress, but after activation the newsletter-site has gone and only [newsletter] is shown. In other themes, the plugin works great!

    Is there a special method I have to call?

    Thanks,
    Sebastian

    #10395
    Stefano
    Keymaster

    How do you display the content of a page in your theme?

    #10396
    sebastian
    Participant

    Hi, first I have done it with get_the_content(), later with the_content(). My single page is domain.com/blog/newsletter-abonnieren, and I have tried:

    
    if (strpos($_SERVER['SCRIPT_FILENAME'], "newsletter") !== false) {
    the_content();
    } else {
    my_own_function_with_get_the_content...();
    }
    
    #10397
    sebastian
    Participant

    Oh my… of course it doesn’t work. with

    $_SERVER['SCRIPT_FILENAME']

    the result is always false, because it is always “path/index.php”. With

    $_SERVER['REQUEST_URI']

    it works. Sorry…

    #10398
    Stefano
    Keymaster

    But this way you’re blocking all plugin which have short codes. In your get content use the do_shortcode().

    #10403
    sebastian
    Participant

    Hello Stefano, thank you very much for your great support. I use WordPress only in a very clean and small scenario, but thank you!

    With my solution, I think I will have no problem with your plugin, right? I will have a look in this do_shortcode-method anyway.

    Best regards,
    Sebastian

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