• camoman

    (@camoman)


    When I post a blog or my contributor post a blog. I get this error now

    Parse error: syntax error, unexpected T_DNUMBER in /home/customru/public_html/wp-content/themes/responsive/single.php on line 3

    I checked line 3 and nothing seems to be off. You can see the post but you cannot get to see the full blog post. Any idea? Thanks!

    Site is https://www.customruns.com/blog/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter camoman

    (@camoman)

    Anyone?

    https://codex.www.ads-software.com/Forum_Welcome#No_Bumping

    Can you post the first few lines of single.php here? Is this a theme you purchased/downloaded or did you create it yourself?

    Thread Starter camoman

    (@camoman)

    Ok thanks and sorry for the bumping. I logged in through the CPanel File Manager to access single.php. I used the free responsive theme for years and did not purchase it and modified in in 2012. It has been working well ever since but I just started blogging recently.

    1.<?php
    2.
    3.// Exit if accessed directly
    4.if ( !defined(‘ABSPATH’)) exit;
    5.
    6./**
    7. * Single Posts Template
    8. *
    9. *
    10. * @file single.php
    11. * @package Responsive
    12. * @author Emil Uzelac
    13. * @copyright 2003 – 2012 ThemeID
    14. * @license license.txt
    15. * @version Release: 1.0
    16. * @filesource wp-content/themes/responsive/single.php
    17. * @link https://codex.www.ads-software.com/Theme_Development#Single_Post_.28single.php.29
    18. * @since available since Release 1.0
    19. */
    20.?>
    21.<?php get_header(); ?>

    esmi

    (@esmi)

    Do not edit the theme itself. First create a child theme for your changes.

    Re-upload a fresh, unpacked, copy of the theme’s folder to wp-content/themes using FTP or whatever file management application your host provides.
    https://www.ads-software.com/themes/responsive

    Maybe a silly question, but are those numbers at the beginning of each line actually part of the code? Are those numbers in the actual file, or is that just the way the CPanel File Manager shows it?

    Just in case: they definitely should NOT be in the code.

    GOOD:

    <?php
    
    // Exit if accessed directly
    if ( !defined('ABSPATH')) exit;

    etc. etc.

    BAD:

    1.<?php
    2.
    3.// Exit if accessed directly
    4.if ( !defined('ABSPATH')) exit;
    5.

    etc. etc.

    Thread Starter camoman

    (@camoman)

    Hmm ok I really didn’t think I had to do all of that just to get a blog post to show up. Do you know what line 3 “Exit if accessed directly” has to do with the blog posting? It just want to see a full blog post. Everything on the website works properly and I do not want to re-do my existing child theme then upload. Is there an easier fix? Thanks for you assistance btw!!!!!!!

    Thread Starter camoman

    (@camoman)

    @senff let me try to access it another way to see if the numbers are there

    esmi

    (@esmi)

    Do you know what line 3 “Exit if accessed directly” has to do with the blog posting?

    It means you cannot access single.php via https://example.com//wp-content/themes/responsive/single.php

    Thread Starter camoman

    (@camoman)

    Through the CPanel the single.php up top it is showing it through the editor

    single.php
    ASCII C++ program text, with CRLF line terminators

    Thread Starter camoman

    (@camoman)

    Ok thanks Esmi for the link I understand now.

    How about opening single.php in a text editor on your computer?

    Thread Starter camoman

    (@camoman)

    Ok I opened it with Notepad++ and it looks the same

    1.<?php
    2.
    3.// Exit if accessed directly
    4.if ( !defined(‘ABSPATH’)) exit;
    5.
    6./**
    7. * Single Posts Template
    8. *
    9. *

    Thread Starter camoman

    (@camoman)

    I just changed the blog page to Blog Summary instead of Blog Excerpt in the meantime so people will not have to expand each story. I will drive myself nuts trying to find to what is causing this error. Thanks all anyways!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Getting error now when posting blogs’ is closed to new replies.