WordPress.org

Ready to get started?Download WordPress

Forums

How to directly edit the page files (9 posts)

  1. cartpauj
    Member
    Posted 7 years ago #

    I would like to edit the pages without using WP's built in page editor. But I can't find the files anywhere on my server so if someone could point me in the right direction I would appreciate it. I know how to edit my header and sidebar files but as far as actual page content I can't find it.
    Thanks,

  2. MichaelH
    Member
    Posted 7 years ago #

    Pages, if we are talking about the entity you create via Write Page, are kept in the wp_posts table and are not meant to be edited except with what you call the page editor.

  3. cartpauj
    Member
    Posted 7 years ago #

    ok but I would really like to add some php to my pages but when I enter it in the page editor all I get is a page that displays the php tags not the actual content that the php is supposed to display, could you possibly tell me how to accomplish this?
    thanks,

  4. MichaelH
    Member
    Posted 7 years ago #

    Can put PHP code in pages and expect it to execute without using one of the phpexec type plugins.

    One example:
    http://priyadi.net/archives/2005/03/02/wordpress-php-exec-plugin/

  5. cartpauj
    Member
    Posted 7 years ago #

    ok I installed and activated the plugin ,now instead of the php tags I get this error message on my page:

    "Warning: Invalid argument supplied for foreach() in /home/muledeer/public_html/wp-content/plugins/exec-php/exec-php.php(39) : eval()’d code on line 51"

    any help would be great thanks

  6. MichaelH
    Member
    Posted 7 years ago #

    Okay sorry--should have pointed you to this plugin:
    http://bluesome.net/post/2005/08/18/50/

    If you need PHP in a widget see Otto42 widget:
    http://ottodestruct.com/blog/2006/04/09/fun-with-widgets/

  7. cartpauj
    Member
    Posted 7 years ago #

    The above is the plug-in I installed but I still get that error when trying to run this link script (which works fine when run on a non wordpress page:

    <?php
    require 'http://www.muledeerfanatic.com/linkman103/settings.php';

    $lines = array ();
    $lines=file($settings['linkfile']);

    echo '<p class="linkman">';

    foreach ($lines as $thisline) #THIS IS WHERE THE PROBLEM IS
    {
    $thisline=trim($thisline);
    if (!empty($thisline)) {
    list($name,$email,$title,$url,$recurl,$description)=explode($settings['delimiter'],$thisline);
    if ($settings['clean'] != 1) {$url='home/muledeer/public_html/linkman103/go.php=?url'.$url;}
    echo ''.$title.' - '.$description.'<br>';
    }
    }
    ?>

    any help would be appreciated.

  8. MichaelH
    Member
    Posted 7 years ago #

    How about

    foreach ($lines as $thisline) {
    $thisline=trim($thisline);
    .
    .
    .
  9. cartpauj
    Member
    Posted 7 years ago #

    didn't work sorry.

Topic Closed

This topic has been closed to new replies.

About this Topic