-
AuthorPosts
-
November 9, 2013 at 1:09 am #7045
TextWrangler and Fetch are what I use.
You need a text editor – TextEdit is the Mac’s notepad – so you don’t get any formatting.
TextWrangler is wonderful for all sorts of reasons, but you’ll get colors for the various elements of your php file which will help you avoid making typos that amount to a big (syntax) error – then nothing will work 🙂
http://www.barebones.com/products/textwrangler/
So you would want to make a folder somewhere for files you edit. Copy (using fetch or any ftp software) the file you want to edit from your site – you’re looking for folders under wp-content – themes, and then symbiostock and you’ll see content-image.php.
You can just drag from Fetch into a Finder window.
I would then make a folder for Edited code and make a copy of the file you just downloaded into that folder. You always want to have a quick way to go back in case you need to.
Make your edits, save the file and then drag your edited file back to the Fetch window.
As an extra safety net, I use Fetch to rename the files I’m about to overwrite to orig-filename.php
And make sure you keep your edited files because they’ll be overwritten on the next theme update
Does that help?
November 9, 2013 at 1:57 am #7046Yes, Jo Ann, I do think that will work.
Muchas gracias!!!
November 9, 2013 at 1:59 am #7047@cathyslife stockphotos wrote:
You can use Fetch, it works similar to Filezilla. And you can download Text Wrangler for mac, it’s free too I believe. Editing with Word would not be a good idea. We’ve tried at work and Word inserts invisible characters for some strange reason that have to be stripped out when the copy then goes into code layout.
Thanks for that good info, Cathy. I’ll leave Word out of it.
Will tackle this project tomorrow.
November 9, 2013 at 12:26 pm #7048I just tried … it looked perfect on my normal single image pages, but messed up everything on my photo-collection pages … for example the word “keywords” appeared above the image, while the keywords were still on the right location.
I couldn’t find the problem, perhaps anyone else can see what’s wrong?
<?php
/**
* @package symbiostock
* @since symbiostock 1.0
*/
$strictly_minimal = get_theme_mod( 'strictly_minimal' );
if( $strictly_minimal == '' ) {
$strictly_minimal = 1;
}
?>
<?php
//get our post meta
$postid = get_the_ID();
$symbiostock_post_meta = symbiostock_post_meta($postid);
//testing, uncommment
//var_dump($symbiostock_post_meta);
?>
<?php
$symbiostock_post_meta = 'ss_before_image_page';
do_action( 'ss_before_image_page', $symbiostock_post_meta );
?>
<article id="post-" >
<?php
$symbiostock_post_meta = 'ss_before_img_page_title';
do_action( 'ss_before_img_page_title', $symbiostock_post_meta );
?>
<a class="" href="" title="" rel="bookmark">
<?php
$symbiostock_post_meta = 'ss_after_img_page_title';
do_action( 'ss_after_img_page_title', $symbiostock_post_meta );
?>
<?php
$symbiostock_post_meta = 'ss_before_img_page_preview';
do_action( 'ss_before_img_page_preview', $symbiostock_post_meta );
?>
<a id="stock-image-preview" title="" rel="enclosure" type="image/jpeg" href=""> <img itemprop="contentURL image" class="photo img-responsive" alt="" src=""/>
<?php
$symbiostock_post_meta = 'ss_after_img_page_preview';
do_action( 'ss_after_img_page_preview', $symbiostock_post_meta );
?>
<?php
$symbiostock_post_meta = 'ss_before_img_page_description';
do_action( 'ss_before_img_page_description', $symbiostock_post_meta );
?>
<?php the_content( __( 'Continue reading →', 'symbiostock' ) ); ?>
<?php
$symbiostock_post_meta = 'ss_after_img_page_description';
do_action( 'ss_after_img_page_description', $symbiostock_post_meta );
?>
<?php //code "borrowed" from symbiostock_marketer() in marketer_functions.php
// model release
$id = get_the_ID();
$model_released = get_post_meta( $id, 'symbiostock_model_released', 'N/A' );
if ( empty( $model_released ) || $model_released == false ) {
$model_released[ 0 ] = 'N/A';
} //empty( $model_released ) || $model_released == false
//property release
$property_released = get_post_meta( $id, 'symbiostock_property_released', 'N/A' );
if ( empty( $property_released ) || $property_released == false ) {
$property_released[ 0 ] = 'N/A';
} //empty( $property_released ) || $property_released == false
?>
Model Released:
Property Released:
Image updated—
'' . __( 'Pages:', 'symbiostock' ), 'after' => '' ) ); ?>
<?php
$symbiostock_post_meta = 'ss_before_img_page_author_box';
do_action( 'ss_before_img_page_author_box', $symbiostock_post_meta );
?>
<?php
$symbiostock_post_meta = 'ss_after_img_page_author_box';
do_action( 'ss_after_img_page_author_box', $symbiostock_post_meta );
?>
<!-- jas begin Move this under description Image updated— jas end -->
<?php
if($strictly_minimal == 1):
?>
Keywords
<?php
$symbiostock_post_meta = 'ss_before_img_page_keywords';
do_action( 'ss_before_img_page_keywords', $symbiostock_post_meta );
?>
ID, 'image-tags', '', ', ', '' ); ?>
<?php
$symbiostock_categories = get_the_term_list( $post->ID, 'image-type', '', ' | ', '' );
if($symbiostock_categories){ ?>
Image Categories
<?php
<?php
$symbiostock_post_meta = 'ss_before_img_page_categories';
do_action( 'ss_before_img_page_categories', $symbiostock_post_meta );
?>
}
?>
<?php
if(!function_exists('ss_is_collection') || !ss_is_collection( $symbiostock_post_meta )):
if(is_active_sidebar( 'image-page-bottom' )):
?>
<?php
//get bottom sidebar
dynamic_sidebar( 'image-page-bottom' );
?>
<?php endif;
endif;
?>
<?php
endif; //strictly minimal
?>
<?php
$symbiostock_post_meta = 'ss_before_img_page_product_table';
do_action( 'ss_before_img_page_product_table', $symbiostock_post_meta );
//set up the buying options from cart class
$cart_options = new symbiostock_cart($symbiostock_post_meta);
?><?php
Image #
<?php
$cart_options->display_product_table();
?>
$symbiostock_post_meta = 'ss_after_img_page_product_table';
do_action( 'ss_after_img_page_product_table', $symbiostock_post_meta );
if($strictly_minimal == 1):
//get sidebar
$symbiostock_post_meta = 'ss_before_img_page_sidebar';
do_action( 'ss_before_img_page_sidebar', $symbiostock_post_meta );
if(!function_exists('ss_is_collection') || !ss_is_collection( $symbiostock_post_meta )):
if(is_active_sidebar( 'image-page-side' )):
?><?php<?php
dynamic_sidebar( 'image-page-side' );
?>
endif;
endif;
$symbiostock_post_meta = 'ss_after_img_page_sidebar';
do_action( 'ss_after_img_page_sidebar', $symbiostock_post_meta);
$cart_options->display_referral_links();
symbiostock_credit_links('product_page');
?>
<?php
endif; //strictly minimal
?>
<!-- #post- -->
<?php
if($strictly_minimal == 1):
$symbiostock_post_meta = 'ss_before_img_page_bottom_widget';
do_action( 'ss_before_img_page_bottom_widget', $symbiostock_post_meta );
if(!function_exists('ss_is_collection') || !ss_is_collection( $symbiostock_post_meta )):
if(is_active_sidebar( 'image-page-bottom-fullwidth' )):
?>
<?php
dynamic_sidebar( 'image-page-bottom-fullwidth' );
?>
<?php
endif;
endif;
endif; //strictly minimal
$symbiostock_post_meta = 'ss_after_image_page';
do_action( 'ss_after_image_page', $symbiostock_post_meta ); ?>November 10, 2013 at 1:19 am #7049So I copied your file and did a diff to see what was changed.
You put the code I provided for putting model/property release status in a different place and removed a section of php altogether:
<?php
$symbiostock_post_meta = 'ss_bottom_img_page_preview_well';
do_action( 'ss_bottom_img_page_preview_well' );
?>I don’t have any collections to test on, so I don’t know if removing that section of code caused the problems you saw, but I’d at least start by putting it back in to see if things improve 🙂
I’ve put my current content-image.php on dropbox – perhaps it wasn’t clear from the snippet I provided earlier where things need to be inserted:
https://dl.dropboxusercontent.com/u/12956972/content-image.php
November 10, 2013 at 7:18 pm #7050Thanks a lot for your work Jo Ann! I hope I will have time tomorrow to try it again.
November 16, 2013 at 10:38 pm #7051Success. Thanks again Jo Ann 🙂
November 17, 2013 at 3:25 am #7052You’re most welcome
-
AuthorPosts
The forum ‘Archives’ is closed to new topics and replies.