• I made a child of vantage premium
    all look ok
    tried entering this code in child function php

    add_action( ‘wp’, ‘post_pw_sess_expire’ );
    function post_pw_sess_expire() {
    if ( isset( $_COOKIE[‘wp-postpass_’ . COOKIEHASH] ) )
    // Setting a time of 0 in setcookie() forces the cookie to expire with the session
    setcookie(‘wp-postpass_’ . COOKIEHASH, ”, 0, COOKIEPAT

    got this in a box

    ( ! ) Parse error: syntax error, unexpected end of file in C:\wamp\www\wordpress\wp-content\themes\vantage-chile-theme\functions.php on line 21

    Call Stack

    #

    Time

    Memory

    Function

    Location

    1 0.0016 341168 {main}( ) ..\theme-editor.php:0
    2 0.0027 410032 require_once( ‘C:\wamp\www\wordpress\wp-admin\admin.php’ ) ..\theme-editor.php:10
    3 0.0032 428208 require_once( ‘C:\wamp\www\wordpress\wp-load.php’ ) ..\admin.php:31
    4 0.0036 439168 require_once( ‘C:\wamp\www\wordpress\wp-config.php’ ) ..\wp-load.php:37
    5 0.0045 537272 require_once( ‘C:\wamp\www\wordpress\wp-settings.php’ ) ..\wp-config.php:89
    so I thought I would hit the back stroke delete button and update file
    now I cant even get into wordpress
    this just comes up on screen

Viewing 3 replies - 1 through 3 (of 3 total)
  • You need to enclose your code in backticks (usually above your tab key) or use thecode` button in the editor. Without that, your code does not show up properly and may have been mangled by the parser.

    FWIW, unexpected end of file usually means that you left something off the end of a function: a closing brace, a semicolon, etc.

    Thread Starter SHAUN2015

    (@shaun2015)

    I’m new at this {but enjoying it }
    I could not get in to wordpress after installing the code so I went into php admim and dumped data base and started again
    do you know of any good you tube video you can recommend on this
    or the best way to backup any work done .
    Im back to where I was before I tried installing the code,
    I copied that bit of code of this website
    so I thought it was as simple as copy an paste
    I think I was running before I could walk
    step by step I think
    any help welcome

    It depends. What were you trying to accomplish in the first place?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘function php’ is closed to new replies.