• Resolved martijnvhummel

    (@martijnvhummel)


    Hi,
    I want to use Pootlepress to easily create columns, video/parallax backgrounds, etc.

    Instead of creating all the content/rows on 1 created WP pootlepress page, I want to make multiple pages with a row per page. For example: 1 page for home, 1 page for about, etc. Why? I’m used to working with separate pages, one page per section + in my opinion it would be easier for customer overview.

    Problem:
    – By using get_page, all the separate sections get the same content, instead of their unique content.

    Situation:
    – I’m using the blankslate theme.
    – By using the original editor, there is no problem, the right content is displayd. However, I would like to use the pootlepress editor.
    – On page.php, to copy all the page contents to 1 page, I’m using:
    <?php
    $pages = get_pages( array(‘sort_column’ => ‘menu_order’) );

    foreach ($pages as $page_data) {
    $content = apply_filters(‘the_content’, $page_data->post_content);
    $title = $page_data->post_title;
    $slug = $page_data->post_name;
    echo “<section class=’$slug’>”;
    echo “<h2>$title</h2>”;
    echo $content;
    echo “</section>”;
    }
    ?>

    Outcome example
    – The outcome is:
    Home
    Home test content
    About
    Home test content

    – Instead of:
    Home
    Hometest content
    About
    About test content

    Somehow, the pootlepress content can’t be targeted in the right way. Does anyone know how I could solve this problem?

    Much appreciated! Thanks!

    https://www.ads-software.com/plugins/pootle-page-builder/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author shramee

    (@shramee)

    Hey,
    I guess you are tryna output multiple pages on single page for a cool single page website using page templates.

    Try replacing
    $content = apply_filters('the_content', $page_data->post_content);
    with
    $content = $GLOBALS['Pootle_Page_Builder_Render_Grid']->panels_render( $page_data->ID );

    Lemme know how it works for ya ??

    Thread Starter martijnvhummel

    (@martijnvhummel)

    Thanks for the fast response!
    It actually gives an error:

    Fatal error: Call to undefined method Pootle_Page_Builder_Render_Grid::panels_render()

    I changed the code to:

    <?php
    $pages = get_pages( array(‘sort_column’ => ‘menu_order’) );
    // $pages = get_pages();
    foreach ($pages as $page_data) {
    $content = $GLOBALS[‘Pootle_Page_Builder_Render_Grid’]->panels_render( $page_data->ID );
    $title = $page_data->post_title;
    $slug = $page_data->post_name;
    echo “<section class=’$slug’>”;
    echo “<h2>$title</h2>”;
    echo $content;
    echo “</section>”;
    }
    ?>

    Plugin Author pootlepress

    (@pootlepress)

    Marking this as resolved… let me know if it’s not.

    Thanks Shramee ; )

    Thread Starter martijnvhummel

    (@martijnvhummel)

    @pootlepress, it’s actually not resolved for me.
    As I said, an error accured, which I can’t resolve.
    Any solution?
    Thanks!

    Plugin Author shramee

    (@shramee)

    Aah, my bad…
    That’s the parent class we need it’s child.

    This should work,
    $content = $GLOBALS['Pootle_Page_Builder_Render_Layout']->panels_render( $page_data->ID );

    Keep me posted ??

    Thread Starter martijnvhummel

    (@martijnvhummel)

    Thanks a lot shramee, this one’s working!
    The right content is in the right place.
    I spent two days figuring this out.

    One more thing though.
    On the about page, I made 2 pootlepress columns.
    Those two pootlepress columns, don’t have 50% width anymore.

    Example:
    Home
    Home test content
    About
    About column 1
    About column 1

    Normally they would have 50% width, but after the get_page, not anymore.
    Any ideas? ??

    Thread Starter martijnvhummel

    (@martijnvhummel)

    Thanks a lot shramee, this one’s working!
    The right content is in the right place.
    I spent two days figuring this out.

    One more thing though.
    On the about page, I made 2 pootlepress columns.
    Those two pootlepress columns, don’t have 50% width anymore.

    Example:
    Home
    Home test content
    About
    About column 1
    About column 1

    Normally they would have 50% width, but after the get_page, not anymore.
    Any ideas? ??

    Plugin Author shramee

    (@shramee)

    Hi martijnvhummel,
    Sorry for the delay…
    Can you share a link where this is happening?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘get_page not working with pootlepress?’ is closed to new replies.