Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   What PHP functions do you want to see as options in 3.6.8? (http://forum.bytesforall.com/showthread.php?t=14377)

juggledad May 27, 2011 04:51 AM

What PHP functions do you want to see as options in 3.6.8?
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?

marklevine May 27, 2011 09:20 AM

My first thought is to request "do_shortcode".

Knut Sparhell May 27, 2011 07:07 PM

System URLs, like upload_dir->baseurl

PainFreeComputing May 28, 2011 09:48 AM

I was using a php string to build a list of child pages--a Table of Contents. I hate to lose that. :(


billc108 May 29, 2011 11: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.

thetravelchronicle May 30, 2011 05: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.

paulae May 30, 2011 09:34 PM

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.

webalyst Jun 1, 2011 08:00 AM


Originally Posted by marklevine (Post 66528)
My first thought is to request "do_shortcode".

If nothing else, definitely THIS!


rvconnelly Jun 3, 2011 03:21 AM

Note: this post was edited - only put in the functions you would like to see - this is NOT a problem solving thread. - Juggledad


Faffe Jun 4, 2011 03:18 AM

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.

iPuppet Jun 5, 2011 01:13 PM

Again, PHP is not my forte, however one function that has me remaining with v. 3.5.3 is being able to place a single announcement post near the top of the otherwise static front page. See http://www.thepuppetco.org . I originally did this using guidance from: http://forum.bytesforall.com/showthread.php?t=3486

talbin Jun 9, 2011 10:27 AM

Another vote for "do_shortcode."

derekwbeck Jun 13, 2011 09:58 PM

How about a simple way to include other php files? I use this extensively now, and thus fear upgrading...

owc Jul 8, 2011 10: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?!

scrollpost Jul 10, 2011 12:39 PM

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?


juggledad Jul 10, 2011 01:19 PM

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']++; ?>

scottyd777 Jul 14, 2011 04: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:


<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>
So I think my answer is I'd like to see php the_time back in. :) Thanks!

lmilesw Jul 14, 2011 07:33 PM

Actually you can use the %date code mentioned on that page instead of php.

scottyd777 Jul 15, 2011 11:53 PM

Thanks for the advice Larry. It took a bit of trial-and-error but I found the code that worked.


<div class="date">
<div class="date-inside">
<div class="date-month">%date('M')%<br>%date('d')%</div>
Thanks again!

sjc999 Jul 21, 2011 05: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.

kdawes01 Jul 25, 2011 12:24 PM

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!


juggledad Jul 28, 2011 10:51 AM

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.

darwin8 Aug 24, 2011 02:28 AM

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.

aebrigham Aug 25, 2011 10:02 AM

<?php bloginfo('template_directory'); ?>

mdmower Aug 29, 2011 10:17 PM


Originally Posted by marklevine (Post 66528)
My first thought is to request "do_shortcode".


Originally Posted by webalyst (Post 66879)
If nothing else, definitely THIS! Mark


Originally Posted by talbin (Post 67524)
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?

All times are GMT -6. The time now is 11:31 AM.

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