Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   Adding a Flattr link to the post footer / strange behaviour with links (http://forum.bytesforall.com/showthread.php?t=17959)

Fux Jul 11, 2012 05:26 AM

Adding a Flattr link to the post footer / strange behaviour with links
 
Hi,

this is in my "FOOTER: Single Post Pages"

Code:

%comments('Kommentieren', '1 Kommentar', '% Kommentare', 'Comments are closed')% | %share-this% | %date('j. F Y')% <a href="">.</a>
I put the last href there as a test. The output is fine except that the '.' with the href links to the post (probably the_permalink?)

I am having trouble adding a (compact) Flattr link to my post footers. I installed the official plugin and tried the shortcode first. None of these did work

Code:

[flattr url="<?php the_permalink(); ?>" type="compact"]
Result: Front-end displays
Code:

" type="compact"]
While this (static link)

Code:

[flattr url="http://www.mywebsite.com" type="compact"]
results in nothing, no button, nada.

So maybe shortcode does not work in the Atahualpa custom fields. Makes sense.

But this, the plugin's own PHP-code does not work either:

Code:

<?php the_flattr_permalink() ?>
Neither does this

<a href="<?php the_flattr_permalink() ?>">Link</a>

The main problem being here that the permalink gets added (why?) so the resulting link is somehting like this

http://www.mywebsite.com/postpermalink/<?php the_flattr_permalink() ?>

My guess is that the problem lies in the fact that all links in these Atahualpa lines somehow get the permalink added for whatever reason. Even this, the official code

Code:

<a href="<?php the_permalink(); ?>">permalink</a>
results in this

Code:

http://www.mywebsite.com/postpermalink/<?php the_permalink(); ?>
That does not make sense. To me.

What do you think?

lmilesw Jul 11, 2012 07:05 AM

Because of WordPress requirements you can't use php in that area with the exception of the php for a new widget area. So I would add the following where you want and add the Flattr widget to that widget area.
PHP Code:

<?php bfa_widget_area('name=Flattr'); ?>


Fux Jul 11, 2012 07:57 AM

Thanks, Larry. Is it possible to support shortcode for these fields in future Atahualpa versions? Or is this kind of shortcode just another way of php?

And can you explain the strange permalink-behaviour?

lmilesw Jul 11, 2012 10:46 AM

Allowing for a new widget areas takes care of that issue and I know no plans to add shortcode support to those fields. I have not idea about the permalink behavior and I am not really sure what you were referring to. Just didn't have the time to investigate. Do you get the same permalink behavior when you use a new widget area?

Fux Jul 12, 2012 03:10 AM

I understand. I will try to use a widget area here. Thank you.

Do widget areas "drag" performance in any way?

lmilesw Jul 12, 2012 08:11 PM

I haven't noticed and performance hits from adding a widget area.


All times are GMT -6. The time now is 12:41 AM.

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