Forum Replies Created

Viewing 10 replies - 31 through 40 (of 40 total)
  • Thread Starter onyudo

    (@onyudo)

    finally, success!

    <div id="ingredients">
    				<h3>Ingredients</h3>
    					<?php
    						$recipe_ingredients = get_post_meta($post->ID, 'recipe_ingredients', true); {
    
    						echo '<ul class="custom_repeatable">';
    
    						foreach ($recipe_ingredients as $ingredients) {
    							echo '<li>';
    
    							foreach($ingredients as $i=>$value) {
    								echo $value;
    							}
    
    							echo '</li>';
    
    							}
    
    						echo '</ul>';
    						}
    					?>
    			</div>

    i’m sure there are much better ways to do this, but the correct data is getting to the front end now.

    many thanks anydog for pointing me in the right direction.

    /martin

    Thread Starter onyudo

    (@onyudo)

    ok, so thanks to your code i have made some progress. at this point i am at least getting the word “Array” outputting on the front end for each entry into a repeatable field on the back end.

    my repeatable metabox is for a list of ingredients, and is set up like this:

    array( // Repeatable & Sortable Text inputs
    		'label'	=> 'Ingredients', // <label>
    		'desc'	=> 'Ingredients', // description
    		'id'	=> $prefix.'ingredients', // field id and name
    		'type'	=> 'repeatable', // type of field
    		'sanitizer' => array( // array of sanitizers with matching kets to next array
    			'featured' => 'meta_box_santitize_boolean',
    			'title' => 'sanitize_text_field',
    			'desc' => 'wp_kses_data'
    		),
    		'repeatable_fields' => array ( // array of fields to be repeated
    			'title' => array(
    				'label' => 'Ingredient',
    				'id' => 'ingredient',
    				'type' => 'text'
    			),
    		)
    	),

    the code i am using to try to output the information to the front is this:

    <div id="ingredients">
            		<h3>Ingredients</h3>
            			<?php
    						$recipe_ingredients = get_post_meta($post->ID, 'recipe_ingredients', true); {
    
    						echo '<ul class="custom_repeatable">';
    
    						foreach ($recipe_ingredients as $ingredients) {
    							echo '<li>'.$ingredients.'</li>';
    						}
    
    						echo '</ul>';
    						}
    					?>
            	</div>

    My test entry in the backend only has 3 ingredients, but the result is only the word “Array” output 3 times in an unordered list.

    When i call all meta info I get this as a result:

    recipe_ingredients: a:3:{i:0;a:1:{s:10:”ingredient”;s:17:”1 Stick of Butter”;} i:1;a:1:{s:10:”ingredient”;s:6:”3 Eggs”;} i:2;a:1:{s:10:”ingredient”;s:12:”1/2 Cup Milk”;}}

    Thread Starter onyudo

    (@onyudo)

    I can get all of the data to output using the get_post_meta command, but i’m dead in the water after that. I see the logic of the code you’ve suggested, but instead of outputting the word “Array” I get absolutely nothing on the front end at all. Thanks for making a suggestion, though. It is genuinely appreciated!

    wp.tutsplus just started the first in a multi-part tutorial on making themes with Bones:

    http://wp.tutsplus.com/tutorials/theme-development/making-a-theme-with-bones-getting-started/

    i’m sure that they’ll dive into the LESS/SASS aspects of it at some point…

    Thread Starter onyudo

    (@onyudo)

    thanks so much debendra! your suggestion got me on the right track.

    basically i had to do this:

    if (is_front_page())
    { if ( function_exists( 'get_wp_parallax_content_slider' ) ) { get_wp_parallax_content_slider(); } }
    else { normal theme slider code here }
    Thread Starter onyudo

    (@onyudo)

    thanks debendra! i’ll give that a shot in a few minutes…. i was trying to integrate:

    if (is_home())

    into the if (function_exists) statement provided in the plugin instructions to no avail.

    wp-maverick: i am using the Good Space theme (http://themeforest.net/item/good-space-responsive-minimal-wp-theme-/2278615?WT.ac=search_thumb&WT.seg_1=search_thumb&WT.z_author=GoodLayers)

    Thread Starter onyudo

    (@onyudo)

    i was only focusing on jquery because i’ve never touched ajax at all yet.

    looks like i should give ajax a try.

    thanks andrew!

    onyudo

    (@onyudo)

    i’ve already made the jump from the LESSapp to Codekit… it’s more robust and is working smoother for me.

    the creator of Bones doesn’t recommend working with these files on a live site, and has many reasons why (check out his support forums on Github). i’ve only been working locally and it’s all clockwork now.

    onyudo

    (@onyudo)

    perfect. thanks!

    i got my hands on the LESS App for Mac and all is working like clockwork. the plugin i was using for Coda 2 wasn’t making the magic happen.

    not1_name and ili: i installed the LESS App, went into Preferences, checked “Automatically set CSS output paths when possible,” and dragged the entire LIBRARY folder into it.

    now when i change any of the LESS files and save them the CSS files are automatically generated and saved in the CSS folder of LIBRARY.

    sorry not1_name, sounds like you’re on Windows, and you’re using SimpleLESS. Maybe adding the entire LIBRARY folder will help out, if you haven’t tried.

    onyudo

    (@onyudo)

    seriously! even a simple flowchart would be awesome!

Viewing 10 replies - 31 through 40 (of 40 total)