Search Results for 'child theme'

    No search results were found in Documentation!

Results from the Forum
Bogdan B.
tagDiv Staff

Hi,

Your live search seems to not work at all now. I suspect it is a plugin conflict so please disable all plugins except the page builder, clear cache and reset cdn files if you use it. Please also check any custom code you might have added to the theme panel or the theme files. If you use a child theme, please switch to the main theme to make sure it does not affect the proper functionality of the theme.

Thank you!

Simion C.
tagDiv Staff

From what I can see having the ACF plugin removes the other custom fields, deactivating it will restore them.

I found a code that can be entered in the theme or child theme functions file, this will (at least in my case it does) enable the default custom fields regardless of ACF being active
https://www.wpbeginner.com/wp-tutorials/how-to-fix-custom-fields-not-showing-in-wordpress/
https://www.screencast.com/t/IGAEYLobqEp
https://www.screencast.com/t/1so9f3vj
You could give that a try, should work.

Mariolino_dg
Participant
#0

Hello
I still have to update wordpress to the latest version, and also the theme.
I used tagdiv composer, is it compatible with gutenberg?
and I have a child theme.

How should I upgrade?
update first wordpress?
then the theme?

is there an updated tutorial with the new features of wordpres 5.0?
I’m afraid to do the update 😀

thank you

tavara
Participant
#0

Hello,
I want $td_mod_single->get_category() used in single_template_x.php to not show a category.

For example: post has Cat1, Cat2, Cat3. Single post template should not show Cat2 in the header.

I’m using a child theme with Newspaper 9.2.2.
Thank you.

Simion C.
tagDiv Staff

You could also enter the ad codes in text elements, like column text or text with title.

There is a way to add more custom ad spots but it will require modifications to the theme
https://forum.tagdiv.com/topic/costum-ad/
Also these modifications can’t be made in a child theme so they will be lost after a theme update.

Or maybe consider using a plugin to manage the ads, some users recommend the Adrotate plugin which based on user feedback works properly with the theme. Some more info about it here if you should consider it
http://www.wpbeginner.com/plugins/how-to-manage-ads-in-wordpress-with-adrotate-plugin/
https://ajdg.solutions/manuals/adrotate-manuals/

Simion C.
tagDiv Staff

Hi,

The php files for the default post templates are these ones
https://www.screencast.com/t/dwdWxjoqN9
Opening one of them the structure of the template can be seen. Enter that code in the desired location and it should appear in posts using the respective post template. Make the modification to the post templates that you use.

The post template files can be modified in a child theme
https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thanks

Calin
tagDiv Staff

Hi,

Unforgivably our theme do not have dis option.
Or you can implemented your own code for that in a child theme, here is the file path wp-content/themes/Newspaper/parts/header/td-login-modal.php
https://www.screencast.com/t/sIRALBDcd
Or maybe you can try some plugins like WP Terms Popup -> https://wordpress.org/plugins/wp-terms-popup/

Thank you.

Roger_TZH
Participant
#0

Hi,

i have this small peace of code and want it to be shown before the content in every post. in which php-File do i have to place it exactly where? (we will initiate a child theme)


<?php $mycontent=$post->post_content;$word=str_word_count(strip_tags($mycontent));$m=floor($word/200);$s=floor($word%200/(200/60));$est=$m.' Minuten'.', '.$s.' Sekunden';?>
<p style="font-size:8pt;">Geschätzte Lesezeit: <?php echo $est;?></p>

Regards,
Roger

Simion C.
tagDiv Staff

Hi,

You could add that in this section of the theme panel
https://www.screencast.com/t/l098MIdAsN5g
The code will be loaded at all times, and it will not be lost after a theme update.

Or create a child theme, copy the header.php file in it and enter it there
https://forum.tagdiv.com/the-child-theme-support-tutorial/
Updating the theme will not affect the child theme files.

Thanks

Calin
tagDiv Staff

Hi,

In order to be load only the custom color, you’ll need to change the color from theme file for mobile.
If you want to set the color in theme file please provide a link were I can inspect the colors you want to change in theme, but notice, if you make update to the theme this change will be lost, if you do not want to lose the changes you’ll need to use child theme
-> https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thank you for your understanding.

Kyle_newspaper
Participant
#0

Hi
I made a custom post type with the CPT UI plugin and set it for my CPT to have categories and tags.
However I cannot figure out how to display them on the post list of latest posts on Home, category and tags.
I have been through all menu on the Theme panel but nothing found.

Then, I first thought I could make my own pages with tagDiv Composer for the home page and all category and tags.
Although the module elements have the Filter tab to include or exclude Categories and CPT, it does not have the Normal Pagination, only types of Ajax paginations are available.

On the other hand, the Posts Loop element does not have Filter tab.

