简体   繁体   中英

How to break non text editor content into multiple pages (wordpress)

So the question basically says it all. I have a custom post type made with a verity of custom fields in it (images, wysiwyg. ect) I am trying to break the post up into multiple pages. For example have the text-editor input appear on one page and the image editor input appear on another page. I have tried using in a multitude of ways, including inserting a text editor between post types and adding . But none of them have worked and it just displays all the content on one page.

So does anyone know how/if its possible to split custom fields data into multiple pages?

-Note- Another option I've thought of is just creating different pages for each of the content then hard-linking them. But I don't think it's possible to reference other post data from another post.

Here my single-track.php page currently

<?php get_header(); ?>

<div class="single-track-storie">
e_title(); ?> </h1>
<?php the_field('content-1'); ?>

</div>
<?php
$img1 = get_field('game_image1');
$img2 = get_field('game_image1');
?>

<img src="<?php echo $img1['url']; ?> " alt="<?php echo $img1['alt']; ?>">
<img src="<?php echo $img2['url']; ?> " alt="<?php echo $img2['alt']; ?>">

<?php wp_footer(); ?>

There are some ways to do this, however none of them are native to WP functions.

1. You can add a Shortcode .

The idea is that you register a shortcode, with what you want to show like [post-image-stuff] and then you add that code to your post content and it will load. To paginate, you use <!––nextpage––>

Ex:

Article content and so on

<!––nextpage––>

[post-image-stuff]

This will be your post content, the negative part is that you need to register the shortcodes, but it's not that hard. I confess I've never tried this, but it should work.

2. Do you really need to paginate? Why don't you put a section with Tabs to show the other content? You can put a gallery, a map and author information inside it without the need to reload the page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM