Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » New Versions, & Updating »

[SOLVED] Upgrading ATA 3.3.2 to 3.4.2 only half successful


  #1  
Old Sep 11, 2009, 09:48 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
I'm able to successfully upgrade my personal test site from Atahualpa 3.3.2 to the latest 3.4.2. --

Note: I did it the old-fashioned way, FTP uploading the new directory "atahualpa342" into "/wp/wp-content/themes/". In the WordPress Dashboard I'm able to choose/switch -- activating either version of Atahualpa.

http://www.shepherdjim.com/

Unfortunately, I have custom code inserted into the theme's "index.php" file which creates the "Hatchtown Update" box on the landing page. The code that was created awhile back under Flynn's direction takes the latest blog post in the "Announcements" and puts it in the box on the front page.

When I insert the code block into index.php the site crashes -- the browser screen shows:

Parse error: syntax error, unexpected $end in /home/content/m/i/n/mineolajim/html/wp/wp-content/themes/atahualpa342/index.php on line 114


I've looked at the new and old index.php's and there's quite a difference.

Help!

Last edited by Shepherd Jim; Sep 12, 2009 at 09:02 AM. Reason: completely re-vamped
  #2  
Old Sep 14, 2009, 08:46 AM
juggledad's Avatar
juggledad
 
23,632 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
strange, there is no line 114 in index.php and I've been using both swapping bacling forth for awhile now. I'll send you a PM about looking at it
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Sep 14, 2009, 09:31 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
HeyJDad!

It's the index.php that's contained in the Atahualpa root directory "shepherdjim.com/wp/wp-content/themes/atahualpa332/index.php"

In Ata 332 -- currently running at http://www.shepherdjim.com/

index.php has 347 lines

In Ata 342

the new index.php has 40 lines (obviously been some big changes in what index.php is doing!!)

The full index.php in Ata 332 running on the site has 425 lines because, as I said, I've inserted "custom code" -- the block is in place immediately following:

<?php get_header(); ?>

When I insert the same block of code in the new (Ata 342) index.php the site breaks.

Here's the block of "custom code":

<!-- EC3 start = post my announcements category +++++++++++++++++++++++++++++++++ -->
<?php if ( is_front_page() ) { ?>
<div class="ec3ctr">
<div class="announce">
<h3 style="text-align: center; color: #797C00;">Hatchtown Update</h3>
<?php $my_query = new WP_Query('category_name=announcements&showposts=1' );
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<!-- ++++ -->
<!-- Post Headline -->
<div class="post-headline">
<h2><?php
if( !is_single() AND !is_page() ) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php
if (function_exists('the_title_attribute')) {
the_title_attribute();
}
elseif (function_exists('the_title')) {
the_title();
} ?>"><?php
} the_title();
if( !is_single() AND !is_page() ) { ?>
</a><?php
} ?>
</h2>
</div>


<!-- ++++ -->

<?php // Post Byline
if( (is_home() && $bfa_ata_post_byline_home != "") OR
(is_page() && $bfa_ata_post_byline_page != "") OR
(is_single() && $bfa_ata_post_byline_single != "") OR
( (is_archive() OR is_search() OR is_author() OR is_tag()) && $bfa_ata_post_byline_multi != "") ) {
echo '<div class="post-byline">';
if ( is_home() ) { echo postinfo("$bfa_ata_post_byline_home"); }
elseif ( is_page() ) { echo postinfo("$bfa_ata_post_byline_page"); }
elseif ( is_single() ) { echo postinfo("$bfa_ata_post_byline_single"); }
else { echo postinfo("$bfa_ata_post_byline_multi"); }
echo '</div>';
} ?>

<!-- Post Body Copy -->
<div class="post-bodycopy clearfix">
<?php if ((is_home() && $bfa_ata_excerpts_home == "Full Posts") OR
(is_category() && $bfa_ata_excerpts_category == "Full Posts") OR
(is_date() && $bfa_ata_excerpts_archive == "Full Posts") OR
(is_tag() && $bfa_ata_excerpts_tag == "Full Posts") OR
(is_search() && $bfa_ata_excerpts_search == "Full Posts") OR
(is_author() && $bfa_ata_excerpts_author == "Full Posts") OR
is_single() OR
is_page() OR (is_home() AND !is_paged() AND $postcount <= $bfa_ata_full_posts_homepage) ) {
$bfa_ata_more_tag_final = str_replace("%post-title%", the_title('', '', false), $bfa_ata_more_tag);
the_content(bfa_escape($bfa_ata_more_tag_final));
} else {
the_excerpt();
} ?>
</div>

<?php // Post Footer
if( (is_home() && $bfa_ata_post_footer_home != "") OR
(is_page() && $bfa_ata_post_footer_page != "") OR
(is_single() && $bfa_ata_post_footer_single != "") OR
( (is_archive() OR is_search() OR is_author() OR is_tag()) && $bfa_ata_post_footer_multi != "") ) {
echo '<div class="post-footer">';
if ( is_home() ) { echo postinfo("$bfa_ata_post_footer_home"); }
elseif ( is_page() ) { echo postinfo("$bfa_ata_post_footer_page"); }
elseif ( is_single() ) { echo postinfo("$bfa_ata_post_footer_single"); }
else { echo postinfo("$bfa_ata_post_footer_multi"); }
echo '</div>';
} ?>

<!-- EC3 end of my announce div +++++++++++++++++++++++++++++++++++ -->