Now I would alter the code in the child theme files of Newspaper but i don’t know what to do. I am currently figuring out how the code works.

Bogdan B.
tagDiv Staff

Hello,

This could be a plugin conflict so please disable all plugins except the page builder, clear cache and reset cdn files if you use it. Please also check any custom code you might have added to the theme panel or the theme files. If you use a child theme, please switch to the main theme to make sure it does not affect the proper functionality of the theme.

Thank you!

Simion C.
tagDiv Staff

Hi,

Modules from the modules folder can be modified in a child theme
https://forum.tagdiv.com/the-child-theme-support-tutorial/
Create the same directory path to the modules in the child theme as in the main theme, then copy the desired module in the child theme. The flex modules can be modified in the child theme.

Thanks

Simion C.
tagDiv Staff

Hi,

WordPress or the theme don’t have options to remove the URL for the comments. You could remove it with a function in the theme functions file (or child theme)
https://www.screencast.com/t/ttstXm5qO

Here is the function code

function disable_comment_url($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields','disable_comment_url');

Thanks

Bogdan B.
tagDiv Staff

Hello,

This could be a plugin conflict so please disable all plugins except the page builder, clear cache and reset cdn files if you use it. Please also check any custom code you might have added to the theme panel or the theme files. If you use a child theme, please switch to the main theme to make sure it does not affect the proper functionality of the theme.

Thank you!

3ftDeep
tagDiv Member

OK. Thanks.

So, I’m using Flexbox 1. Can I copy / rename this and edit it or add it to my child theme?
Or can I only edit the original file?

3ftDeep
Participant
#0

Hello. I need to add additional information to the post excerpts displayed in any of the category post grids. For example, I need each post excerpt to display a logo at the bottom. I also need each post to display all content rather than just an except.

Is this possible with your theme?
Or, I’ve used ACF to generate the fields I need and produce the code but where do I use this code? What template or what do I create in my child theme to do this?

Thanks in advance

Simion C.
tagDiv Staff

Hi,


@SerenityStore
If it causes problems remove the code. Make tests to see if it works as you want. Modify the modules you want in a child theme, this way you will not loose the customization after a theme update.

By default the theme modules are created to display only the primary category of the post
https://forum.tagdiv.com/primary-category/
Displaying more is not possible by a theme setting, it may also damage the design of the module. Each module will have to be modified in order to allow this.

Maybe in the future such an option will be available, can’t say for sure. Sorry for any inconvenience.

Thanks

Calin
tagDiv Staff

Hi,

You need to uninstall the demo, in this way all data/settings of that demo will be remove, if there will be some posts/pages left, you’ll need to delete them manually.

Also maybe you are interested to a Function Reference/wp dequeue style
-> https://codex.wordpress.org/Function_Reference/wp_dequeue_style
-> https://wordpress.stackexchange.com/questions/189985/how-to-properly-dequeue-scripts-and-styles-in-child-theme

Thank you.

emreerkan
Participant
#0

Hello there,

There is no schema.org support for featured videos. I had to add myself and I want to share it with you. Maybe you’ll include this in the future releases and maybe others find it useful. Thanks.

First of all I suggest using a child theme to accomplish this otherwise you have to alter theme files and these changes might get lost in the next update. Copy under from theme folder to your child theme includes/wp_booster/td_video_support.php file (with folder structure). Change the render method with the one below;


	/**
	 * Render a video on the fornt end from URL
	 * @param $videoUrl - the video url that we want to render
	 *
	 * @return string - the player HTML
	 */
	static function render_video($videoUrl) {
		$buffy = '<div class="wpb_video_wrapper">';
		switch (self::detect_video_service($videoUrl)) {
			case 'youtube':
				$buffy .= '
                    <iframe id="td_youtube_player" width="600" height="560" src="' . 'https://www.youtube.com/embed/' . self::get_youtube_id($videoUrl) . '?enablejsapi=1&feature=oembed&wmode=opaque&vq=hd720' . self::get_youtube_time_param($videoUrl) . '" frameborder="0" allowfullscreen=""></iframe>
                    <script type="text/javascript">
						var tag = document.createElement("script");
						tag.src = "https://www.youtube.com/iframe_api";

						var firstScriptTag = document.getElementsByTagName("script")[0];
						firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

						var player;

						function onYouTubeIframeAPIReady() {
							player = new YT.Player("td_youtube_player", {
								height: "720",
								width: "960",
								events: {
									"onReady": onPlayerReady
								}
							});
						}

						function onPlayerReady(event) {
							player.setPlaybackQuality("hd720");
						}
					</script>
                ';

				break;
			case 'dailymotion':
				$buffy .= '
                        <iframe frameborder="0" width="600" height="560" src="' . td_global::$http_or_https . '://www.dailymotion.com/embed/video/' . self::get_dailymotion_id($videoUrl) . '"></iframe>
                ';
				break;
			case 'vimeo':
				$buffy = '
                    <iframe src="' . td_global::$http_or_https . '://player.vimeo.com/video/' . self::get_vimeo_id($videoUrl) . '" width="500" height="212" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
                ';
				break;
			case 'facebook':
				/**
				 * cache & oembed implementation
				 */
				$cache_key = self::get_facebook_id($videoUrl);
				$group = 'td_facebook_video';

				if (td_remote_cache::is_expired($group, $cache_key) === true) {

					// cache is expired - do a request
					$facebook_api_json = td_remote_http::get_page('https://www.facebook.com/plugins/video/oembed.json/?url=' . urlencode($videoUrl) , __CLASS__);

					if ($facebook_api_json !== false) {
						$facebook_api = @json_decode($facebook_api_json);

						//json data decode
						if ($facebook_api === null and json_last_error() !== JSON_ERROR_NONE) {
							td_log::log(__FILE__, __FUNCTION__, 'json decode failed for facebook video embed api', $videoUrl);
						}

						if (is_object($facebook_api) and !empty($facebook_api->html)) {

							//add the html to the buffer
							$buffy = $facebook_api->html;

							//set the cache
							td_remote_cache::set($group, $cache_key, $facebook_api->html, self::$caching_time);
						}

					} else {
						td_log::log(__FILE__, __FUNCTION__, 'facebook api html data cannot be retrieved/json request failed', $videoUrl);
					}

				} else {
					// cache is valid
					$api_html_embed_data = td_remote_cache::get($group, $cache_key);
					$buffy = $api_html_embed_data;
				}
				break;
			case 'twitter':

				/**
				 * cache & oembed implementation
				 */

				$cache_key = self::get_twitter_id($videoUrl);
				$group = 'td_twitter_video';

				if (td_remote_cache::is_expired($group, $cache_key) === true) {

					// cache is expired - do a request
					$twitter_json = td_remote_http::get_page('https://publish.twitter.com/oembed?url=' . urlencode($videoUrl) . '&widget_type=video&align=center' , __CLASS__);

					if ($twitter_json !== false) {
					$twitter_api = @json_decode($twitter_json);

						//json data decode
						if ($twitter_api === null and json_last_error() !== JSON_ERROR_NONE) {
							td_log::log(__FILE__, __FUNCTION__, 'json decode failed for twitter video embed api', $videoUrl);
						}

						if (is_object($twitter_api) and !empty($twitter_api->html)) {

							//add the html to the buffer
							$buffy = $twitter_api->html;

							//set the cache
							td_remote_cache::set($group, $cache_key, $twitter_api->html, self::$caching_time);
						}

					} else {
						td_log::log(__FILE__, __FUNCTION__, 'twitter api html data cannot be retrieved/json request failed', $videoUrl);
					}

				} else {
					// cache is valid
					$api_html_embed_data = td_remote_cache::get($group, $cache_key);
					$buffy = $api_html_embed_data;
				}

				break;
		}
 		$buffy .= sprintf( '
<script type="application/ld+json">
{
	"@context": "http://schema.org",
	"@type": "VideoObject",
	"name": "%1$s",
	"description": "%2$s",
	"thumbnailUrl": "%3$s",
	"contentUrl": "%4$s"
}
</script>',
 			esc_attr( get_the_title() ),
 			esc_attr( get_the_excerpt() ),
 			get_the_post_thumbnail_url( get_the_ID(), 'featured' ),
 			$videoUrl
 		);
		$buffy .= '</div>';
		return $buffy;
	}

For better indentation and readability see: https://pastecode.xyz/view/399f6207

Catalin
tagDiv Staff

Hy Ml,

Unfortunately, all of these core files cannot be overwritten in Child Theme. You should add them to each theme’s updated because the theme will overwrite all of these files to a new update.

Thanks.

Bogdan B.
tagDiv Staff

Hello,

Sorry but once a demo is loaded the entire demo-style.css file corresponding to that demo will be loaded. If you remove the loading of this file, he demo will no longer receive the specific style. If you do not need to load css, you can simply use the cloud library and import the demo homepage and not use a demo at all on your install.
if you still want to remove the loading of the demo file, you cannot do it from the child theme. you have to modify the main theme files: https://www.screencast.com/t/Z6iibXLf

Thanks

Bogdan B.
tagDiv Staff

Hello,

Sorry but not all files will work from the child theme.
The 2 files unfortunately will not work from the child theme. If you want to edit them, you will need to make the modification in the main theme.

Thank you!

Calin
tagDiv Staff

Hi,

Unfortunately the td_config.php will not work in child theme, you’ll need to make the change in theme file after each update, sorry for the inconvenience.

Thank you for your understanding.

Viewing 25 results - 7,576 through 7,600 (of 12,866 total)