Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

Need Help Adding PHP in 3.7.3 In Posts


  #1  
Old Dec 4, 2012, 04:57 PM
genuwine4532
 
37 posts · Sep 2010
Need Help Adding PHP in 3.7.3 In Posts

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
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
index.php controls the loop.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
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
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
HTML Code:
		<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
is what handles the footer for posts and pages.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
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
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

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 05:05 AM.


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