• Can anyone help me figure out what’s wrong with this code?
    It is suppose to be, if a Page with page slug “links” is being displayed, it will process the code below.
    Now what I am getting is it echo/print out all the codes instead of processing them.

    <?php if( is_page(‘links’) ) : ?>
    echo ‘If you want to display your links in the list below, you can submit your site here.’;
    require ‘../linkman/settings.php’;
    $lines = array ();
    $lines=file(‘../linkman/linkinfo.txt’);
    echo ‘<p class=”linkman”>’;
    foreach ($lines as $thisline)
    {
    $thisline=trim($thisline);
    if (!empty($thisline)) {
    list($name,$email,$title,$url,$recurl,$description)=explode($settings[‘delimiter’],$thisline);
    if ($settings[‘clean’] != 1) {$url=’https://www.raymond.cc/linkman/go.php?url=&#8217;.$url;}
    echo ‘

Viewing 5 replies - 1 through 5 (of 5 total)
  • I take it that you’re entering this text in a post from the WordPress administration area? If so you’ll need a php plugin, I currently use runPHP, you should check it out.

    Thread Starter raymondcc

    (@raymondcc)

    Nope, I want to enter this “PHP code” in a “Page” from the WordPress admin Presentation area.

    Forget the online editor. Make a Page template and put the code there. Then create a new Page using the new template.

    Thread Starter raymondcc

    (@raymondcc)

    moshu, I do already have Page with 3 pages using the template.

    If I do not use <?php if( is_page(‘links’) ) : ?> php code, all 3 Pages will run this php code.
    I only need 1 of my Page to process the php code.

    You can have ten thousand Page templates ??
    Select this template ONLY for your links Page. For the other Pages use a “normal” template. Which part is so compliacted in this?
    And you don’t need any conditonal tags for that.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conditional Tags problem’ is closed to new replies.