Theres is get_parent( $echo=true ) template tag, but is there a get parent url ?
QUESTION Get parent url Get specifig page title etc
|
2019-04-02, 06:23:18
I am not an expert in PHP, so I usually also ask questions on the forum. Here is the code I have in the file with the answers to my questions.
Code: <?php
2019-04-02, 17:50:34
Thanx Oleg06 that works, yes i have to ask forums, my php is "nonexistent" but im learning a bit here and there as i go .
Carlos snippet dont give parent url, it gives current page url.
2019-04-03, 04:42:14
Ah yes, sorry.
I've removed my useless post.
Heres more "how to" questions.
1. How to get specifig page title? like there is snippet for content getPageContent('slug'); 2. How to get specifig page image if there is one?. 3. How to get specifig page url?.
2019-04-11, 23:54:43
1.
<?php getPageField('slug','title'); ?> 2. Depends on the plugin you're using to assign images to pages.
2019-04-12, 00:41:04
2019-04-14, 18:10:12
(2019-04-12, 00:41:04)Riianna Wrote:(2019-04-11, 23:54:43)Carlos Wrote: 1. 2. Use Custom Fields plugin to add images for pages and code Code: <?php getPageField('slug', 'field_name'); ?> 3. <?php getPageField('slug',url'); ?> - will this work?
2019-04-14, 19:04:08
In fact all this work with the main language. How can we use <?php getPageField('slug','title'); ?> on multilanguage websites? So that we can have only one component?
2019-04-22, 21:11:42
Making horror theme to friend and frontpage template has 3 boxes with some info from specifig pages like "who we are" etc. So i try to make it dead simple for him to add page title and page image to those boxes, like getting specifig page title with link and get specifig page image
2020-04-12, 05:30:16
More info about what fields are available here:
http://get-simple.info/wiki/config:caching-function (bottom of page) The good news: Any extra fields saved by plugins (e.g customFields & il8n_CustomFields ) will also be available. |
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)