SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    May 2010
    Posts
    229
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Editor not reflecting front end

    On this page, you'll notice that the "Car Washes For Sale" featured content slider plugin appears above the "Crystal Clear..." div. And that's what you see with firebug too: http://www.screenshots.cc/show/55535/y6w4m.

    However, in my page editor, I have the shortcode for the plugin located below the Crystal Clear section. See this screenshot: http://www.screenshots.cc/show/55534/644yd

    So why does the front-end not reflect the way thing are arranged in the editor?

    Please advise. Thanks in advance!

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had a similar problem with a php include. The form included appeared at the top of the $content rather than where the shortcode was in the text. I changed the code to this:

    Code PHP:
    ob_start();
    include 'include-file.php'; 
    $content = ob_get_clean();   
    return $content;

    However this might not be the problem with your plugin shortcode. It's just what worked for me.

  3. #3
    SitePoint Addict
    Join Date
    May 2010
    Posts
    229
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    in what file did you make that change?

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I changed it in the functions.php files because that's where the shortcode function I was using was located. However if the problem is with a plugin the file that you'll need to look at will be within the plugin.

    I should point out that this might not be able to solve your problem. I'll try to have a look at the code for the plugin later and see if I can see where the problem lies.

  5. #5
    SitePoint Addict
    Join Date
    May 2010
    Posts
    229
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I decided to just create a new homepage template and put the section i need at the top above where the editor content resides.

    This is just a work-around but...

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Out of interest are you still using the plugin? Have you used this code to display the slider:

    PHP Code:
    <?php include (ABSPATH '/wp-content/plugins/wp-featured-content-slider/content-slider.php');?>

  7. #7
    SitePoint Addict
    Join Date
    May 2010
    Posts
    229
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i'm using the shortcode because its within the page editor.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •