• {@post_content} returns the main content along with any image galleries.

    Is it possible to get only the text content, minus the gallery? And if yes, would it then be possible to get only the gallery without the text?

    All via magic tags.

    Thanks in advance for your help.

    Best,
    Apoorv

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    If you wanted to do something like that, you’d have to run it through a PHP function you would have to create, because I don’t believe there is a WP function that will strip out the content to just the ‘content’.

    You can call whatever function you come up with inside magic tags like so: {@post_content,remove_all_images} where remove_all_images is your PHP function.

    Thread Starter chickenkhurana

    (@apoorv)

    Great, thanks. I decided we will not use the content field for images. I believe text content needs to be separate from other types of assets, so best to have an images custom field via Pods.

    Plugin Contributor Jim True

    (@jimtrue)

    I usually base it on what I need. If I need to place the gallery in a specific place for every single post type, then I add an image upload field so that I have more control over placement.

    If it’s just an article and want the article to have flexibility, then the images can stay inside the editor.

    Also, always try to take advantage of what WordPress provides natively (authors, featured image, post_title, post_excerpt text, etc.). It means you have less to do when you’re designing your output.

    Thread Starter chickenkhurana

    (@apoorv)

    Makes sense. I’m a bit of a purist when it comes to web content management, so just don’t like mixing content elements and presentation elements in one field. Plus, thanks to Pods, I can anyways use gallery shortcodes on images uploaded via custom field. Thanks for creating such a wonderful plugin.

    Plugin Contributor Jim True

    (@jimtrue)

    I’m the same way. I tend to design my content so I have complete control over the content I need to manage and I love Pods for doing that as well.

    You’re very welcome and we love Pods, too ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Question about {@post_content}’ is closed to new replies.