Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
component only in child pages
#5
(2016-03-05, 03:28:23)Bigin Wrote: try this, that should do the trick:

Code:
$parent = get_parent(false);
if(!empty($parent)) {
   // show component ...
}

For some reason I get the component on all pages with that. I can check the variable is empty with print $parent (and it is). Using
PHP Code:
<?php $parent get_parent(false);
if(!empty(
$parent)) {get_component('disqus');} ?>
Reply


Messages In This Thread
component only in child pages - by Timbow - 2016-03-04, 10:37:45
RE: component only in child pages - by Bigin - 2016-03-04, 16:04:43
RE: component only in child pages - by Timbow - 2016-03-05, 03:13:18
RE: component only in child pages - by Bigin - 2016-03-05, 03:28:23
RE: component only in child pages - by Timbow - 2016-03-05, 07:19:34
RE: component only in child pages - by Bigin - 2016-03-05, 08:20:59
RE: component only in child pages - by Timbow - 2016-03-05, 09:03:05



Users browsing this thread: 1 Guest(s)