|
#1
May 27, 2011, 03:51 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
As you may know, due to a WordPress.org requirement, the ability to add custom PHP code through the Atahualpa Theme Options had to be removed.
While processing Raw PHP isn't possible anymore, PHP functions that are known beforehand can be parsed as text string and then executed as was done in 3.6.7 for the function:
HTML Code:
<?php bfa_widget_area('....'); ?>
All of the WP template tags that have no parameters, like the_author() will be added, and the important ones with parameters.
Are there any functions that you feel are needed?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#2
May 27, 2011, 08:20 AM
|
|
My first thought is to request "do_shortcode".
|
#3
May 27, 2011, 06:07 PM
|
|
|
34 posts · Jun 2010
Fredrikstad, Norway
|
|
System URLs, like upload_dir->baseurl
|
#4
May 28, 2011, 08:48 AM
|
|
I was using a php string to build a list of child pages--a Table of Contents. I hate to lose that.
Jack
|
#5
May 29, 2011, 10:16 PM
|
|
It would be nice to be able to add functions to the end of the functions.php file.
It seems that the -child theme method loads those functions defined in child themes first, which means that you can't redefine an existing function (if my understanding is correct). In the event I want to re-define an existing function I'd like to be able to do it without having to update the functions.php file each time the theme gets upgraded.
Last edited by juggledad; Jun 3, 2011 at 04:02 AM.
|
#6
May 30, 2011, 04:49 PM
|
|
I don't know PHP from BBQ, and suspect this suggestion doesn't belong in this thread, but...
I don't use the ATO "Show Blog Title" option, and apparently as a result, SEO reviews don't report the blog title in the "Header Tag". It would be nice to have a way to accomplish this short of using white (invisible) letters in the blog title.
|
#7
May 30, 2011, 08:34 PM
|
|
|
|
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
|
|
I would love not to have to use a plugin to exclude categories from displaying in a widget. Custom PHP code has solved this for me in the past, but it's going away with the new requirements. I really don't understand why Wordpress doesn't include this capability out of the box. That would move it even closer to a full CMS.
|
#8
Jun 1, 2011, 07:00 AM
|
|
|
|
82 posts · Nov 2010
London, UK
|
|
Quote:
Originally Posted by marklevine
My first thought is to request "do_shortcode".
|
If nothing else, definitely THIS!
Mark
|
#9
Jun 3, 2011, 02:21 AM
|
|
|
|
23 posts · May 2010
Henderson, NV
|
|
Note: this post was edited - only put in the functions you would like to see - this is NOT a problem solving thread. - Juggledad
the_title();
the_permalink();
Last edited by juggledad; Jun 3, 2011 at 04:00 AM.
|
#10
Jun 4, 2011, 02:18 AM
|
|
|
22 posts · May 2010
Sweden
|
|
I'm using
PHP Code:
<?php echo '<span class="addthis_toolbox addthis_default_style" style="display:inline; float:right;" addthis:url="'.urlencode(get_permalink()).'" addthis:title="'.urlencode(get_the_title($id)).'">
to display AddThis icons in a nicer way. Since this is removed in the latest version of Atahualpa, I'm loathe to update. It's really one of the best features.
|
#12
Jun 9, 2011, 09:27 AM
|
|
Another vote for "do_shortcode."
|
#13
Jun 13, 2011, 08:58 PM
|
|
How about a simple way to include other php files? I use this extensively now, and thus fear upgrading...
|
#14
Jul 8, 2011, 09:52 AM
|
|
something to add php trough another method in ata. please!
i use e.g. wp-pagenavi and breadcrumb navxt. it would be very annoying to change the code in the header- and footer-file of ata after every upgrade.
one of the main advantages of ata was the possibility to completely customize the theme the way you want it to have, without changing a single line of code (what upgrading had made a very easy and fast process). i won't believe that these times are over now?!
Last edited by owc; Jul 8, 2011 at 10:02 AM.
|
#15
Jul 10, 2011, 11:39 AM
|
|
At first I thought this change would be difficult to adapt but on further thought I think the best thing is to move on with good documentation about where and how PHP code should be added.
For example - this was in "Content above the loop":
<?php /* For MULTI post pages if activated at ATO -> Next/Previous Navigation: */ bfa_next_previous_page_links('Top'); ?>
Here is the code in index.php:
<?php include 'bfa://content_above_loop'; ?>
Does the php go after the ";" inside the php statement like this?
<?php include 'bfa://content_above_loop'; bfa_next_previous_page_links('Top'); ?>
Also I have php code on the "post info items" page. What do I do with this?
Cheers
Jack
|
#16
Jul 10, 2011, 12:19 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
any code you had in "Content above the loop" will have to go in index.php above the line
HTML Code:
<?php while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#17
Jul 14, 2011, 03:40 PM
|
|
I was using a php function in 3.6.4 to create a date box next to the post title in the kicker that I'm not having luck with yet in 3.6.5. This type of code:
Quote:
<div class="date">
<div class="date-inside">
<div class="date-month"><?php the_time('M'); ?></div>
<div class="date-day"><?php the_time('d'); ?></div>
</div>
</div>
|
So I think my answer is I'd like to see php the_time back in. Thanks!
|
#18
Jul 14, 2011, 06:33 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
Actually you can use the %date code mentioned on that page instead of php.
__________________
~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.
|
#19
Jul 15, 2011, 10:53 PM
|
|
Thanks for the advice Larry. It took a bit of trial-and-error but I found the code that worked.
Quote:
<div class="date">
<div class="date-inside">
<div class="date-month">%date('M')%<br>%date('d')%</div>
</div>
</div>
|
Thanks again!
|
#20
Jul 21, 2011, 04:58 AM
|
|
How about site_url(). I prefer absolute to relative paths, and this makes it easy to copy code from one place to another.
|
#21
Jul 25, 2011, 11:24 AM
|
|
|
|
102 posts · May 2009
Missoula, MT
|
|
I do miss being able to put in php!
I'd vote for a way to make additions to the functions.php survive updates... I'm using child themes sometimes for only that reason... And child theme functions.php usage can be problematic due to what is loaded and when as previously noted.
I'd REALLY like the header image(s) to be such that they survive an update
Ditto favicons
Ditto logo image (although I do have a workaround http://forum.bytesforall.com/showthread.php?t=8929 )
Basically, anything that would make any customizations impervious to theme updates!
Ken
|
#22
Jul 28, 2011, 09:51 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
PEOPLE - this is NOT a 'what feature do I want' in the next release. This is specific to 'what PHP functions' would you like to see.
If you don't know what a PHP function is, then please don't post in this thread.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#23
Aug 24, 2011, 01:28 AM
|
|
|
|
12 posts · Jan 2010
Oahu, Hawaii
|
|
Yes. I use PHP for a very specific feature in the WPML system:
<?php global $icl_language_switcher; $icl_language_switcher->language_selector_footer(); ?>
<?php /* For MULTI post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_page_links('Top'); ?>
Important to the design of the website http://www.americachinabridge.com -- where we use it to position a language switcher "above the loop" in the center column.
|
#24
Aug 25, 2011, 09:02 AM
|
|
<?php bloginfo('template_directory'); ?>
|
#25
Aug 29, 2011, 09:17 PM
|
|
|
|
76 posts · Jul 2010
Missouri, USA
|
|
Quote:
Originally Posted by marklevine
My first thought is to request "do_shortcode".
|
Quote:
Originally Posted by webalyst
If nothing else, definitely THIS! Mark
|
Quote:
Originally Posted by talbin
Another vote for "do_shortcode."
|
I'd like to throw in my request for do_shortcode as well. Is it pretty safe to assume that it'll make it to 3.6.8?
|
|