Search found 3 matches

by Kamikaze
Sat Oct 19, 2024 10:02 am
Forum: General
Topic: Load PHP code into Static Page
Replies: 16
Views: 226188

Re: Load PHP code into Static Page

@arfa,

Why create a plugin for a task that is solved with two lines of code?
by Kamikaze
Fri Oct 18, 2024 9:09 pm
Forum: General
Topic: Load PHP code into Static Page
Replies: 16
Views: 226188

Re: Load PHP code into Static Page

index.php

<?php
if($WHERE_AM_I == 'page' && !empty($page->template())) {
include(THEME_DIR_PHP . $page->template() . '.php');
}
?>


Template name (for example: tag.php) - an additional file in the folder with the theme.

<?php
$items = getTags();

foreach ($items as $tag) {
echo '<p ...
by Kamikaze
Sat Oct 05, 2024 7:01 pm
Forum: General
Topic: pagebreak / read more
Replies: 18
Views: 29096

Re: pagebreak / read more

Archive your theme and give a download link, maybe you are looking for a problem in the wrong place.