Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Need Help Adding PHP in 3.7.3 In Posts


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Dec 4, 2012, 04:57 PM
genuwine4532
 
37 posts · Sep 2010
I know PHP is no longer supported in settings for Ata 3.7.3

But I want to add a php shortcode for the plugin Similar Posts below posts in the footer, how can this be done in the backend files?

There is no single.php, so where do I do it?

Thanks
  #2  
Old Dec 4, 2012, 05:17 PM
juggledad's Avatar
juggledad
 
21,713 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
index.php controls the loop.
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #3  
Old Dec 4, 2012, 05:39 PM
genuwine4532
 
37 posts · Sep 2010
oh, I did not realize that controls individual posts as well? On other themes it's usually just home page only, no?

Where exactly is the INDIVIDUAL POSTS - AFTER POSTS (footer) section in this code

Code:
<?php 
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header(); 
extract($bfa_ata); 
?>


<?php /* If there are any posts: */
if (have_posts()) : $bfa_ata['postcount'] = 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?>

	<?php // Deactivated since 3.6.5
	# include 'bfa://content_above_loop'; 
	// Uses the following static code instead: ?>

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

	<?php while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>
	
		<?php // Deactivated since 3.6.5
		#include 'bfa://content_inside_loop'; 
		// Uses the following static code instead: ?>
		<?php bfa_next_previous_post_links('Top'); // For SINGLE post pages if activated at ATO -> Next/Previous Navigation  ?>
		<?php /* Post Container starts here */
		if ( function_exists('post_class') ) { ?>
		<div <?php if ( is_page() ) { post_class('post'); } else { post_class(); } ?> id="post-<?php the_ID(); ?>">
		<?php } else { ?>
		<div class="<?php echo ( is_page() ? 'page ' : '' ) . 'post" id="post-'; the_ID(); ?>">
		<?php } ?>
		<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
		<?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_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>
		<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
		</div><!-- / Post -->




						
	<?php endwhile; ?>

	<?php // Deactivated since 3.6.5
	# include 'bfa://content_below_loop'; 
	// Uses the following static code instead: ?>
	<?php bfa_next_previous_post_links('Middle'); // Displayed on SINGLE post pages if activated at ATO -> Next/Previous Navigation: ?>
	<?php bfa_get_comments(); // Load Comments template (on single post pages, and static pages, if set on options page): ?>
	<?php bfa_next_previous_post_links('Bottom'); // Displayed on SINGLE post pages if activated at ATO -> Next/Previous Navigation: ?>
	<?php bfa_archives_page('<div class="archives-page">','</div>'); // Archives Pages. Displayed on a specific static page, if configured at ATO -> Archives Pages: ?>
	<?php bfa_next_previous_page_links('Bottom'); // Displayed on MULTI post pages if activated at ATO -> Next/Previous Navigation: ?>

<?php /* END of: If there are any posts */
else : /* If there are no posts: */ ?>

<?php // Deactivated since 3.6.5
#include 'bfa://content_not_found'; 
// Uses the following static code instead: ?>
<h2><?php _e('Not Found','atahualpa'); ?></h2>
<p><?php _e("Sorry, but you are looking for something that isn't here.","atahualpa"); ?></p>

<?php endif; /* END of: If there are no posts */ ?>

<?php get_footer(); ?>
  #4  
Old Dec 4, 2012, 05:44 PM
juggledad's Avatar
juggledad
 
21,713 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
HTML Code:
		<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
is what handles the footer for posts and pages.
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #5  
Old Dec 4, 2012, 06:06 PM
genuwine4532
 
37 posts · Sep 2010
Quote:
Originally Posted by juggledad
HTML Code:
		<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
is what handles the footer for posts and pages.
Thank you, but anything that is placed under that also shows in Multi Posts Pages - like Category and Home Page.

Can you please give the code to make it displays on INDIVIDUAL POSTS only?

AND

Individual Pages too?

Last edited by genuwine4532; Dec 4, 2012 at 06:09 PM.
  #6  
Old Dec 4, 2012, 06:40 PM
juggledad's Avatar
juggledad
 
21,713 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
wrap the code in a php if testing for a single page or a page page. You can find the tests in the wordpress codex.
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #7  
Old Dec 4, 2012, 06:58 PM
genuwine4532
 
37 posts · Sep 2010
Quote:
Originally Posted by juggledad
wrap the code in a php if testing for a single page or a page page. You can find the tests in the wordpress codex.
Okay,

Can you give me the link for that fix for Ata 3.6 not showing live in certain cases?

I read about it somewhere on the forum at one point, I tried search but nothing comes up. It was a bug fix of some sort, either 3.6 not showing up in new Wordpress versions, or PHP versions or certain hostings?

Last edited by genuwine4532; Dec 4, 2012 at 07:06 PM.
  #8  
Old Dec 4, 2012, 07:59 PM
genuwine4532
 
37 posts · Sep 2010
By the way, for anybody who wants the fix to this I was finally able to get it right:

To add PHP code or shortcodes into Footer of single posts:

Add this code into the index.php

Code:
 <?php if ( is_single() ) { ?>
<?php YOUR PHP CODE HERE ?>
<?php } ?>
right AFTER the code below in index.php (it's towards the bottom of the page)

Code:
<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
Use it for Similar Posts plugin shortcodes and anything else you want to place in PHP code in ATA versions 3.6+ that don't allow PHP anymore in Admin Configurations - Post Page Info Items or the Loop

Bookmarks

Tags
php in posts, similar posts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a border around posts emaalyon Center area post/pages 3 Apr 17, 2010 02:33 PM
[SOLVED] Adding Posts to Different Pages conquestlife Center area post/pages 1 Apr 13, 2010 07:05 PM
[SOLVED] Adding a picture over the posts and not the pages? GustavK Center area post/pages 4 Mar 3, 2010 06:06 AM
[SOLVED] Uploading &amp; adding video to posts timdevogel Post-Kicker, -Byline & -Footer 5 Jun 30, 2009 09:08 AM
Adding time to new posts thunder Atahualpa 3 Wordpress theme 1 Jun 22, 2009 12:32 AM


All times are GMT -6. The time now is 12:16 PM.


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