Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

Embed PHP


  #1  
Old Jan 6, 2010, 03:06 AM
LostBrooklynGuy
 
1 posts · Jan 2010
Hi,
I was wondering if there was a way to embed server side calls using PHP into the Atahualpa theme.
I was trying to embed them in the Add HTML/CSS inserts but nothing seemed to be working.

Wondering if this is at all possible.

Thank you.
  #2  
Old Jan 6, 2010, 11:08 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
there is a plugin 'exec-php' (http://wordpress.org/extend/plugins/exec-php/) you might want to look at.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Mar 29, 2010, 07:21 PM
nathanael
 
2 posts · Mar 2010
Embed PHP or widget outside main layout

First, many many thanks to Juggledad and Flynn for your incredible dedication to this wonderful theme and the forum.

I am working on this site, The Bilingual Psychologist. I am running the latest versions of WP, Atahualpa and the WPML plugin (WP Multilingual language selector).

I would like to move the country flags and their description, from the right sidebar to the upper right hand side of the page, just outside the main layout i.e. to the right of the "Home" link and to the right of the drop shadow around the main layout.

The country flags and their description can be easily reproduced as is with the following PHP code:
Code:
<?php do_action('icl_language_selector'); ?>
I don't know how to code but I can fiddle around alright with ATO settings and copy-pasting code. To solve my problem, I have already tried the following:
(1) Creating a widget area (ATO>Sidebar & Widgets>Add new Widget Areas) outside the main layout and then using the Exec-Php plugin. Unfortunately it doesn't seem possible to define a widget area outside the main layout (which makes absolute sense )
(2) Adding the above PHP code to "HTML inserts: body top" (ATO>Various content items/Add HTML/CSS inserts).

Solution (2) seems to be in the right direction to me. I tried inserting the following
Code:
<a style="float:right" href="http://www.thebilingualpsychologist.com">Test</a>
and I got a link on the top line, and more or less in the right area of the screen (hurray).

My question therefore:
- Is solution (2) the right way to go, and if so, is it possible to insert PHP code within HTML tags, if so which tags?
- If PHP code inserted within HTML tags works, apparently "float:right" moves everything all the way to the right. How to do I control how far right the elements go?
- If solution (2) is not the right way to go, any ideas to achieve what I'm looking for?

Thank you so much if you read this far.

Last edited by nathanael; Mar 29, 2010 at 07:55 PM. Reason: Updated details about WPML plugin
  #4  
Old Mar 30, 2010, 01:12 PM
Rashell's Avatar
Rashell
 
67 posts · May 2009
You can put a widget area outside the main content area. It just requires that you adjust the header.php file. I believe you want to put it right after
Code:
<div id="wrapper">
Rashell

Last edited by Rashell; Mar 30, 2010 at 01:14 PM.
  #5  
Old Mar 30, 2010, 06:24 PM
nathanael
 
2 posts · Mar 2010
Rashell,

Thank you so much for answering so quickly. I made a lot of progress thanks to you. There are a few things I didn't quite figure out though.

I applied your directions exactly (creating widgets areas, using a div in the widget area, adding some CSS styling). However these header widget areas seem to be in the header area (still within the borders of the main layout), whereas I'm trying to put my language selector widget outside the main layout (to the right of the header).

Instead of creating widget areas in the header, I opted for your other solution, changing header.php as you suggested, embedding the php code for the language selector in a div tag, after div wrapper. It almost works.

As you can see if you go to TheBilingualPsychologist.com, the layout is as I want it, but the language switcher is too close to the main layout border and covers the drop shadow.

Also, with my current resolution, I now have to scroll right/left to see the entire page.

If you have any other ideas, please don't hesitate. Thank you so much for bringing me this far though. I couldn't believe my eyes when I methodically applied what you told me to do.

Bookmarks

Tags
outside layout, outside sidebar widget, php



Similar Threads
Thread Thread Starter Forum Replies Last Post
embed phpbb forums using wp-united or otherwise? echamings Installing & running WordPress 6 Aug 16, 2010 03:31 AM
[SOLVED] Difficulty with Javacript weather embed on pages Wimbledon Atahualpa 3 Wordpress theme 4 Dec 6, 2009 02:40 PM
Making separate pages to display posts by category; also, how to embed WP page Eric Bobrow Atahualpa 3 Wordpress theme 1 Dec 2, 2009 01:34 AM
Embed Flash masterchief Atahualpa 3 Wordpress theme 0 May 18, 2009 09:42 AM
How to embed video in a post? Jody Post-Kicker, -Byline & -Footer 2 Mar 22, 2009 03:16 PM


All times are GMT -6. The time now is 01:10 AM.


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