Support

Account

Forum Replies Created

  • Let me rephrase this question. How do I display the second word on the front-end?

    summer : Summer

  • Hey Hube,

    Working with the web is sometimes a serious uphill battle.

    These are the scripts I ended up getting made, and you don’t have to worry about time outs.

    Imports posts from root of WordPress install and automatically populates wp_posts and wp_postmeta. This script has a long way to go for categories, tags and mapping ids. Tested with 150,000 posts imported in 10 minutes.
    https://github.com/muzza78/Import-Wordpress-Posts-from-CSV-to-MySQL

    A few importers I used for different tasks.
    https://github.com/muzza78/ratings-importer-to-wp_postmeta

    Please use and fork at will. M

  • Importing posts has been a major drama for myself over the past month. So after heaps of research and trial and error I have managed to import 150,000 custom posts.

    The best options I found were TurboCSV importer and a MySQL script written by some one on Fiver (cost me $50).

    TurboCSV was incredibly useful and imported all the WordPress fields and ACF fields from multiple CSV’s. The only problem being time- 10,000 or less posts is fine.

    My new friend from Fiverr custom designed a MySQL script to import CSV’s from the root folder, which imports most fields except categories and tags. You are welcome to steal the script from-

    http://dba.stackexchange.com/questions/66804/using-a-mysql-query-to-insert-category-values

    Please share your results with the community, and we can as planned; once more hold the world at ransom for one million dollars!!

  • For anyone wanting to loop images from another source using Flexslider.

    I created a ‘text area’ field type and split the urls with a pipe (|).

    www.domain.com/img/01.jpg|www.domain.com/img/02.jpg|www.domain.com/img/03.jpg

    <div id="slider" class="flexslider">
        <ul class="slides">
    		<?php
    
    		$string = get_field( 'slider' );
    		$split = explode ( '|', $string );
    
    		$split = array_reverse($split);
    
    		foreach($split as $img){
    		echo "<li><img src='{$img}' /></li>";
    		}
    
    		?>
    	</ul>
    </div>

    Remove $split = array_reverse($split); for normal order.

  • The following code is what works using the explode() function. How is it possible to combine echo for an unknown number of URLs?

    <div id="slider" class="flexslider">
        <ul class="slides">
    		<?php
    
    		$string = get_field( 'other' );
    		$split = explode ( '|', $string );
    		echo "<li><img src='{$split[0]}' /></li>";
    		echo "<li><img src='{$split[1]}' /></li>";
    		echo "<li><img src='{$split[2]}' /></li>";
    		echo "<li><img src='{$split[3]}' /></li>";
    		var_dump(the_field( 'other' ));
    
    		?>
    	</ul>
    </div>
Viewing 5 posts - 1 through 5 (of 5 total)