Support

Account

Forum Replies Created

  • Thanks for all of these suggestions (over a very long running thread!) – I find myself in the same situation of needing to export posts from a very old Drupal site to WordPress.

    For people who’ve gone the route from Drupal -> WordPress using the FG Drupal to WordPress plugin: do you recall how you managed to get main content from Drupal (the ‘Body’ field, at least in Drupal 6) to map to the WordPress Editor field field? It’s weird – I can get all the posts to import, but the Editor field remains blank. (Other than the post title, you think that this would be the easiest field to move over…)

    At this point I’m not even trying to get Drupal fields to map to ACF – I’m going to use ACF on new posts only. I feel like I’m so on the cusp of getting FG Drupal to work – but like I said – I can’t seem to get anything in the regular Drupal Body field to map to the WordPress Editor field.

    I’m definitely intending to share what I found out after I pull this off!

  • I’m making a pretty rudimentary one with Flexible Content. I’m making it easier for the end users to make similar layouts by loading a lot of the functionality into shortcodes, and then making TinyMCE buttons for the shortcodes that prompt them for options. So: user lays out flexible content rows, hits buttons to add shortcodes to the rows and columns in the layout they’ve chosen, and the shortcodes produce galleries or post listings or whatever.

    I came up with this when I was originally going to use Divi (a page builder type of plugin and theme) for a particular website until realizing that plugin didn’t scale well at all. The one thing Divi really has going for it are custom pre-fab layouts you can load up, and the ability to create libraries of repeatable content. So my shortcodes, combined with some ACF fields applied to Site Settings, accomplish about 80% of the same thing, but without all the Divi headaches/limitations.

    I agree with Anu’s solution for loading up prefigured layouts. It’s better to have custom fieldsets attached to page templates.

    But I think I’m making a decent freeform editor with FC. It just doesn’t get auto-populated.

  • Also had the same issue with The Events Calendar.

    Jeez though, we really need both plugins.

  • Hey Jonathan, thanks. So, now my code looks like this:

    <?php $posts = get_posts(array(
    				'numberposts' => -1,
    				'post_type' => 'gameresults',
    				'orderby' => 'title',
    				'order' => 'ASC'
    				));
    				
    				setup_postdata();
    				if($posts)
    				 {			 
    					foreach($posts as $post)
    					{
    						?>
    						<h3 style="margin-top: 0px;">
    						<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    
    						<?php if(get_field('game_results_repeater'))
    							{
    								echo '<ul>';
     
    								while(has_sub_field('game_results_repeater'))
    									{
    										echo '<li>sub_field_1 = ' . get_sub_field('game_results_home_team') . ', sub_field_2 = ' . get_sub_field('game_results_home_score') .', etc</li>';
    									}
     
    								echo '</ul>';
    							}
    					  }
    					wp_reset_postdata();
    				 } ?>
    

    But when I load the page, I get this error:

    Warning: Missing argument 1 for setup_postdata(), called in /home/lcbiskca/public_html/wp-content/themes/lcbi/sidebar-scores.php on line 20 and defined in /home/lcbiskca/public_html/wp-includes/query.php on line 3625

    Any ideas? It seems like setup_postdata() needs to have an argument, so I inserted $posts but, still, nothing appears.

    Thanks again for any help you can give.

Viewing 4 posts - 1 through 4 (of 4 total)