[SOLVED] Workaround for PHP: <?php the_permalink() ?>
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! |
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.
|
Quote:
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() ?> |
You can add a new widget area in those spots and then us a php aware widget in it.
|
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? |
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.
|
Awesome! Thank you!
|
All times are GMT -6. The time now is 11:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.