I've made this page and it loads normally while on local development but when I try to access it on the server I have an Error 500, can somebody help me ?
I have erased my .htaccess, looked in the log and I have nothing really interesting
<?php
/**
* Template Name: Actus
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
*/
get_header('other'); ?>
<section id ="page-title" class="col-md-12">
<div class="container">
<div class="container">
<header class="row extra-bottom-padding">
<div class="section_title col-lg-12 col-sm-12 col-sm-12 top-buffer">
<h1 class="title">Actus</h1>
<hr class="divider_blue">
</div>
</header>
<?
$args = array("posts_per_page" => "12", "category_name" => "actus, cest-fait");
$the_query = new WP_Query ($args);
$x = 1;
foreach ($args as $arg)
if($x % 4 == 0) echo '<div class="row">';
while ( $the_query->have_posts() ) : $the_query->the_post();
?>
<div class="col-md-4 col-lg-4 col-sm-6 col-xs-12">
<div class="le_post_entier">
<? the_post_thumbnail('actus'); ?>
<div class="col-md-12 postbody">
<div class="col-md-12 post-title">
<? the_title(); ?>
</div>
</div>
<a class="cta" href="#" style='color:#39c8d8; font-weight:bold;'>DÉCOUVRIR →</a>
</div>
</div>
<?php
endwhile; ?><?
$x++;
if($x % 4 == 0) echo '</div>';
?>
</div>
</section>
</div>
Try adding .htaccess file on server.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Please check module mod_rewrite.so
is enabled in your apache configuration.
Open httpd.conf generally located in Apache installation directory in windows
/apache/conf/httpd.conf
and
/etc/httpd/httpd.conf
Search for the module mod_rewrite.so
or (mod_rewrite.c in rare cases).
#LoadModule rewrite_module modules/mod_rewrite.*
Here # character represents that it is commented or disabled.
LoadModule rewrite_module modules/mod_rewrite.*
Remove # and restart the Apache Http Server
Also check your apache error logs for possible reason.
Ok.... I want to cry but the error was amazingly simple
I needed to add
php after of <?
Hope this will help someone