homepage Welcome to WebmasterWorld Guest from 54.227.67.210
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
T constant encapsed string
Help please
bryvx




msg:4601655
 10:52 pm on Aug 13, 2013 (gmt 0)

This is the script. I have no background in programming but I'm trying to revamp the website on Wordpress. It says I have a T_CONSTANT_ENCAPSED_STRING error. Please help. I believe its on the the_time line.

/* BLOG SET UP */

$loopty_loop = new my_loops('showposts=5');

class my_loops extends thesis_custom_loop {
function category() {
if (is_category('blog')) {

while (have_posts()) {
the_post(); ?>
<div class="post_box">
<div class="headline_area">
<?php $post_image = thesis_post_image_info();
echo $post_image['output']; ?>
<h2 class="entry-title" rel="bookmark" title="<?php the_title();?>">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h2>
<div class="op-meta">By <?php the_author_posts_link(); ?>
</div>
<div class="format_text entry-content">
<?php the_content('Read the full post'); ?> | <?php the_time (m'jY'); ?></div>
</div>
<div class="op-tags">
<p><a class="comments" href="<?php comments_link(); ?>"><?php comments_number('0 Comments', '1 Comment', '% Comments'); ?></a> | <?php the_tags('Tags: ', ', ', '<br />'); ?></p>
</div>
</div>
<?php }
}
else
thesis_loop::category();

 

rainborick




msg:4601659
 11:19 pm on Aug 13, 2013 (gmt 0)

This:

<?php the_time (m'jY'); ?>

looks like it probably should be:

<?php the_time ('mjY'); ?>

bryvx




msg:4601664
 11:46 pm on Aug 13, 2013 (gmt 0)

Thanks! Although I can't even get to my website. It's hosted by wordpress and whenever I try to go to any of my pages it says:


Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/michiganreview11/michiganreview.com/wp-content/themes/thesis_185/custom/custom_functions.php on line 397


:(

jatar_k




msg:4601672
 12:20 am on Aug 14, 2013 (gmt 0)

did you make the change rainborick mentioned?

and what is on line 397?

bryvx




msg:4601685
 1:18 am on Aug 14, 2013 (gmt 0)

I can't make the change. When I try to login to wordpress to go to the editor or any web page with michiganreview.com it says "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/michiganreview11/michiganreview.com/wp-content/themes/thesis_185/custom/custom_functions.php on line 397 "

I believe line 397 is <?php the_time (m'jY'); ?> but I can't even get to it...

not2easy




msg:4601732
 4:47 am on Aug 14, 2013 (gmt 0)

If you know the name of the file that the code that is posted in the OP is in, go into your site via ftp, download that file and edit it in a plain text editor to correct the error pointed out and upload it to the same location. It almost looks like a plugin settings file so try looking in your plugins folder. It is at wp-content > plugins

Your site is not hosted at wordpress.com, it is hosted at your domain on an install of WordPress according to the URLs you supplied.

It is important that the file is edited in plain text, preferably in a program like Notepad++ (for Windows) or TextWrangler/BBEdit (for MAC) where you can specify that it is edited in UTF-8 and not in an editor like Word that may alter the document and give you more problems after the fix. If you are on Windows, be sure to select UTF-8 (Without BOM).

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved