I am trying to call a php file into each post, which file do I edit to make the call? EDIT: I should have been more specific. I don't want to add the call to the loop as the php file that I am trying to call changes and I want the result will be different on each post page. Does that make sense?
If I understand you, you want to add something to the bottom of the post? If so... Edit the page, "Single Post", it should be something like this: <?php get_header(); ?> <div class="entry"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div id="post-<?php the_ID(); ?>"> <h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="end"><?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?> ADD STUFF HERE </div> </div> <div class="navigation"> <div class="alignleft"><?php previous_post_link('« %link') ?></div> </div> <br /> <?php comments_template(); ?> <div class="navigation"> <div class="alignright"><?php next_post_link('%link »') ?></div> </div> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> </div> <?php get_footer(); ?>
Yes BUT the problem with that is it will put the same text on EVERY page that is posted. I want older posts to have older adverts on them. As these ads are permanent I don't want them updated so when I update the master .php file with new ads I only want them posted that day's post. Does that make sense? If not please tell me and I will explain it a different way
Ok here goes.. What I want to do.. Add some private adverts & affiliate links to my posts. How I want it done.. Automatically, once posted it will call a .php file & post the contents of that .php file. Example: I go into my wordpress and write up the following post: "It's a nice day today." When I view the post I see this: "It's a nice day today." "Eat at Joe's". "Fast Food For Freaks". What happened?: (I'm not a coder but here is my theory) When I pressed the "publish" button (somewhere in the wordpress code) this was called <?php include("myads.php"); ?> a php file called "myads.php" and displayed the contents of that file. Why not just add this to one of my template files, like index.php?: Because every time a person viewing my post "It's a nice day today." will see the latest version of myads.php rather than the historical version. In other words old ads will not show as they will be updated with the next day of ads because "myads.php" is a file that is updated every day or so. Is that easier to understand?