Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get_page_title('slug') ?
#1
I was using
Code:
<?php getPageContent('slug'); ?>
for site content from a specific page when converting a Maintenance-template to GetSimple. But when I used
Code:
<?php get_page_title(); ?>
I got off course the site-title. But what I want is the title of that specific maintenance page. How do I do that?
Reply
#2
Code:
<?php getPageField('slug','title'); ?>
Reply
#3
(2014-01-16, 05:38:32)Carlos Wrote:
Code:
<?php getPageField('slug','title'); ?>

Thanks!

Are there more functions for php getPageField ? Then they can be added here: http://get-simple.info/wiki/theme:templa...e_snippets
Reply
#4
(2014-01-16, 05:44:51)datiswous Wrote: Are there more functions for php getPageField ?

http://get-simple.info/wiki/config:caching-function
--
Nick.
Reply
#5
I'd rather like that these functions (getPageContent, getPageField, etc., available since GS 3.1) were not camelCase, but lowercase with underscores, to be consistent with the other template tags.

If it wasn't because get_page_content, etc. already have an optional parameter ($echo), I would suggest that they had it but for the slug of other page.

An alternative could be an equivalent, like get_other_page_content, get_a_page_content or something (that actually would be an alias for getPageContent)
(BTW ages ago, before caching functions were available, I started working on a plugin to add these, though I called them that_page_content, etc.)
Reply
#6
Yes all the cache functions will get theme function aliases when I finish rewriting cache.

Please add your suggestions to the github case for refactor cache
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)