Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialGreg Schudel
4,090 PointsWordPress can't save
I cannot save anything in my wordpress dashboard without my dashboard vanishing and everything turning into a white blank screen. I am running my WordPress on a MAMP server locally. I can save the file, the screen goes blank and when I click the browser back button it saved the work fine. Weird!
Here are my files
Here is my header
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title(); ?></title>
<?php wp_head(); ?>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header"> <!-- contains toggle and brand -->
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="<?php bloginfo('url'); ?>" class="navbar-brand"><?php bloginfo('name'); ?></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="<?php bloginfo('name'); ?>">Home</a></li>
<li><a href="/0/?url=dHVvYmEzMiUvZW1laHQvc2VscG1heGUvbW9jLnBhcnRzdG9vYnRlZy8vQTMlcHR0aA==">About</a></li>
<li><a href="/0/?url=dGNhdG5vYzMyJS9lbWVodC9zZWxwbWF4ZS9tb2MucGFydHN0b29idGVnLy9BMyVwdHRo">Contact</a></li>
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="/0/?url=L2VtZWh0L3NlbHBtYXhlL21vYy5wYXJ0c3Rvb2J0ZWcvL0EzJXB0dGg=">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/0/?url=L2VtZWh0L3NlbHBtYXhlL21vYy5wYXJ0c3Rvb2J0ZWcvL0EzJXB0dGg=">Action</a></li>
<li><a href="/0/?url=L2VtZWh0L3NlbHBtYXhlL21vYy5wYXJ0c3Rvb2J0ZWcvL0EzJXB0dGg=">Another action</a></li>
<li><a href="/0/?url=L2VtZWh0L3NlbHBtYXhlL21vYy5wYXJ0c3Rvb2J0ZWcvL0EzJXB0dGg=">Something else here</a></li>
<li class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li><a href="/0/?url=L2VtZWh0L3NlbHBtYXhlL21vYy5wYXJ0c3Rvb2J0ZWcvL0EzJXB0dGg=">Separated link</a></li>
<li><a href="/0/?url=L2VtZWh0L3NlbHBtYXhlL21vYy5wYXJ0c3Rvb2J0ZWcvL0EzJXB0dGg=">One more separated link</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
index.php
<?php
/*
Template Name: Main Page Template
*/
?>
<?php get_header(); ?>
<div class="container gallery-container">
<h1 class="headerTitle" > <?php wp_title(); ?> </h1>
<p class="page-description text-center"><?php the_content(); ?></p>
<div class="tz-gallery">
<div class="row">
<!-- INSERT WIDGET CODE HERE -->
</div>
</div>
</div>
<?php get_footer(); ?>
footer.php
<?php wp_footer(); ?>
</body>
</html>
page.php ``HTML
<?php /*
Template Name: Portfolio layout
*/ ?>
<?php get_header(); ?>
<div class="container gallery-container">
<h1 class="headerTitle" ><?php wp_title(); ?></h1>
<p class="page-description text-center">Thumbnails With Title And Description</p>
<div class="tz-gallery">
<div class="row">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<a class="lightbox" href="<?php get_permalink( $_post->ID ) ?>">
<img src="<?php get_the_post_thumbnail(); ?>" alt="Park">
</a>
<div class="caption">
<h3><?php the_title(); ?></h3>
<p><?php the_content(); ?></p>
</div>
</div>
</div>
<?php endwhile; else : ?>
<p><?php esc_html_e( 'Sorry, no portfolio images are loaded on this site!' ); ?></p>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer(); ?>
Is the problem in my settings in my dashboard or my coded files?
1 Answer
Greg Schudel
4,090 PointsFigured it out...stupid simple!!
Need to remove ?>
from the bottom of my functions file :/
It really is the small things in life that matter the most!