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 » Center area post/pages »

How to I add a link To the end of every post??


  #1  
Old Feb 25, 2010, 11:36 AM
baronsamedi
 
13 posts · Feb 2010
Looking for a way to add a like to the end of every single post? Cant file a file like single.php...
  #2  
Old Feb 25, 2010, 12:27 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
why not put it in the post footer ATO->Edit POST/PAGE INFO ITEMS->FOOTER:xxxxx
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Feb 25, 2010, 12:41 PM
baronsamedi
 
13 posts · Feb 2010
im lookin to put it at the end of the body... adsense code and a link
  #4  
Old Feb 25, 2010, 12:52 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you could add code in 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 Feb 25, 2010, 01:07 PM
baronsamedi
 
13 posts · Feb 2010
k i noticed that but i cant get it to not show on the main page...

Code:
<?php
add_filter('the_content', 'my_extra_content', 1);
function my_extra_content($text) {
	return $text . "\n<p><a href=\"http://www.******.com/how-to-download/\">HOW TO DOWNLOAD</a> </p>\n
<p>[ad#Adsense468x15link4]</p>\n";
}
?>
I added that code and it appears on the main page i only want it on single pages,,
  #6  
Old Feb 25, 2010, 01:25 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
so use an 'if is_single() { your code here }

http://codex.wordpress.org/Conditional_Tags
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Feb 25, 2010, 01:50 PM
baronsamedi
 
13 posts · Feb 2010
k works for my link but seems not to want to work for my adsense code... any ideas??

Code:
<?php if (is_single())
add_filter('the_content', 'my_extra_content', 1);
function my_extra_content($text) {
	return $text . "\n<p><a href=\"http://www.****.com/how-to-download/\">HOW TO DOWNLOAD</a> </p>\n";}?>
This is the working link code... need to know how to add adsense
  #8  
Old Feb 25, 2010, 02:00 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
ohhh, your using a shortcode and this is just being added directly to the HTML that is being generated, the short code is not being expanded.

I think your going to have to put the shortcode in a post, look at the result and tehn copy the html and add that in in place of your shortcode in 'The LOOP'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Feb 25, 2010, 02:43 PM
baronsamedi
 
13 posts · Feb 2010
im confused what should i be using???

Last edited by baronsamedi; Feb 25, 2010 at 03:50 PM.
  #10  
Old Feb 26, 2010, 04:57 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
It looks like you are using a shortcode in this code you are adding into 'The LOOP' - the short code won't be dealt with if it is there. This section is part of the 'processing' logic, it DOES the proce3ssing on teh information, it's not the INFORMATION (I know this is general terms, but I can't think of a better way to explain it)

It would be like putting a shortcode in a widget's php and expecting that code to be expanded. Won't happen.

[shortcode] = 'some chunk of code'

in your code
HTML Code:
<?php
add_filter('the_content', 'my_extra_content', 1);
function my_extra_content($text) {
	return $text . "\n<p><a href=\"http://www.******.com/how-to-download/\">HOW TO DOWNLOAD</a> </p>\n
<p>[ad#Adsense468x15link4]</p>\n";
}
?>
you need to replace the shortcode '[ad#Adsense468x15link4]' with the code it generates if you want it in 'The LOOP'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #11  
Old Feb 26, 2010, 07:06 AM
baronsamedi
 
13 posts · Feb 2010
k so i put this code in and nothing came out.



Code:
<?php if (is_single())
add_filter('the_content', 'my_extra_content', 1);
function my_extra_content($text) {
	return $text . "\n<p><a href=\"http://www.promo******.com/how-to-download/\">HOW TO DOWNLOAD</a> </p>\n
<p><script type="text/javascript"><!--
google_ad_client = "**********";
/* 468x15, created 6/30/09 Promo*****Postbottom */
google_ad_slot = "********";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>\n";
}
?>
  #12  
Old Feb 26, 2010, 07:44 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what is the url?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #13  
Old Feb 26, 2010, 09:18 AM
baronsamedi
 
13 posts · Feb 2010
promotorrents.com
  #14  
Old Feb 26, 2010, 09:22 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Why not just put a new widget area where you want it, and then use a text widget or a specialized Adsense plugin widget?
  #15  
Old Feb 26, 2010, 09:59 AM
baronsamedi
 
13 posts · Feb 2010
im new to template editing.. so ur saying put the codes in a widget then put the widget at the end of the post??
  #16  
Old Feb 26, 2010, 10:18 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Atahualpa lets you create new widget areas. Look at the theme options and read the directions. You can do this without editing any theme files, just through the new widget creation option.

You could of course also create a new template with your added code, but that seem like the messier way to do it.
  #17  
Old Feb 27, 2010, 04:37 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
If I read this right baronsamedi wants the AD to be put at the end of each post's body, before the post footer. (baronsamedi: is that correct?)

Can you copy and paste here teh entire contents of 'The LOOP'
__________________
"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; Feb 27, 2010 at 04:41 AM.
  #18  
Old Feb 28, 2010, 04:11 PM
baronsamedi
 
13 posts · Feb 2010
Code:
<?php /* For SINGLE post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_post_links('Top'); ?>

<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' 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 -->
  #19  
Old Feb 28, 2010, 04:55 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
I don't see your code in the LOOP - did you remove it?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #20  
Old Sep 12, 2010, 03:29 PM
docfox's Avatar
docfox
 
24 posts · Dec 2009
I've been working on this for days, trying to insert a contact form at the end of each post. I had it working with cform II, but there are other issues with it.

I'm using Fast Secure Contact Form, that uses a 'shortcode' on the page or posts and it works great. But I want to put it into 'The Loop' so I don't have to edit 500 posts individually.

I've followed this thread and have the following:

<? php if (is_single() ) { html of shortcode }; ?>

I tried getting the html of the shorcode using Firefox, but I was getting errors.

Any help would be appreciated,

Thanks, Doc
  #21  
Old Sep 12, 2010, 06:27 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
your php is in error, it should be
HTML Code:
<?php if (is_single() ) { html of shortcode }; ?>
no space between the <? and the php
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #22  
Old Sep 12, 2010, 08:32 PM
docfox's Avatar
docfox
 
24 posts · Dec 2009
Here is the shortcode: [si-contact-form form='1']

Here is the error I keep getting:

Parse error: syntax error, unexpected '<' in /home/ffstock/public_html/discontinuedkohler.com/wp-content/themes/atahualpa353/functions.php(532) : eval()'d code on line 21

Here is the link to the site: http://www.discontinuedkohler.com

Here is the HTML and php:

<?php if (is_single() ) {

<p>Got Questions - Contact Us!</p>
<!-- Fast Secure Contact Form plugin - begin - http://www.FastSecureContactForm.com -->
<a name="FSContact1" id="FSContact1"></a>
<div style="width: 375px;">

<form action="http://discontinuedkohler.com/contact-us/#FSContact1" id="si_contact_form1" method="post">
<div style="text-align: left;"><span class="required">*</span>(denotes required field)</div>
<div><input name="si_contact_CID" value="1" type="hidden"></div>

<div style="text-align: left; padding-top: 5px;">
<label for="si_contact_name1">Name: <span class="required">*</span></label>
</div>
<div style="text-align: left;">
<input style="text-align: left; margin: 0pt;" id="si_contact_name1" name="si_contact_name" value="" size="40" type="text">
</div>
<div style="text-align: left; padding-top: 5px;">
<label for="si_contact_email1">E-Mail Address: <span class="required">*</span></label>
</div>
<div style="text-align: left;">
<input style="text-align: left; margin: 0pt;" id="si_contact_email1" name="si_contact_email" value="" size="40" type="text">
</div>
<div style="text-align: left; padding-top: 5px;">
<label for="si_contact_subject1">Subject: <span class="required">*</span></label>
</div>
<div style="text-align: left;">
<input style="text-align: left; margin: 0pt;" id="si_contact_subject1" name="si_contact_subject" value="" size="40" type="text">
</div>
<div style="text-align: left; padding-top: 5px;">
<label for="si_contact_message1">Message: <span class="required">*</span></label>
</div>
<div style="text-align: left;">
<textarea style="text-align: left; margin: 0pt;" id="si_contact_message1" name="si_contact_message" cols="30" rows="10"></textarea>
</div>

<div style="text-align: left; padding-top: 5px;">
<label for="si_contact_captcha_code1">CAPTCHA Code: <span class="required">*</span></label>
</div>
<div style="text-align: left;">
<input style="text-align: left; margin: 0pt;" value="" id="si_contact_captcha_code1" name="si_contact_captcha_code" size="6" type="text">
</div>

<div style="text-align: left; padding-top: 5px;">
<div style="width: 250px; height: 65px; padding-top: 5px;">
<img class="ctf-captcha" id="si_image_ctf1" style="border-style: none; margin: 0pt; padding: 0px 5px 0px 0px; float: left;" src="http://discontinuedkohler.com/wp-content/plugins/si-contact-form/captcha-secureimage/securimage_show.php?ctf_form_num=1&amp;prefix=NHTB gsQxFhONhmG8" alt="CAPTCHA Image" title="CAPTCHA Image">
<input id="si_code_ctf_1" name="si_code_ctf_1" value="NHTBgsQxFhONhmG8" type="hidden">
<div id="si_audio_ctf1">
<a id="si_aud_ctf1" href="http://discontinuedkohler.com/wp-content/plugins/si-contact-form/captcha-secureimage/securimage_play.php?ctf_form_num=1&amp;prefix=NHTB gsQxFhONhmG8" rel="nofollow" title="CAPTCHA Audio">
<img src="http://discontinuedkohler.com/wp-content/plugins/si-contact-form/captcha-secureimage/images/audio_icon.png" alt="CAPTCHA Audio" style="border-style: none; margin: 0pt; padding: 0px; vertical-align: top;" onclick="this.blur();"></a>
</div>
<div id="si_refresh_ctf1">
<a href="#" rel="nofollow" title="Refresh Image" onclick="si_contact_captcha_refresh('1','wav','/wp-content/plugins/si-contact-form/captcha-secureimage','http://discontinuedkohler.com/wp-content/plugins/si-contact-form/captcha-secureimage/securimage_show.php?ctf_form_num=1&amp;prefix='); return false;">
<img src="http://discontinuedkohler.com/wp-content/plugins/si-contact-form/captcha-secureimage/images/refresh.png" alt="Refresh Image" style="border-style: none; margin: 0pt; padding: 0px; vertical-align: bottom;" onclick="this.blur();"></a>
</div>
</div>
</div>


<div style="text-align: left; padding-top: 5px;">
<input name="si_contact_action" value="send" type="hidden">
<input name="si_contact_form_id" value="1" type="hidden">
<input style="cursor: pointer; margin: 0pt;" value="Submit" type="submit">
</div>

</form>
</div>

<p style="font-size: x-small; font-weight: normal; padding-top: 5px;">Powered by <a href="http://wordpress.org/extend/plugins/si-contact-form/">Fast Secure Contact Form</a></p>
<!-- Fast Secure Contact Form plugin - end - http://www.FastSecureContactForm.com -->


}; ?>



Thanks for checking this,

Doc

Last edited by docfox; Sep 13, 2010 at 06:17 AM.
  #23  
Old Sep 13, 2010, 06:50 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you are mixing your php and html and confusing things. you need to change the first line to
HTML Code:
<?php if (is_single() ) { ?>
to switch from PHP to HTML, then change the last line to
HTML Code:
<?php }; ?>
to switch back to PHP from the HTML
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #24  
Old Sep 13, 2010, 07:11 AM
docfox's Avatar
docfox
 
24 posts · Dec 2009
Works perfectly. Thank you again for your help.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a link to %meta%? michelleflores Forum How-To 1 Sep 17, 2009 04:23 PM
[SOLVED] Looking to add sign-in link in the header mcgiver058 Header configuration & styling 6 Aug 20, 2009 08:11 PM
Getting rid of tags at end of posts? faigekobre Post-Kicker, -Byline & -Footer 6 Jul 9, 2009 03:10 PM
Pictures get cut off at end of text MustacheGlory Atahualpa 3 Wordpress theme 0 Mar 24, 2009 09:37 AM
Post / Page Info Items - Button crashes comp, how do I add to post-footer? Image help everygirlssecret Post-Kicker, -Byline & -Footer 1 Jan 5, 2009 01:12 PM


All times are GMT -6. The time now is 07:29 AM.


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