I'm guessing, if my block of code will still work, it'll have to be "inserted" somewhere new.

Jim

Last edited by Shepherd Jim; Sep 14, 2009 at 09:34 AM. Reason: spelling correction
  #4  
Old Sep 14, 2009, 10:52 AM
juggledad's Avatar
juggledad
 
23,632 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
This code looks like it could go in 'The LOOP' - see ATO->Style & edit CENTER COLUMN->The LOOP
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Sep 14, 2009, 02:58 PM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
Wow! There are some big changes in the ATO "control suite" !!

Sorry, but I'll need more hints. I took the old block of code that Flynn had long ago cooked for me and inserted it in various places in both the "loop" and "before the loop" windows at ATO->Style & edit CENTER COLUMN->The LOOP with no joy. I would always get the front_page but my "Hatchtown Update" would NOT appear -- AND I'd get some variation of the error notice:
"Parse error: syntax error, unexpected $end in /home/content/m/i/n/mineolajim/html/wp/wp-content/themes/atahualpa342/functions.php(396) : eval()'d code on line 82"
I'm wondering if there might not nowadays be some other way to skin this cat.

If you look at http://www.shepherdjim.com/, all that's happening is that the latest post in the category "Announcements" is appearing in the box at the top of the center column of the home/landing static page.

Jim
  #6  
Old Sep 15, 2009, 03:03 PM
juggledad's Avatar
juggledad
 
23,632 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
let me see if I understand

1) your landing page is not the blog, just a page
2) you have a category called 'Announcements' (and other categories)
3) the latest post in the a'announcements is sisplayed in a box on the landing page

Have I got that right?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Sep 15, 2009, 05:36 PM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
Quote:
Originally Posted by juggledad
let me see if I understand

1) your landing page is not the blog, just a page
2) you have a category called 'Announcements' (and other categories)
3) the latest post in the Announcements is displayed in a box on the landing page

Have I got that right?
That's it in the proverbial nutshell!

It's a neat way to have the classic static "home page" but with a easily and quickly updatable "notice area". The plan is to move this over to the main, business site where my wife Pam will be able to post updates to the home page without "disturbing" the rest of the page.

Jim
  #8  
Old Sep 15, 2009, 07:29 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Try adding the following at the bottom of Atahualpa Theme Options -> Style & Edit CENTER COLUMN -> Content ABOVE the LOOP:


PHP Code:
<?php if ( is_front_page() ) { ?>
    <div class="ec3ctr">
        <div class="announce">
            <h3 style="text-align: center; color: #797C00;">Hatchtown Update</h3>
            <?php $my_query = new WP_Query('category_name=announcements&showposts=1' );
            while (
$my_query->have_posts()) : $my_query->the_post(); ?>
                <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
                    <?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
                    <?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
                    <?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
                    <?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
                </div>
            <?php endwhile; ?>
        </div>
    </div>
<?php ?>
Looks like you're not using a Byline or Footer anyway so you could leave out these lines:

<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>

and

<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
  #9  
Old Sep 16, 2009, 07:29 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
Flynn and Juggledad! BIG thanks to you both. I have, of course, just pressed both your PayPal buttons.

Flynn, that new code snippet worked wonderfully. I inserted it in the "Content ABOVE the LOOP" window following the three lines of default code:

<?php /* For MULTI post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_page_links('Top'); ?>

<?php /* For SINGLE post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_post_links('Top'); ?>

<?php /* For the plugin Page2Cat http://wordpress.org/extend/plugins/page2cat/ */
if( is_category() AND function_exists('page2cat_output')) { page2cat_output($cat); } ?>


...you didn't specifically mention whether the new stuff should precede, follow or replace.

QUESTION: Am I right in thinking that adding this custom code in the ATO means that this will be "backed up" in the WP database? When I install the next Atahualpa update I will not have to re-insert this "hack."??

AWESOME! Thanks again!

Another Happy Customer: Jim
  #10  
Old Sep 16, 2009, 07:42 AM
juggledad's Avatar
juggledad
 
23,632 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Yep it's now in the db
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #11  
Old Sep 16, 2009, 08:43 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
Quote:
Originally Posted by juggledad
Yep it's now in the db
Fantastic! One click to update WordPress. One click to update Atahualpa. I better watch out, with so little to worry about my brain will atrophy.

Thanks again! I'm off to feed the sheep and pigs with a clear mind!

Jim
  #12  
Old Sep 16, 2009, 10:53 AM
juggledad's Avatar
juggledad
 
23,632 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
created a HOW TO thread (http://forum.bytesforall.com/showthr...4758#post14758) describing how to do this!
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Sep 16, 2009 at 11:29 AM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
half of blog vanished after upgrade install Monkey_Fist New Versions, & Updating 6 Jan 15, 2014 05:53 PM
Upgrading from WP 2.4 to 2.8, and ATA? paulae New Versions, & Updating 2 Jun 17, 2009 07:04 PM
Body copy starting half way down the page - why?! tobywinn Atahualpa 3 Wordpress theme 2 Jun 8, 2009 02:42 PM
[SOLVED] RB Internal links not working with ATA 3.3.3 paulae Plugins & Atahualpa 2 Jun 6, 2009 01:49 PM
New to WP...Got Ata 3.3..?'s on Ata vs Montezuma and TOP THINGS TO CUSTOMIZE - FIX? Brasshatgroup New Versions, & Updating 5 Jun 1, 2009 06:22 AM


All times are GMT -6. The time now is 01:43 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.