• Resolved Ashish

    (@ashishrox)


    I installed this theme yesterday.The Main page works fine but single posts are all blank except header image. I have a couple of other themes and they are working fine. How do i solve this?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you link to a page with the issue? The demo seems to work:
    1. https://wp-themes.com/pixelhunter/
    2. https://wp-themes.com/?p=36

    Thread Starter Ashish

    (@ashishrox)

    yeah, please look at solitude.in

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Does the issue persist with all plugins deactivated?

    Thread Starter Ashish

    (@ashishrox)

    yes it does. i even deleted the theme from themes folder and did a fresh install. problem still persists ??

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you access your website’s error logs? Your hosting providers can help you find them. When you find them, could you copy all of the logs and paste them into PasteBin and link us that PasteBin page?

    Thread Starter Ashish

    (@ashishrox)

    this was in error log, repeated –

    PHP Fatal error: Can’t use function return value in write context in /~/~/~/solitude.in/public_html/wp-content/themes/pixelhunter/content-single.php on line 52, referer: hxxp://www.solitude.in/

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you edit that file? Try replacing line 52 of that file with this:

    if(get_the_tag_list()){ ?>

    Thread Starter Ashish

    (@ashishrox)

    Thanks, that worked ! tag listing was messing with php ( i guess)

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If this was not an issue in the previous version of the theme, I think maybe “get_the_tag_list” function was updated by WordPress and its return value was changed.

    So you can’t use this:

    if(!empty(get_the_tag_list())){ ?>

    Which is basically the same as this:

    if(get_the_tag_list()){ ?>

    Theme Author Hemant Acharya

    (@hemant-acharya)

    Hi,

    @ashish I will update the theme ASAP. And yeah Andrew’s code above must pretty much solve the problem.

    @andrew WordPress is okay. Nothing was changed. My bad that I used empty function with get_the_tag_list().

    According to php.net

    Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error.

    It worked perfectly well on my local install as my PHP was 5.5, same for the theme preview. So didn’t know this problem existed.

    Thanks
    -Hemant

    Thread Starter Ashish

    (@ashishrox)

    thank you both @andrew @hemant Acharya

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Single posts not working – blank’ is closed to new replies.