Search Results for 'child theme'

    No search results were found in Documentation!

Results from the Forum
Mike_D
tagDiv Member

I have the same problem

These are the guidelines for breadcrumbs schema
https://developers.google.com/search/docs/data-types/breadcrumb

The correct html should look like this
<div itemscope itemtype="http://schema.org/BreadcrumbList">
<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">

<span itemprop="name">Home</span>

</span>
<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">

<span itemprop="name">Category</span>

</span>
<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">

<span itemprop="name">This page</span>

</span>
</div>

This is an important signal for SEO. It was implemented last year. To fix it in Newspaper theme means creating a custom post template to replace the td breadcrumbs div.

Forget trying a child theme. That doesn’t work.

booksama
tagDiv Member

There are little edit things in the top left-hand corner of the pictures. Sure I can hide them with CSS. But I want them to not show up.

I did that admin bar removal code in the child theme. Did not work. Used a plugin and that worked. Would rather use the code though.

NickDeBaerdemaeker
tagDiv Member

Also, the need to implement the api is still there.
We have painstakingly created a custom “alphabetical letter” taxonomy to display all posts on one page using a keyword, all posts that have keyword A on page A etc etc.

However since we can not select a custom taxonomy on the tagdiv composer when filtering posts (only categories are allowed) we are stuck.

We have implemented this text into the plugin, which gets us the ARTICLE DISPLAY VIEW icons on the theme panel. however when we select them the page reverts back to the default. could you point us in the right direction please ?

<?php
/*
Plugin Name: td-api-plugin
Plugin URI: http://tagdiv.com
Description: tagDiv API plugin
Author: tagDiv
Version: 1.0
Author URI: http://tagdiv.com
*/
class td_api_plugin {
    var $plugin_url = '';
    var $plugin_path = '';
    var $root = '';
    function __construct()
    {
        $this->root = get_site_url();
        $this->plugin_url = plugins_url('', __FILE__); // path used for elements like images, css, etc which are available on end user
        $this->plugin_path = dirname(__FILE__); // used for internal (server side) files

        add_action('td_global_after', array($this, 'hook_td_global_after')); // hook used to add or modify items via Api
    }
    function hook_td_global_after() {

//Add new modules
   
td_api_module::add('td_module_20',
            array(              
                'file' => $this->root . "/wp-content/themes/newspaper-child/includes/modules/td_module_20.php",
                'text' => 'Module 20',
                'img' =>  $this->root . '/wp-content/themes/newspaper-child/images/panel/modules/td_module_20.png',
                'used_on_blocks' => array('td_block_25'),
                'excerpt_title' => 30,
                'excerpt_content' => 50,
                'enabled_on_more_articles_box' => false,
                'enabled_on_loops' => true,
                'uses_columns' => true,                      // if the module uses columns on the page template + loop
                'category_label' => true,
                'class' => 'td_module_wrap td-animation-stack',
                'group' => '' // '' - main theme, 'mob' - mobile theme, 'woo' - woo theme
            )
        );

        td_api_module::add('td_module_21',
            array(
                'file' => $this->root . "/wp-content/themes/newspaper-child/includes/modules/td_module_21.php",
                'text' => 'Module 21',
                'img' => $this->root . '/wp-content/themes/newspaper-child/images/panel/modules/td_module_21.png',
                'used_on_blocks' => array('td_block_21'),
                'excerpt_title' => 15,
                'excerpt_content' => '',
                'enabled_on_more_articles_box' => true,
                'enabled_on_loops' => true,
                'uses_columns' => true,                      // if the module uses columns on the page template + loop
                'category_label' => true,
                'class' => 'td_module_wrap',
                'group' => '' // '' - main theme, 'mob' - mobile theme, 'woo' - woo theme
            )
        );

    }
}

new td_api_plugin();

the text in module 20 for instance looks like this:

<?php

class td_module_20 extends td_module {

    function __construct($post, $module_atts = array()) {
        //run the parrent constructor
        parent::__construct($post, $module_atts);
    }

    function render() {
        ob_start();
        $title_length = $this->get_shortcode_att('m20_tl');
        ?>

        <div class="<?php echo $this->get_module_classes();?>">
            <div class="td-module-image">
                <?php echo $this->get_image('td_150x150');?>
                <?php if (td_util::get_option('tds_category_module_20') == 'yes') { echo $this->get_category(); }?>
            </div>
            <?php echo $this->get_title($title_length);?>

            <div class="td-module-meta-info">
                <?php echo $this->get_author();?>
                <?php echo $this->get_date();?>
                <?php echo $this->get_comments();?>
            </div>

            <?php echo $this->get_quotes_on_blocks();?>

        </div>

        <?php return ob_get_clean();
    }
}

We have created pages for each letter which each run their specific post template, which looks like this:
<?php
/*
Template Name: archief albumrecensie a
*/

get_header();

//set the template id, used to get the template specific settings
$template_id = 'archive';

//prepare the loop variables
global $loop_module_id, $loop_sidebar_position, $part_cur_auth_obj;
$loop_module_id = td_util::get_option('tds_' . $template_id . '_page_layout', 1); //module 1 is default
$loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)

// sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
$td_sidebar_position = '';
if($loop_sidebar_position == 'sidebar_left') {
$td_sidebar_position = 'td-sidebar-left';
}

//read the current author object - used by here in title and by /parts/author-header.php
$part_cur_auth_obj = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));

//prepare the archives page title
{
$td_archive_title = get_the_title();
}

?>

<div class="td-main-content-wrap td-container-wrap">
<div class="td-container <?php echo $td_sidebar_position; ?>">
<div class="td-crumb-container">
<?php echo td_page_generator::get_archive_breadcrumbs(); // get the breadcrumbs - /includes/wp_booster/td_page_generator.php ?>
</div>
<div class="td-pb-row">
<?php
switch ($loop_sidebar_position) {
default:
?>
<div class="td-pb-span8 td-main-content">
<div class="td-ss-main-content">
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php echo $td_archive_title; ?></span>
</h1>
</div>

<?php locate_template('loop-albumrecensies-a.php', true);?>

<?php echo td_page_generator::get_pagination(); // get the pagination - /includes/wp_booster/td_page_generator.php ?>
</div>
</div>

<div class="td-pb-span4 td-main-sidebar">
<div class="td-ss-main-sidebar">
<?php get_sidebar(); ?>
</div>
</div>
<?php
break;

case 'sidebar_left':
?>
<div class="td-pb-span8 td-main-content <?php echo $td_sidebar_position; ?>-content">
<div class="td-ss-main-content">
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php echo $td_archive_title; ?></span>
</h1>
</div>

<?php locate_template('loop-albumrecensies-a.php', true);?>

<?php echo td_page_generator::get_pagination(); // get the pagination - /includes/wp_booster/td_page_generator.php ?>
</div>
</div>
<div class="td-pb-span4 td-main-sidebar">
<div class="td-ss-main-sidebar">
<?php get_sidebar(); ?>
</div>
</div>
<?php
break;

case 'no_sidebar':
?>
<div class="td-pb-span12 td-main-content">
<div class="td-ss-main-content">
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php echo $td_archive_title; ?></span>
</h1>
</div>
<?php locate_template('loop-albumrecensies-a.php', true);?>

<?php echo td_page_generator::get_pagination(); // get the pagination - /includes/wp_booster/td_page_generator.php ?>
</div>
</div>
<?php
break;
}
?>
</div> <!-- /.td-pb-row -->

<div class="archiefmenutitel"></br></br><h1 class="entry-title td-page-title">ARCHIEF</h1></div>
<div class="albumrecensiesabc">
<?php wp_nav_menu( array( 'theme_location' => 'albumrecensiesabc' ) ); ?>
</div>
</div> <!-- /.td-container -->
</div> <!-- /.td-main-content-wrap -->

