GetSimple Support Forum
page content into sidebar - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: page content into sidebar (/showthread.php?tid=9954)



page content into sidebar - maco-nl - 2017-08-19

Hi All ,,
perhaps somewhere already on the forum ,
i also have read the wiki about the page slug ,but couldn't find it what i need

i have created a page ,, sidebar2 the page slug is also called sidebar2

and i want the content from this page to show up in the sidebar
i made a component called sidebar 2
into this component
i added the page slug like : <?php get_page('sidebar2'); ?>

but somewhere it doen't take the content ,,
when i started with get simple i managed to get it work but now i'm not so lucky anymore

can someone point me into the right direction ?
many thanks
Mandy


RE: page content into sidebar - hameau - 2017-08-19

(2017-08-19, 01:09:01)maco-nl Wrote: i added the page slug like : <?php get_page('sidebar2'); ?>

Try:
<?php get_page_content('sidebar2'); ?>
(this is wrong – see my post below.

or, if you have the I18N plugin:
PHP Code:
<?php get_i18n_content('sidebar2'); ?>
for multilanguage content.

Wiki: http://get-simple.info/wiki/themes:template_tags
I18N: http://mvlcek.bplaced.net/get-simple/i18n

Edit: Incorrect code snippet


RE: page content into sidebar - maco-nl - 2017-08-19

Hi Nick ,
so many thanks for your great help also for both links ,,
pretty helpfull cause i had read the wiki but not the template part

i tried <?php get_page_content('sidebar2'); ?>
it did load the content from the homepage ,, but then i made
<?php get_pagecontent('sidebar2'); ?> and this is the line that loaded the content from the page into the sidebar :-)
many many thanks
regards Mandy


RE: page content into sidebar - hameau - 2017-08-19

(2017-08-19, 02:31:31)to echo or returnmaco-nl Wrote: i tried <?php get_page_content('sidebar2'); ?>
it did load the content from the homepage

Sorry, my mistake. It should be:
PHP Code:
<?php getPageContent('slug'); ?>
<?php returnPageContent
('slug'); ?>

to echo or return the page content of 'slug'.

Glad you managed to do it anyway.