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 » New Versions, & Updating »

[SOLVED] Workaround for PHP: <?php the_permalink() ?>


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 Oct 14, 2011, 01:58 AM
damian
 
22 posts · Feb 2010
Now that PHP is no longer allowed in Atahualpa theme options, I need a workaround. Can anyone suggest a substitute for the following?

<?php the_permalink() ?>

I have a bunch of social media buttons (Facebook, Twitter, Digg, etc.) that require permalinks for blog posts on multi-post pages.

Please note that I'm almost a total newbie when it comes to coding, so I need everything spelled out explicitly.

Thanks in advance for your help!
  #2  
Old Oct 14, 2011, 03:46 AM
juggledad's Avatar
juggledad
 
22,077 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
If you need the php in a post, page or widget, you can use the exec-php plugin which allows php in those areas. It is just themes that aren't allowed to use it.
__________________
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 Oct 14, 2011, 02:31 PM
damian
 
22 posts · Feb 2010
Quote:
If you need the php in a post, page or widget, you can use the exec-php plugin which allows php in those areas. It is just themes that aren't allowed to use it.
I should have been more clear: I'm talking about PHP in Atahualpa Theme Options->Posts & Pages->Edit POST/PAGE INFO ITEMS->BYLINE: Homepage (for example).

Can PHP be executed from that section, or not?

I just installed the Exec-PHP plugin you suggested, and it still doesn't seem to be executing PHP, when included in the section I just indicated.

It would be a major, major pain to have to manually insert a bunch of html and php in every single blog post, which is why I'm trying to use Atahualpa Theme Options->Posts & Pages->Edit POST/PAGE INFO ITEMS->BYLINE: Homepage.

Is there a way to get PHP to execute in this section, or is there a workaround so I can implement social networking buttons that refer to permalinks and titles for individual posts on multi-post pages? Here is all of the PHP I'm trying to execute:

<?php the_permalink() ?>

<?php echo get_permalink(); ?>

<?php the_title() ?>

<?php $link = get_permalink(); echo urlencode($link); ?>

<?php $title = get_the_title(); echo urlencode($title); ?>

<?php related_posts() ?>
  #4  
Old Oct 14, 2011, 02:53 PM
lmilesw's Avatar
lmilesw
 
10,076 posts · Jul 2009
Central New York State USA
You can add a new widget area in those spots and then us a php aware widget in it.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #5  
Old Oct 14, 2011, 02:55 PM
damian
 
22 posts · Feb 2010
Great! Thanks!

I've never created a new widget area or used a PHP aware widget before. Would you mind pointing me in the right direction?
  #6  
Old Oct 14, 2011, 08:42 PM
lmilesw's Avatar
lmilesw
 
10,076 posts · Jul 2009
Central New York State USA
The instructions for adding a new widget area are in the Add New Widget Areas section of the theme options. To find a php aware widget you can search wordpress.org. For example I searched for php widget and came up with this one. So the steps are.
  • Add a New Widget Area per the instructions in ATO>Add New Widget Areas
  • Go to Appearance>Widgets and drag the php widget into the newly created widget area
  • Put the PHP code in the widget
I would suggest playing with these steps in a test site to get familiar with the steps.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #7  
Old Oct 25, 2011, 02:15 PM
damian
 
22 posts · Feb 2010
Awesome! Thank you!

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bug with WP-Email Plugin Workaround? damian Plugins & Atahualpa 2 Apr 18, 2011 03:26 PM
[SOLVED] I want my Front Page to be my Posts Page with a tab. Workaround? Hidden Driveways Page & Category Menu Bars 2 Jul 10, 2010 10:17 AM
[SOLVED] Buddypress Workaround for Single WP Install? Rashell Sidebars & Widgets 1 Mar 12, 2010 11:20 AM
WP-PostViews workaround? perdox808 Post-Kicker, -Byline & -Footer 0 Apr 10, 2009 09:57 AM


All times are GMT -6. The time now is 03:58 AM.


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