kansasakki Posted October 2, 2011 Share Posted October 2, 2011 I need to customize a theme for WordPress a bit. I want to change modify the index.php file and the order one of the sidebars is called. I have searched, tested, and retested the index.php file and have been unable to locate the index.php file that is currently being used. Can some one give me a tip on where the active them index.php file is being called from? I have the theme working mostly correct, but I am unable to even get an HTML comment to show up in the viewed source code. The path I think the index.php file is located at is ../wp-content/themes/WPLocalPro/index.php but changing the comments in this file does not affect the rendered source code. Any help is greatly appreciated. <?php /** * Template Name: Home Page * * A custom page template without sidebar. * * The "Template Name:" bit above allows this to be selectable * from a dropdown menu on the edit page screen. * * @package WordPress * @subpackage Enterprise * @since Enterprise 1.0 */ get_header(); ?> <!--NAVIGATION PANEL END --> <!--BODY PANEL START --><!-- Nelson Test --> <div class="body_panel"> <!--LEFT BODY STARTaaaa --> <?php include (TEMPLATEPATH . '/leftbar.php'); exit('wtf smalls'); ?> <!--LEFT BODY END --> <!--MIDDLE BODY START --> <div class="middle_body"> <?php $upper = get_option('revchurch_upper'); echo stripslashes($upper); ?> <?php $section = get_option('revchurch_post1'); if($section == "") $section = 2; ?> <?php $i=1; query_posts('category_name=&order=desc&showposts='. $section.''); if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $img_url = get_post_meta($post->ID, "Rob Post Image URL", true); ?> <?php $video_code = get_post_meta($post->ID, "Rob Post Video Code", true); ?> <? if($img_url==""){?> <?php $img_url = get_post_meta($post->ID, "img_url", true); ?><? }?> <? if($i==2 ) { echo '<div class="pic_panel pic_panel_right">'; } else { echo '<div class="pic_panel">'; } ?> <?php if($video_code != '') { ?> <div class="video_div"> <?php preg_match_all('!height=["|\'](.*?)["|\']!is', $video_code, $matches); if(isset($matches[0])){ foreach($matches[0] as $key=>$val){ $video_code = str_replace($val, 'height="166"',$video_code); } } $matches = array(); preg_match_all('!width=["|\'](.*?)["|\']!is', $video_code, $matches); if(isset($matches[0])){ foreach($matches[0] as $key=>$val){ $video_code = str_replace($val, 'width="269"',$video_code); } } echo $video_code; ?> </div> <? }else if($img_url != '') { ?> <img src="<?php //echo get_option('home'); ?><?php echo $img_url;?>" width="269" height="166" alt="pic" /> <? } else { ?> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/pic.gif" width="269" height="166" alt="pic" /> <? } ?> <h2> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <?php $chn = get_option('revchurch_chn'); ?> <p> <?php the_content_rss('', FALSE, '',$chn,2) ?><a href="<?php the_permalink() ?>"> Read More</a></p> </div> <? $i++; if($i==3) { $i=1; } endwhile; else: endif; //Reset Query wp_reset_query(); ?> <?php $lower = get_option('revchurch_lower'); echo stripslashes($lower); ?> </div> <!--MIDDLE BODY END --> <!--RIGHT BODY START --> <?php include (TEMPLATEPATH . '/rightbar.php'); ?> <!--RIGHT BODY END --> </div> <!--BODY PANEL END --> </div> <!--MAIN CONTANER END --> <!--FOOTER PANEL START --> <?php get_footer(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/248270-wordpress-themes-modifying-indexphp/ Share on other sites More sharing options...
kansasakki Posted October 2, 2011 Author Share Posted October 2, 2011 DNS changed according to the owner, waiting for it to resolve to the DNS servers I guess. I will stand down for now. Nelson Quote Link to comment https://forums.phpfreaks.com/topic/248270-wordpress-themes-modifying-indexphp/#findComment-1274977 Share on other sites More sharing options...
QuickOldCar Posted October 5, 2011 Share Posted October 5, 2011 The index file is located within the selected themes folder. wp-content/themes/your_theme_name Whatever change made to your index file....changes can also be made to single.php,search.php,archive.php and page.php. Quote Link to comment https://forums.phpfreaks.com/topic/248270-wordpress-themes-modifying-indexphp/#findComment-1275859 Share on other sites More sharing options...
kansasakki Posted October 5, 2011 Author Share Posted October 5, 2011 The index file is located within the selected themes folder. wp-content/themes/your_theme_name Whatever change made to your index file....changes can also be made to single.php,search.php,archive.php and page.php. Thank you QOC, that is what I was thinking and trying to express, but I guess I did not make it clear. I am still having troubles getting my changes to work. kind of a big friggen mess I got into, and now I am looking like a donkey not being able to get this to work. I can make it work locally, but when I move it out to the real website, no dice. I am not sure what to do with it anymore. Jeremy Quote Link to comment https://forums.phpfreaks.com/topic/248270-wordpress-themes-modifying-indexphp/#findComment-1275870 Share on other sites More sharing options...
QuickOldCar Posted October 5, 2011 Share Posted October 5, 2011 If you can make it work locally then you must have at least did something correctly. Did you try to clear the browser cache or any server cache? You may be seeing old content and not the new. Quote Link to comment https://forums.phpfreaks.com/topic/248270-wordpress-themes-modifying-indexphp/#findComment-1275894 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.