24858

Wordpress .htaccess/template files

Question:

I have a Wordpress site that I assumed from another company which structurally is a bit different than other ones I've worked on. I'm primarily a Drupal developer, with enough of a working knowledge of Wordpress to get by.

What the developer who created the site did, is within the themes folder, they created a separate page-whatever-whatever.php file for each page on the site. Some of the content on the pages within the site have been entered through the CMS system - some are hard coded on to the template file.

Previously, it was hosted on a .NET server - we're on LAMP.

It appears that the pages with the hard coded data aren't being called - so the data the client previously saw is just coming up blank. The site appears to be ignoring those page-whatever-whatever.php files and using the default template page instead.

My first guess is that it's an htaccess issue? I just have the generic

<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>

Given the structure they have - is there something else I should be putting in there or changing within the config files?

Thanks in advance!

Answer1:

I guess no issue with .htaccess file. The error was in template file. Enable debug in wp-config.php.

By wp_debug was false.

define('WP_DEBUG', false);

<strong>Change this to</strong>

define('WP_DEBUG', true);

Now you can see php error in the template file then debug it.

Recommend

  • PHP cannot read javascript cookies
  • youtube video insert “onBehalfOfContentOwner” parameter value
  • Saving from a view model to a model in ASP.NET MVC
  • WCF Service Application returns 404 using WebGet
  • Determining if a string has been entered with a leading single quote
  • Type mismatch: cannot convert from Connection to Connection
  • Drag and Drop for imageview not working
  • a concept similar to pointers in as3?
  • LibGdx GLES2.0 cube texel stretching
  • WooCommerce hook after order is updated?
  • Return to second to last URL in MVC (return View with previous filter conditions applied)?
  • custom string delimiters stringtemplate-4
  • WordPress > setting permalink option via script buggy?
  • How to apply a custom handlers to only specific folder
  • How to access meteor package name inside package?
  • How to get latest version of a artifact on Bintray using JSONP
  • Tell Git to stop prompting me for conflicts when none really exist?
  • Do I need to seed any random number generator before using EVP_PKEY_keygen of OpenSSL?
  • JqueryMobile Popup menu is not working
  • Django invalid literal for int() with base 10
  • Unable to decode certificate at client new X509Certificate2()
  • xtable package: Skipping some rows in the output
  • C++ Partial template specialization - design simplification
  • Repeat a vertical line on every page in Report Builder / SSRS
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • How can I use Kendo UI with Razor?
  • Timeout for blocking function call, i.e., how to stop waiting for user input after X seconds?
  • Why winpcap requires both .lib and .dll to run?
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • Proper folder structure for lots of source files
  • Load html files in TinyMce
  • Error creating VM instance in Google Compute Engine
  • Free memory of cv::Mat loaded using FileStorage API
  • How to set the response of a form post action to a iframe source?
  • How does Linux kernel interrupt the application?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • unknown Exception android
  • Observable and ngFor in Angular 2