Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

How to modify the WP posts layout?

         

vmackey1

11:48 am on May 14, 2020 (gmt 0)

5+ Year Member





I hope everyone is sound and safe on your side.

I have a plugin (used to hide/show content by clicking on a button) inviting to place a shortcode before and after the content to hide. Here I am trying to hide/show the content of posts, but I do not know exactly where to place these shortcodes.

The part of the post I need to hide/show is the texts part of the post ‘only’. The one we edit on the text editor (Not the featured image or any other element.) And I need to make that change for all posts, not individually. And I didn’t manage to find the portion of code representing this part only.

Can you help me to place these shortcodes? Thank you very much.

not2easy

12:35 pm on May 14, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Post content is generally the "entry" element. Your plugin should have a support area to help with this kind of information. There is no guarantee that your plugin is designed to use the entry element and editing your theme template is not normally part of how a plugin is supposed to function.

If you decide to edit your theme template, be sure you have a copy of the original on hand in case it does not work as expected.

vmackey1

1:38 pm on May 14, 2020 (gmt 0)

5+ Year Member



Thank you for your reply. Unfortunately, the support system for the plugin is not replying.

However, I am using the default WP theme "twentynineteen-child-theme". Would you happen to be familiar with the theme, and know which file and what portion of code represent the post content (again without the other elements: featured image, title, buttons,...)?

not2easy

3:23 pm on May 14, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Be careful of using plugins that do not support their product, Wordpress usually removes such plugins from their repository because they can be compromised. Be sure to verify your plugins at the vulnerabilty database linked to in the Charter here. It is constantly updated. The Charter is in the dropdown menu for the "Forum Options " button at the menu under the Title of the thread, and opens in a new tab.

In the default WP theme, download a copy of the "content.php" file and look for something like <div class="entry-content"> - this assumes that you are comfortable editing html and creating custom css.

vmackey1

4:36 pm on May 14, 2020 (gmt 0)

5+ Year Member



Thank you very much for your advice. I'll verify all of that.

I also managed to run the shortcode.

Take care of you.