Deleted a line out of the index.php
-
I was trying to take out a missing image on the main page and deleted a line concerning the missing image, but it did not take the broken image link out, it took out a large triangle that was on the page and messed up the layout of the page.
I am not sure how to fix this. Can some one help me? This was set up for us by a student at a Digital Arts college and we were given next to no instructions on it. Plus we no longer have contact with the original designer.
-
Can you provide link to your site? So that we can see what actually is happening???
A link to the site would help.
You shouldn’t need to edit index.phpTry renaming index.php to say old-index.php so you don’t lose it.
Download wordpress to your hard drive,(there is a link above) unzip it and upload the index.php to where your old-index.php is.
If that doesn’t work you can put it all back to where you are now by deleting the new index.php and renaming old-index.php back to index.php~Rod
In the box where the “Continue Reading” is there should be a triangle on pointing to the right with the words “Latest Update” in it.
The reason I was trying to edit the index.php was because of the “missing image”. There were things that should have been showing up, but weren’t.
As I said, the page was made for us and then left to us to update with no training what so ever. We have been able to do basic stuff, but there are some things that we haven’t been able to do.
Thank you.
Got the main page fixed.
I have got to really read info about Word Press. Trying to align text next to a picture and am having trouble doing this.
Nice site.
Looks like the way its set up you have 5 actual pages and the Home page is a post page.So to add pictures to the gallery you click on pages (inside WP dashboard) and click edit on the page called photo-gallery
But to edit things on the front page (HOME) you click on posts and edit the corresponding post or just keep adding new posts.
In the editor there is an add media button that lets you use something in the Library or upload an image, then a pop up lets you choose to align the image with text using LEFT or RIGHT or CENTER
It takes a bit of practice, but it gets easier every time.
~Rod
Got the basic main page working, but there is still a problem with the posts not showing up correctly.
I need a quick course in this to figure out what is wrong.
Can you use Adobe Flash in Word Press? We have a student who redesigned the site in Flash and so we are thinking of making the change, but we all need to know exactly what we are doing in Word Press prior to making any changes.
You could incorporate some flash elements and make them work with WordPress, however: Flash isn’t compatible with a lot of devices now (iPads, iPhones, particularly) so it’s not recommended to use flash if you want people on mobile to be able to see your site.
I still have a problem with the Home page of our website.
As Kiwi51 stated the Home page is a post page. Unfortunately one of the posts looks to be embeded in the index.php or was deleted, but it is not allowing anything for that post to show up.
As I am new to WordPress I am still trying to get a handle on working with it. I stated in my original post that the website was designed by a student and then we were given admin access to update. But we were not given any instruction in WordPress. I am trying to read some information, but I know it will take time.
Any ideas on how to fix it would be greatly appreciated.
Also, we are possibly going to change the website in the near future. Someone is designing one in Dreamweaver. How difficult will it be to put the new site into WordPress from Dreamweaver? And how difficult will it be to make changes or updates?
Thank you in advance.
There is definitely some messed-up code going on here, in the linked ‘Latest Update’ image, which is bumping a bunch of things out of the way, including the body text for the ‘Enroll Now’ post.
<a title="Enroll Now" href="https://masseydance.com/2010/09/01/204/"> <strong><img target="_blank" missing-image_zps3803d257.png.html"="" media="" disneylover1031="" user="" s12.photobucket.com="" http:="" src="https://masseydance.com/wp-content/themes/kubrick-on-crackhttps://www.masseydance.com/wp-content/themes/kubrick-on-crack/images/latest_post.jpg< <a href="> '/;;;/ </strong> <img border="0" alt=" photo missing-image_zps3803d257.png" src="https://i12.photobucket.com/albums/a243/Disneylover1031/missing-image_zps3803d257.png"> </a>
Was this element hard-coded in the template you’re using for ‘home’?
Could you copy the code here so we can take a look?
With regards to Dreamweaver: I don’t use Dreamweaver, but I believe it won’t be a problem for the developer to create your custom theme using Dreamweaver, if they have had experience doing that before.
Once it is built and installed, you won’t use Dreamweaver anymore — you’ll update through the WordPress admin dashboard.
Someone is designing one in Dreamweaver. How difficult will it be to put the new site into WordPress from Dreamweaver? And how difficult will it be to make changes or updates?
Make sure the site is a WordPress site – it is NOT simple to move a non-WordPress site to WordPress.
I am just going to copy and paste the entire code from the Main Index Template (index.php). I appreciate the help with this. One of the dance students is taking computer classes and just for fun has redesigned the webpage in Dreamweaver. To be nice the owner is considering using what she has done because it is nice. I will have to let the owner know the possible problems we might run into since it is not designed in WordPress. This young lady has not learned anything about it yet. As I said previously, I am going to try and learn what I can to be able to make changes or updates.
Here is the code:
<?php get_header();?> <div id="main-container"> <ul class="posts"> <?php if(have_posts()):?> <?php while(have_posts()):the_post();?> <?php if (is_paged()) : ?> <?php $postclass = ('post'); ?> <?php else : ?> <?php $postclass = ($post == $posts[0]) ? 'featured-post' : 'post'; ?> <?php endif; ?> <?php if ($postclass == 'featured-post'){ ?> <div class="feature-post"> <a href="<?php the_permalink() ?>" title="<?php the_title() ?>"> <?php if ( get_post_meta($post->ID, 'image', true) ) { ?> <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, 'image', $single = true); ?>&h=274&w=304&zc=1&q=100" class="feature-image" /> <?php } else { ?> <img src="<?php bloginfo('template_directory'); ?>https://www.masseydance.com/wp-content/themes/kubrick-on-crack/images/latest_post.jpg< <?php } ?> <a href="https://s12.photobucket.com/user/Disneylover1031/media/missing-image_zps3803d257.png.html" target="_blank"> '/;;;/<img src="https://i12.photobucket.com/albums/a243/Disneylover1031/missing-image_zps3803d257.png" border="0" alt=" photo missing-image_zps3803d257.png"/></a> <div class="post-title-big"><a href="<?php the_permalink();?>" title="<?php the_title()?>"><?php the_title()?></a></div><?php the_excerpt();?><a href="<?php the_permalink();?>" id="continue-btn" title="Continue Reading">Continue</a> </div><!--feature-post--><?php } else { ?><li> <div class="<?php echo $postclass;?>"> <div class="post-title"><span class="comments-bubble"><?php comments_number('0', '1', '%');?></span><a href="<?php the_permalink() ?>" title="<?php the_title();?>"><?php the_title();?></a><!--comments-bubble--></div><!--post-title--> <?php if ( get_post_meta($post->ID, 'image', true) ) { ?> <a href="<?php the_permalink()?>" title="<?php the_title()?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, 'image', $single = true); ?>&h=164&w=320&zc=1&q=100" class="thumb-image" /></a> <?php } ?> <div class="post-excerpt"> <?php the_excerpt();?> </div><!--post-excerpt--> </div><!--post--> </li> <?php } ?> <?php endwhile;?> </ul> <?php endif;?> <div class="page-navigation"> <?php if(function_exists('wp_pagenavi')) {?> <?php wp_pagenavi(); ?> <?php } else { ?> <?php posts_nav_link();?> <?php } ?> </div><!--page-navigation--> </div><!--main-container--> <?php get_footer();?>+-
There are a lot of errors in that code. Without going too deep, I removed a bunch of the typos that were causing things to break. There are a few things about image treatment that I couldn’t be certain about at first glance, but hopefully the surface errors are the source. Let me know if it helps!
<?php get_header();?> <div id="main-container"> <ul class="posts"> <?php if(have_posts()):?> <?php while(have_posts()):the_post();?> <?php if (is_paged()) : ?> <?php $postclass = ('post'); ?> <?php else : ?> <?php $postclass = ($post == $posts[0]) ? 'featured-post' : 'post'; ?> <?php endif; ?> <?php if ($postclass == 'featured-post'){ ?> <div class="feature-post"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php if ( get_post_meta($post->ID, 'image', true) ) { ?> <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, 'image', $single = true); ?>&h=164&w=320&zc=1&q=100" class="thumb-image" /></a> <?php } else { ?> <img src="<?php bloginfo('template_directory'); ?>/images/latest_post.jpg" /></a> <?php } ?> <img src="https://i12.photobucket.com/albums/a243/Disneylover1031/missing-image_zps3803d257.png" border="0" alt="" /></a> <div class="post-title-big"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> </div> <?php the_excerpt(); ?> <a href="<?php the_permalink();?>" id="continue-btn" title="Continue Reading">Continue</a> </div><!--feature-post--> <?php } else { ?> <li> <div class="<?php echo $postclass; ?>"> <div class="post-title"><span class="comments-bubble"><?php comments_number('0', '1', '%');?></span><a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><?php the_title();?></a><!--comments-bubble--></div><!--post-title--> <?php if ( get_post_meta($post->ID, 'image', true) ) { ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, 'image', $single = true); ?>&h=164&w=320&zc=1&q=100" class="thumb-image" /></a> <?php } ?> <div class="post-excerpt"> <?php the_excerpt();?> </div><!--post-excerpt--> </div><!--post--> </li> <?php } ?> <?php endwhile;?> </ul> <?php endif;?> <div class="page-navigation"> <?php if(function_exists('wp_pagenavi')) {?> <?php wp_pagenavi(); ?> <?php } else { ?> <?php posts_nav_link();?> <?php } ?> </div><!--page-navigation--> </div><!--main-container--> <?php get_footer();?>
lettergrade – Thank you. It is better than it was. There is still something that isn’t quite right. It has what looks like a image icon for the post. Thought maybe it had to do with the image that was in the post, but I deleted that one and created a new post and it is still there.
Thank you again. You all have been a big help to two older ladies that were basically tossed this and told “Here you go. It’s been made, now you keep it updated”.
I have some computer knowledge, but the owner doesn’t have as much as me.
- The topic ‘Deleted a line out of the index.php’ is closed to new replies.