<?php
get_footer();

and finally the loop it uses
<?php
/**
* If you are looking for the loop that's handling the single post page (single.php), check out loop-single.php
**/

// $global_flag_to_hide_no_post_to_display - comes from page-category-big-grid.php and is a flag to hide the 'No posts to display' message if on category page there are between 1 and 5 posts
global $loop_module_id, $loop_sidebar_position, $global_flag_to_hide_no_post_to_display;

///if we are in wordpress loop; used by quotes in blocks to check if the blocks are displayed in blocks or in loop
td_global::$is_wordpress_loop = true;

$td_template_layout = new td_template_layout($loop_sidebar_position);

if (empty($loop_module_id)) { //not sure if we need a default here
$loop_module_id = 1;
}

$td_module_class = td_api_module::_helper_get_module_class_from_loop_id($loop_module_id);

//disable the grid for some of the modules
$td_module = td_api_module::get_by_id($td_module_class);
if ($td_module['uses_columns'] === false) {
$td_template_layout->disable_output();
}

$args = array(
'post_type' => 'post',
'posts_per_page' => '-1',
'meta_key' => 'keyword',
'orderby' => 'meta_value',
'order' => 'ASC',
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'alphabetical_letter',
'field' => 'term_id',
'terms' => array( '441' ), //this is by slug
),
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => array( 'muziek-recensies' ), //this is by id
),
),

);

// The Query
query_posts( $args );

// The Loop

if (have_posts()) {
while ( have_posts() ) : the_post();
echo $td_template_layout->layout_open_element();

if (class_exists($td_module_class)) {
$td_mod = new $td_module_class($post);
echo $td_mod->render();
} else {
td_util::error(__FILE__, 'Missing module: ' . $td_module_class);
}

echo $td_template_layout->layout_close_element();
$td_template_layout->layout_next();
endwhile; //end loop
echo $td_template_layout->close_all_tags();

} else {
/**
* no posts to display. This function generates the __td('No posts to display').
* the text can be overwritten by the themplate using the global @see td_global::$custom_no_posts_message
*/

echo td_page_generator::no_posts();
}

all of this was working fine since all of the code was directly implemented in the td config php file, which gets overwritten when you update the theme. all I thought I would have to do is implement the said code in the plugin api but clearly this isn’t how it should be done. I’m fearful that weeks of work on this alphabetical archive have been for nought…

Bogdan B.
tagDiv Staff

Hello,

No, we do not recommend using a child theme unless you plan on code modifications in the php file. that is the one and only scenario a child theme should be used for. You do not need it otherwise.
As for the images, please note that each block uses a different thumbnail to show the images. You can check the different thumb sizes used in our theme here: https://www.screencast.com/t/zH5FMYs9

Thank you!

sg123321
Participant
#0

I recently upgraded Newspaper 6 to Newspaper 8 and I am noticing that the Custom Links in all VC Single Image modules cease to render and ignore any parameters entered into custom_link field. The hyperlink is replaced with only a single hashmark and the field is ignored. I have attempted to edit the raw text as well as using the WPBakery Page Builder and the fields are saved and editable but ignored when rendered in both. I have also attempted to manually use the parameter “link” as well as “img_link” by editing the raw shortcode in the build-in WordPress editor in Text mode and it also fails to render.

Here is an example of the raw shortcode text using the build-in WordPress view to show the raw code that I am attempting:

[vc_single_image image="14780" img_size="full" onclick="custom_link" img_link="/breast-health/" el_id="breast-health-link" link="/breast-health/"]

And here is how the VC Single Image is rendered in the DOM:

<a class="td_single_image_bg" style="background-image: url('https://[REDACTED IMAGE URL HERE].jpg'); background-size: cover; background-repeat: no-repeat; background-position: center center;" href="#" rel="bookmark"></a>

You can see that neither the href field is being populated from the link or img_link field, nor the id field from the el_id field is being rendered.

These fields works perfectly fine in Newspaper 6, but not on the upgraded Newspaper 8.8.2. I have attempted to render this in a child theme of Newspaper 8 as well as the native Newspaper 8 theme and both fail. The plugin versions in use are

  • WPBakery Page Builder 5.5.1
  • td-api-plugin 1.0.2
  • tagDiv Speed Booster 4.9.1
  • tagDiv Social Counter 4.4
  • tagDiv Composer 2.3
  • tagDiv Books custom post types sample 1.0
  • Slider Revolution 5.4.8

Hopefully someone can point me in the right direction to fix this.

Thanks.

NickDeBaerdemaeker
Participant
#0

Hello,
I had made two custom modules, editing the td config file directly. Upon updating the theme I quickly found out I should have used the theme api plugin to avoid having everything erased. However I can’t get it to work.

I followed the tutorial offered on the site, creating the td-api-plugin folder and php file.
The php file includes following text, do I need to alter the $this->plugin_url and $this->plugin_path ?
If so how would I need to do this.

I am working with a newspaper-child theme and the address of the site is currently v2.enola.be,
which will change in the future to http://www.enola.be so I want to be prepared for that too.

thanks for your kind assistance

Nick

<?php
/*
Plugin Name: td-api-plugin
Plugin URI: http://tagdiv.com
Description: tagDiv API plugin
Author: tagDiv
Version: 1.0
Author URI: http://tagdiv.com
*/
class td_api_plugin {
var $plugin_url = '';
var $plugin_path = '';
function __construct()
{
$this->plugin_url = plugins_url('', __FILE__); // path used for elements like images, css, etc which are available on end user
$this->plugin_path = dirname(__FILE__); // used for internal (server side) files

add_action('td_global_after', array($this, 'hook_td_global_after')); // hook used to add or modify items via Api
}
function hook_td_global_after() {

//Add new modules

td_api_module::add('td_module_20',
array(
'file' => $this->plugin_path . "/includes/modules/td_module_20.php",
'text' => 'Module 20',
'img' => $this->plugin_url . '/images/panel/modules/td_module_20.png',
'used_on_blocks' => array('td_block_25'),
'excerpt_title' => 30,
'excerpt_content' => 50,
'enabled_on_more_articles_box' => false,
'enabled_on_loops' => true,
'uses_columns' => true, // if the module uses columns on the page template + loop
'category_label' => true,
'class' => 'td_module_wrap td-animation-stack',
'group' => '' // '' - main theme, 'mob' - mobile theme, 'woo' - woo theme
)
);

td_api_module::add('td_module_21',
array(
'file' => $this->plugin_path . "/includes/modules/td_module_21.php",
'text' => 'Module 21',
'img' => $this->plugin_url . '/images/panel/modules/td_module_21.png',
'used_on_blocks' => array('td_block_21'),
'excerpt_title' => 15,
'excerpt_content' => '',
'enabled_on_more_articles_box' => true,
'enabled_on_loops' => true,
'uses_columns' => true, // if the module uses columns on the page template + loop
'category_label' => true,
'class' => 'td_module_wrap',
'group' => '' // '' - main theme, 'mob' - mobile theme, 'woo' - woo theme
)
);

}
}

new td_api_plugin();

Simion C.
tagDiv Staff

Hi,

From what I can see the website at the moment has functionality issues. There are js errors in inspector console. These seem to affect the header search, all block pagination maybe others as well
https://www.screencast.com/t/QqquTuHruN

Most issues like this are caused by plugins or code entered in the theme panel, theme files or child theme. Check all of these one at a time.
Deactivate all your plugins except theme plugins as a quick test, temporarily remove codes you entered in the theme panel (ad codes, custom codes, scripts etc). Clear the cache and purge CDN if used. If you use a child theme deactivate it. After each step check if the issue is solved.

1. From what I can see there is a logo set, but the URL to it leads to a 404 page, maybe it does not exist anymore? You could check if that is the case
https://www.screencast.com/t/4d2QjZEfl
https://exoportail.com/wp-content/uploads/2018/04/B52C23D441642022E54593A5ED5AAA6F8D7FDF98091A86F380pimgpsh_fullsize_distr.png

2. So you set a background in the theme panel and only you as logged in see this background. I see a background color at the moment
http://prntscr.com/kaqn9b

3. Users could be receiving a cached version of the website. That would explain the fact that they see a different version of the website. Also check with a different browser while logged in.

Do you use any website optimization or minification plugins? Or image optimization plugins or services?
This kind of plugins or services could be the cause for all the previous mentioned issues. Temporarily deactivate them all if you do. Check if this solves the problems.

Thanks

Simion C.
tagDiv Staff

Sorry my mistake, no need to copy the file, the child theme already has a functions file
https://www.screencast.com/t/9Tl8nerWTq
Leave the main functions file of the theme where it is, enter codes in the child theme functions file. Sorry again for my mistake.

ananas
tagDiv Member

as soon as i copy the function file to my child theme, my site is completely empty, even if I don’t change the code at all

Simion C.
tagDiv Staff

Hi,

Add it to the functions file, in the child theme would be better. This is the functions file
https://www.screencast.com/t/fBboeXBr
Copy the file in the child theme and enter the desired codes.

From the theme booster folder not all files are supported
https://forum.tagdiv.com/the-child-theme-support-tutorial/

ananas
Participant
#0

Hi,
if I add something to the file wp_booster_functions or another file in the same folder in my child theme, then my site crashes or the change is not displayed. If I make the same change to the file in the original theme, however, the desired change occurs.
What do I have to consider if I want to add a function to this file?

Simion C.
tagDiv Staff

Hi,

Most issues with images are caused by plugins or code entered in the theme panel, theme files or child theme. Check all of these one at a time. Deactivate all your plugins except theme plugins, temporarily remove codes you entered in the theme panel (ad codes, custom codes, scripts etc). If you use a child theme deactivate it. After each step check if the issue is solved.

The multiple errors in the website suggest a conflict
https://www.screencast.com/t/DEkp7BkDpzbA
Try what I suggested, hopefully you can identify the cause of the image problem.

Also be sure to check the theme requirements carefully, insufficient resources provided by the server and inactive required modules will cause the theme and theme plugins to not function correctly
https://forum.tagdiv.com/requirements-for-newspaper/
The WP memory can be set higher if possible and allowed by the host, for most users a value of 256M is sufficient. Let us know what you find.

Thanks

Simion C.
tagDiv Staff

The files that are supported by the child theme can be modified in it. Once the child theme is active the files will be served from it, not the main theme.

Using a child theme is considered a safe way to modify theme files without losing changes when the main theme is updated. Some more useful information here
https://www.wpbeginner.com/beginners-guide/wordpress-child-theme-pros-cons/
https://wpapprentice.com/blog/wordpress-child-theme-need-one/

Simion C.
tagDiv Staff

What you did is correct. You need to copy the file in the child theme, then modify it. Maintain the same directory path to the file when copying files from various theme folders
https://forum.tagdiv.com/the-child-theme-support-tutorial/

Bogdan B.
tagDiv Staff

Hello Javier,
This usually happens due to low memory. Please use this guide to increase your memory allocation: https://forum.tagdiv.com/requirements-for-newspaper/
Plugins can also be a possible cause 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!

Ashish
tagDiv Member

Before upgrading do a test upgrade on your localhost to see if everything works perfectly! and do backup your site.
Because I have tested in fresh WP install and renamed the main theme and child theme for this test.

Berbi
tagDiv Member

Thanks for the tip. I have simply copied the full loop-single.php in my child theme, then I addded the code line you sugested, and it works.

Yet I guess I don’t have to copy the full loop-single.php in the child theme. What would be the shortest code to implement in the loop-single.php of the child theme ?

Many thanks in advanced :).

Brad
Participant
#0

