Mobile theme and js_composer (shortcodes)

Posted in: Newspaper
Post count: 68

hello, thanks for all work.. Good themes, good work..

What are your suggestions? And how to?

mobile

Thanks..

Post count: 22421

Hello,
Unfortunately if you use visual composer on posts (not recommended) this issue will be present on the mobile theme. The mobile theme does not use visual composer and that is why it will show the shortcode on posts. Pages got converted to mobile versions you have top create in the mobile editor but visual composer on posts is not recommended. You can use it but these will be the consequences. You can either stop using VC on posts or stop using the mobile theme as there is no workaround for it. Sorry. (here is where it;s mentioned about VC: https://forum.tagdiv.com/how-to-use-visual-composer/http://screencast.com/t/1sK8WVIO1ig)
Thank you!

Post count: 68

My suggestion 🙂

open: /wp-content/themes/Newspaper/mobile/single.php

find:
echo $td_mod_single->related_posts();

replace:


				$exclude_codes = 'youtube|vimeo|video|playlist|embed|twitter|facebook|google|audio|wp_caption|caption|gallery';

				$the_content = $td_mod_single->get_content();
				$the_content = preg_replace("~(?:\[/?)(?!(?:$exclude_codes))[^/\]]+/?\]~s", '', $the_content);  # strip shortcodes, keep shortcode content
				echo $the_content;			

Now:

new

But why not working youtube url to embed ?

this working: [embed]YOUTUBE_LINK[/embed]

But this not working: YOUTUBE_LINK

Thanks 😉

credit: https://wordpress.org/support/topic/stripping-shortcodes-keeping-the-content#post-2977834

  • This reply was modified 10 years by kuaza.
Post count: 22421

Hello,
The standard embed feature done by pasting the video url in the post content is tested to work with the mobile theme. I tested it again and there is no need to use the [embed]YOUTUBE_LINK[/embed] method as youtube videos work on the mobile theme just by pasting the youtube link inside the content.
Please try to disable all plugins except visual composer, clear cache and reset cdn files. There could be a conflicting plugin that causes the issue.
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.