Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,255
Total Threads: 81,197
Total Posts: 566,926
There are 34 users currently browsing (tf).
  Our Partners:
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

WordPress coding issue - Mobile Theme

Thread title: WordPress coding issue - Mobile Theme
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
02-29-2012, 02:49 PM
scrappy is offline scrappy
scrappy's Avatar
Status: Member
Join date: Aug 2006
Location: Newcastle upon Tyne
Posts: 172
iTrader: 1 / 100%

scrappy is on a distinguished road

Send a message via MSN to scrappy

  Old  WordPress coding issue - Mobile Theme

I'm hoping one of you lovely people can help me with this. I'm trying to develop a mobile version of a friends website for her using WPTouch and I'm having a bit of an issue with the coding.

Her site has a custom field to display a portfolio image for each post. The field is called 'Portfolio Fullsize Image' within the admin panel for WordPress and as far as I can gather in the coding it is '$portfolio_full'.

I have been looking at the coding to try and get the WPTouch theme to display the image at a scaled rate appropriate to the mobile browser.

Within the index.php file we have this:

PHP Code:
<?php if ( wptouch_theme_use_calendar_icons() || wptouch_theme_use_thumbnail_icons() ) { ?>
This then relates to the thumbnails.php file which is currently set with this code:

PHP Code:
<div class="thumbnail-wrap">
    <?php if ( has_post_thumbnail() ) { ?>
        <img src="<?php wptouch_the_post_thumbnail(); ?>" class="attachment-post-thumbnail" alt="post-thumbnail" />
    <?php ** else { ?>
        <img src="<?php echo wptouch_bloginfo'template_directory' ); ?>/images/default-thumbnail.png" class="attachment-post-thumbnail default-thumbnail" alt="post-thumbnail" />
    <?php ** ?>
I have then looked at the code for the original theme she is using for WordPress which shows this code to display the images (I think):

PHP Code:
$post_image get_post_meta($post->ID'post_image'true);
$disable_post_image get_post_meta($post->ID'disable_post_image'true);
I've then changed the thumbnail.php file to use this code:

PHP Code:
<div class="thumbnail-wrap">
    <?php if ( has_post_thumbnail() ) { ?>
        <img src="<?php wptouch_the_post_thumbnail(); ?>" class="attachment-post-thumbnail" alt="post-thumbnail" />
    <?php ** else { ?>
        <img src="<?php $portfolio_full get_post_meta($post->ID'portfolio_full_img'true); $post_image get_post_meta($post->ID'post_image'true); $disable_post_image get_post_meta($post->ID'disable_post_image'true); ?>" class="attachment-post-thumbnail default-thumbnail" alt="post-thumbnail" />
    <?php ** ?>
Here is the code from the CSS file that relates to the thumbnails:

PHP Code:
.post .thumbnail-wrap {

idevice .post .thumbnail-wrap {
webkit-box-reflectbelow 1px 
-webkit-gradient(linearleft topleft bottom
from(transparent), color-stop(0.8transparent), to(white));
post img.attachment-post-thumbnail {

idevice .post img.attachment-post-thumbnail {

It is however not displaying the image.

I was hoping some people who are good with WordPress could take a look and tell me what they think.

Any help would be very much appreciated.

EDIT: Please excuse the ** symbols, it is replacing parts of my code with this for some reason.


Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed