hamed
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to collect heading tag in a single post, such as Microsoft Word?Thanks for your reply
The plugin has no problem and generates shortcodes.
But I do not want to use 2 shortcodes for each tag (h1-h6) in posts (for heading collapse)
That’s why I want to get help from php trick.
My request: How to add any shortcode to before and after html tags (h1-h6).Thanks
- This reply was modified 2 years, 9 months ago by hamed.
Forum: Fixing WordPress
In reply to: How to collect heading tag in a single post, such as Microsoft Word?Thanks for your reply
I spent all my day on this subject.
Finally, I installed the plugin, and with this code I was able to paste the shortcode of the plugin before and after the content in a single post.
But what I need is: to add the shortcode after and before the heading tags (h1-h6).
// This particular example adds Hustle Social Sharing shortcode after content without editing template files on single posts/pages only. function jmorris_before_after($content) { $beforecontent = '[expand title="A Long Time Ago" tag="h2"]'; if ( is_single() ) { $aftercontent = '[/expand]'; } else { $aftercontent = ''; } $fullcontent = $beforecontent . $content . $aftercontent; return $fullcontent; } add_filter('the_content', 'jmorris_before_after');
With respect
- This reply was modified 2 years, 9 months ago by hamed.
Forum: Reviews
In reply to: [User Posts Limit] Restrict posts based on user in each roleThanks for the quick reply
I want all pages to be excluded (show for all)
Only hide other users’ postsForum: Fixing WordPress
In reply to: Restrict posts based on current user in each role (front end)Thanks for the quick reply
I want all pages to be excluded (show for all)
Only hide other users’ posts