• Resolved imparabletv

    (@imparabletv)


    Hello, i am loving the plugin so far. I added a custom field in the main post of my wordpress site and this custom field is only plain text and is accepting shortcodes. I want to basically add the same shortcode to all my posts , the shortcode is from the favorites plugin, but i see that there is no option to display some text or shortcode by default in that custom field so this affect to all posts? or i will have to manually add the shortcode in the custom field of every post?

    Thanks!

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

    (@jimtrue)

    It sounds like you’re actually trying to fix the solution, instead of the actual first problem you were trying to solve by going down the path of adding a field for the exact same shortcode.

    What is the shortcode and if you just wanted this on every post, wouldn’t it make more sense to add it to your post template?

    Plugin Contributor Jim True

    (@jimtrue)

    Basically, you’re asking us to help you solve Y when we need to know X

    https://en.m.wikipedia.org/wiki/XY_problem

    Thread Starter imparabletv

    (@imparabletv)

    Hi Jim, i added a custom field for the shortcode so i can display this on the post tables pro plugin in 1 column thats the point.

    I already added a custom field for video so when i put the link of some video this custom field is displaying without problem in the table, but in the other custom field i would like to show the same shortcode for all posts so the favorite button appears.

    Basically i dont know if there is some option to lets us display the same content for all post in some custom field we create

    Plugin Contributor Jim True

    (@jimtrue)

    But you’re saying it’s the same shortcode on all posts? What is the shortcode? How does it relate to the current post (ie does it pass the ID of the current post to that ‘favorites’ shortcode?)

    Plugin Contributor Jim True

    (@jimtrue)

    BTW, providing a page example or link might help.

    Thread Starter imparabletv

    (@imparabletv)

    Hi thanks for the answer, i have recorded a small video explaining you what i plan to achieve wit this, i hope is okay for you : https://drive.google.com/file/d/1-U-ctm9ppVKsfSYLDLi348nsPJmpLxGY/view?usp=sharing

    Thank you!

    Plugin Contributor Jim True

    (@jimtrue)

    Thanks for providing the video. That is an odd one. You’d think that Posts Table Pro would just let you put that shortcode physically in one of the ‘columns’ of their table.

    You should be able to create a standard text field for your Favorite button, check the box for Allow Shortcodes under Additional Options and under Advanced tab, Values, type the shortcode you want in the Default Value.

    I tested this and the default shortcode is loaded automatically as a default value for new posts and saved when I’m finished.

    The problem is on existing posts. The default value is not added when you already have an existing post. You would have this same issue trying to get content into any content that already exists.

    My suggestion, since this is the exact same shortcode for every single post would be to reach out to the Posts Table Pro plugin support (since you probably had to pay for it) and ask them “I need to put the same shortcode in a column on every single row in a table generated by Posts Table Pro. Is there a way to do that with your plugin?”

    Otherwise, you would have to just cut and paste that in all your existing posts. New Posts should work fine if you do the default value setup above.

    Thread Starter imparabletv

    (@imparabletv)

    I want to thank you for the support you gave me. I am impressed with you, thank you for creating such an amazing plugin. I understand everything now. Thank you so much

    Plugin Contributor Jim True

    (@jimtrue)

    You’re quite welcome @imparabletv and thank you for the kind words ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add the same shortcode to all posts in a custom field’ is closed to new replies.