I downloaded and installed Newspaper today but haven’t been able to edit any pages. I’ve deactivated all non-theme plugins—except for site required like WooCommerce—and still have not been able to get it to load. All I get is a white/gray screen without anything else loading. Green lights on the system status screen. Behavior occurs with both the parent and child themes. Also after installing the demo content. No dice.

Any suggestions for troubleshooting?

tgarmon032071
Participant
#0

I have purchased two Newspaper license codes to use the theme on two different sites. One website is https://hattiesburgpatriot.com. The theme is working on this site. I also have https://politisippi.com. The theme is not working on that site I uploaded both theme files to the server and both child themes to the server. I activated them both, including the child themes. Politisippi will not load the theme properly, while hattiesburgpatriot.com works great. Please advise.

Sundial
tagDiv Member

Hi Simion! It does with both the core and child themes. Thanks!

srikant
tagDiv Member

Hi I am not using any CSS code in the theme panel or not usea any child theme.
Also Tried to disable all plugins Include ( theme tagdiv plugins ) the problem remain same
Next tried to active only theme plugins ( which i get bundled with the theme ) clear browser cache, cookies.
Open the web page but still its results the same.

Also Tried purge CDN files, As per my knowladge disableing the Cache plugin ( CDN service get disconnected ) so i dont think its related to CDN cache. by the way i have purged CDN cache on my side.

As per your suggestion added the Custom CSS : https://snag.gy/jzmgxN.jpg
but the problem is still there.

Even i have check the same on my mobile, its also showing centered

Tell me what i have to do ?

Simion C.
tagDiv Staff

Hi,

Something is setting that property to the body of your website, I can’t tell exactly what where it is coming from. It also sets a height value for the body.
These are not coming from the theme. The theme does not align the whole body, each element has design of it’s own.

If you are not using any CSS code in the theme panel or use a child theme, then maybe it is a plugin. That would be easy to tell, deactivate theme all (except theme plugins) and check if the issue is fixed. Maybe clear the cache as well, also purge CDN files.
Or maybe use another code to deny this one, but that may lead to other issues. You could give it a try

body {
text-align: initial;
}

Thanks

miguel_dimase
tagDiv Member

Because it could be useful for someone else and as a kind of clausure, after reading all your references I want you to know that I choose to work with the child style.css file and Notepadd++, copying styles as needed from my “historic” migueldimase.css file, instead of queueing it (to prevent performance issues, etc.)

What I mainly wanted was to be able to use an external editor AND an insurance against the possibility that an upgrade or some malfunction stepped on my custom styles, using a file that “did not belong” to the theme.

Thanks again for your assistance, Simion.

Simion C.
tagDiv Staff

Hi,

So when activating the composer that message is displayed, despite having the latest version of the theme (8.8.2) and using the latest version of composer
https://www.screencast.com/t/u30vobcD6
That would be unusual, does it happen if you deactivate the child theme?

Berbi
Participant
#0

Hi there,

I am looking to display the last updated date close the articles’ date of creation. I found this code on the net (here https://www.wpbeginner.com/wp-tutorials/display-the-last-updated-date-of-your-posts-in-wordpress/) :
******************************************************
function wpb_last_updated_date( $content ) {
$u_time = get_the_time(‘U’);
$u_modified_time = get_the_modified_time(‘U’);
if ($u_modified_time >= $u_time + 86400) {
$updated_date = get_the_modified_time(‘F jS, Y’);
$updated_time = get_the_modified_time(‘h:i a’);
$custom_content .= ‘<p class=”last-updated”>Last updated on ‘. $updated_date . ‘ at ‘. $updated_time .'</p>’;
}

$custom_content .= $content;
return $custom_content;
}
add_filter( ‘the_content’, ‘wpb_last_updated_date’ );
**************************************************************

The above code is to be implemented in the functions.php main theme file.

And my question is : what would be the correct code to implement in functions.php child theme ?

Thanks in advanced :).

Viewing 25 results - 7,951 through 7,975 (of 12,866 total)