- Apitd_api_top_bar_template::update_key
- Apitd_api_top_bar_template::update
- Apitd_api_single_template::update_key
- Apitd_api_single_template::update
- Apitd_api_footer_template::update_key
- Apitd_api_footer_template::update
- Apitd_api_smart_list::update_key
- Apitd_api_smart_list::update
- Apitd_api_thumb::update_key
- Apitd_api_thumb::update
- Apitd_api_category_top_posts_style::update_key
- Apitd_api_category_top_posts_style::update
- Apitd_api_category_template::update_key
- Apitd_api_category_template::update
- Apitd_api_module::update_key
- Apitd_api_module::update
- Apitd_api_block::update_key
- Apitd_api_block::update
- Apitd_api_header_style::update_key
- Apitd_api_header_style::update
Hi,
i updated plugin & theme but still the values of the social media is not correct. Do i have to do something else to have the right value ?
I just implemented AMP and quick question about these two topics.
1, I did a custom code to show that last updated date instead of the post created date. The tagDiv AMP Plugin is showing the created date on AMP pages. Is there any plan to implement this feature to display updated date on both Desktop and AMP pages?
2, How to implement AMP auto adds on the AMP page? (that required to add two pieces of code between header and body). Any dedicated header text area on Theme panel?
I know that custom taxonomies are (currently) not a supported filter in the tagdiv page composer. Sadly for my client this function has become quite a turning point and a critical one that I really need to solve if I wish to deliver a working finished website.
So, following a couple of suggestions on here that it might be possible, I started looking into this, only to reach partial success.
As far as I know, this custom build will be overwritten with any new update so I know that if I get this working I need to reprogram this.
So, here’s what I got so far.
The filtering is defined in the td_config file, and I have based my trials upon the category function.
(basically copying it and adjusting it to what I thought/think should work)
I have copied and then altered this code:
array(
"param_name" => "category_id",
"type" => "dropdown",
"value" => td_util::get_category2id_array(),
"heading" => 'Category filter:',
"description" => "A single category filter. If you want to filter multiple categories, use the 'Multiple categories filter' and leave this to default",
"holder" => "div",
"class" => "tdc-dropdown-big",
'group' => $group
),
into this code
array(
"param_name" => "taxonomy_id",
"type" => "dropdown",
"value" => td_util::get_taxonomy2id_array(),
"heading" => 'ABC filter:',
"description" => "A single category filter. If you want to filter multiple categories, use the 'Multiple categories filter' and leave this to default",
"holder" => "div",
"class" => "tdc-dropdown-big",
'group' => $group
),
this breaks the website.
I keep seeing td_util::get_category2id_array so I am guessing (correct me if I am wrong) that this refers to the file found in wp booster folder “td_util.php”.
In that file I found indeed the get_category2id array arguments so I performed the same trick again.
Turning this code
/**
* generates a category tree, only on /wp_admin/, uses a buffer
* @param bool $add_all_category = if true ads - All categories - at the begining of the list (used for dropdowns)
* @return array
*/
private static $td_category2id_array_walker_buffer = array();
static function get_category2id_array($add_all_category = true) {
if (is_admin() === false) {
return array();
}
if (empty(self::$td_category2id_array_walker_buffer)) {
$categories = get_categories(array(
'hide_empty' => 0,
'number' => 1500
));
$td_category2id_array_walker = new td_category2id_array_walker;
$td_category2id_array_walker->walk($categories, 4);
self::$td_category2id_array_walker_buffer = $td_category2id_array_walker->td_array_buffer;
}
if ($add_all_category === true) {
$categories_buffer['- All categories -'] = '';
return array_merge(
$categories_buffer,
self::$td_category2id_array_walker_buffer
);
} else {
return self::$td_category2id_array_walker_buffer;
}
}
into this
/**
* generates a taxonomy tree, only on /wp_admin/, uses a buffer
* @param bool $add_all_taxonomy = if true ads - All taxonomies - at the begining of the list (used for dropdowns)
* @return array
*/
private static $td_taxonomy2id_array_walker_buffer = array();
static function get_taxonomy2id_array($add_all_taxonomy = true) {
if (is_admin() === false) {
return array();
}
if (empty(self::$td_taxonomy2id_array_walker_buffer)) {
$taxonomys = get_taxonomys(array(
'hide_empty' => 0,
'number' => 1500
));
$td_taxonomy2id_array_walker = new td_taxonomy2id_array_walker;
$td_taxonomy2id_array_walker->walk($taxonomies, 4);
self::$td_taxonomy2id_array_walker_buffer = $td_taxonomy2id_array_walker->td_array_buffer;
}
if ($add_all_taxonomy === true) {
$taxonomies_buffer['- All taxonomies -'] = '';
return array_merge(
$taxonomies_buffer,
self::$td_taxonomy2id_array_walker_buffer
);
} else {
return self::$td_taxonomy2id_array_walker_buffer;
}
}
and a bit further down this
class td_category2id_array_walker extends Walker {
var $tree_type = 'category';
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
var $td_array_buffer = array();
function start_lvl( &$output, $depth = 0, $args = array() ) {
}
function end_lvl( &$output, $depth = 0, $args = array() ) {
}
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
$this->td_array_buffer[str_repeat(' - ', $depth) . $category->name . ' - [ id: ' . $category->term_id . ' ]' ] = $category->term_id;
}
function end_el( &$output, $page, $depth = 0, $args = array() ) {
}
}
into this
class td_taxonomy2id_array_walker extends Walker {
var $tree_type = 'taxonomy';
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
var $td_array_buffer = array();
function start_lvl( &$output, $depth = 0, $args = array() ) {
}
function end_lvl( &$output, $depth = 0, $args = array() ) {
}
function start_el( &$output, $taxonomy, $depth = 0, $args = array(), $id = 0 ) {
$this->td_array_buffer[str_repeat(' - ', $depth) . $taxonomy->name . ' - [ id: ' . $taxonomy->term_id . ' ]' ] = $taxonomy->term_id;
}
function end_el( &$output, $page, $depth = 0, $args = array() ) {
}
}
Alas to no avail.
I know you guys don’t support the taxonomies in the tagdiv (why I don’t know) and that you simply dont have time to do this kind of custom builds, but could you help me out on this one.
What am I doing wrong or is this really the complete wrong way to try to achieve what I want ?
once again, the custom taxonomy that I have made is called “alphabetical letter”.
1. На всякий случай создайте бэкап текущего сайта.
2. Удалите через ftp полностью папку с Темой на вашем сервере / хостинге: не бойтесь, все опубликованные статьи и материалы никуда не денутся:
Your content will not be lost, but please note that if you have modifications to the theme code they will be lost. You have to reapply them after the update is over.
3. Залейете на это же место новую версию Темы.
Более подробно читайте тут:
How to update the theme – https://forum.tagdiv.com/how-to-update-the-theme-2/
Обновляйте тему через ftp (см. пункт A. Update the theme via FTP)
Перевод скопирован
Hello. Please tell me how to update with Newspaper v7.0.1. before Newspaper v8.7.5 ?
Hi how can they update the themes without losing configurations?
Filippo
Hello yahav,
I have inspected your source page and I have noticed that you are using an old theme version, like 8.1.1. It’s too old and deprecated theme version! Please make a full backup to your database and update the theme via FTP way, clear all the caches and check the results.
Thanks for your understanding!
Hello trungnx,
Yes, that’s a good idea! Please notice that the feature will be implemented in near future updates. Please follow our changelog from Theme Forest because there you will find all of the improvements.
Thanks for your understanding!
Hello pakdefense,
Please make a full backup to your database and then, update the theme to the latest version of it which is NP 8.8.2, remove all of the untested plugins and check the results. Also, you can update the theme to another sub-domain for testing and check the results. If the problem is still there, please send us an email at contact@tagdiv.com with your log-in information (wp-admin) so we can take a closer look at it. Notice that’s needed to update the theme if you want to achieve better theme’s results.
Thanks for the message!
Dear, I always update the plugin through theme panel and I cleared all caches before and after the update. But, after each update I recieved the msg that I showed in attach pic and I have to manually update the files which mentioned by the note.
Hello,
The latest version of Woocommerce is 3.4.4 as you can see here -> https://www.screencast.com/t/OmiA92kqNY8 Try to update it from the theme panel, clear all the caches and check the results. There’s no needed to manually update it.
Thanks for the message!
I have updated the guide.
Disabling Stylesheet added by the Multipurpose plugin.
//Remove Multi Purpose Style
add_action( 'wp_enqueue_scripts', 'infophilic_remove_multi_purpose', 20 );
function infophilic_remove_multi_purpose() {
wp_dequeue_style( 'td-plugin-multi-purpose' );
}
Hello,
Unfortunately, the theme api does not allow this kind of implementation to be done through a plugin. If you alter the main theme php files, you will have to re-apply the modification after updating. There is no update proof way of customizing the theme files. Sorry
Thanks
I have tried multiple times to delete and re-create the shop page, but this also not worked for me. The ONLY AND ONLY solution worked for me is to re-upload the theme files, but I don’t know what faulty files are replaced with the new files and the problem fixed temporarily. I am more than 100% sure that when I update the theme with the new version then the problem will occur again. That’s why I am asking you dear to please dig further deep to identify the true culprit behind this annoying problem. As you know that re-upload the theme files can cause serious problems sometimes. So I want to avoid it. Hope you understand.
Dear, whenever I tried to change the name of the Shop Page even in capital or small letters, then this issue happens. For instance, when I tried to rename the page SHOP from Shop, then this thing happens. In the recent case, I have changed the main logo of the website and that’s all and this problem appears again. This is what I have experience so far.
As far as the theme update is concerned; I was using the theme 8.5 and when I switched over to 8.7, then then this issue resolved temporarily, but re-appears after some time for strange reasons. Previously, I have tried to re-upload the theme files to cover this issue and the issue solved temporarily only. That’s why I am asking you to please look into the matter that what thing actually is causing this problem.
I tried it but it doesn’t seem to update. See the screen shots here https://drive.google.com/drive/folders/13E7wUsbrxfway-cfsncXrc4F00fLGmPL?usp=sharing
Hello
With the new updates, the buttons have a really nice looks.
For example:
https://www.virtualmagie.com/contact/annoncer-sur-virtualmagie-com/
But the problem is the other buttons on the site look very cheap in regards.
Some example with the contact form:
https://www.virtualmagie.com/contact/
or the shop:
https://www.virtualmagie.com/boutique/livres-de-magie-papier/en-route-john-guastaferro-francais/
Before you add this in a new update, could you please provide some CSS code transform all other buttons on the same look like the big round one?
Thanks
Recently we updated to newspaper 8.8 and everywhere that we’ve used the “single image” module in wpbakery is now not working. It is filling the module with the image as a background image instead of letting us define the image size.
You can see multiple examples on our site, but here is a page with two modules (the logo and the bottom photo)
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…
-
This reply was modified 8 years by
NickDeBaerdemaeker.
Now that is unusual, why would it re-appear by itself. Are you doing something specifically before it happens?
Please try what I mentioned above. The update guide will help you.
By your description the issue is solved after you reinstall the theme, reinstall the latest theme version this time.
Dear, whenever I tried to update the wooCommerce plugin, then the screen shows me that some wooCommerce files are missing and one of the files I recently manually update is arvhive_product.php.
What files exactly are you updating? mention all the steps you are doing, what are you doing before the issue happens and what you are doing to fix it.
There would be no need to update anything in the theme files or plugin files, or work with any files.
Let’s better continue the discussion here since you started another topic.
Dear, the reason is that whenever I re-update the theme, then issue resolves temporarily, but it reappears after sometime. I don’t know why it appears and why it disappears after theme re-upload. Please help me to sort out this issue on permanent basis.
Hi,
I don’t know what exactly is causing that issue. I have made many tests with Woocommerce and this is not happening for me. There are many other users that use Woocommerce with our theme, so far I have only seen this two times.
It seems Woocommerce replaces the container of the shop page with it’s defaults.
I would suggest that you first update the theme to the latest version
– https://forum.tagdiv.com/how-to-update-the-theme-2/
If the shop page is still like that, send us an email at contact@tagdiv.com and provide admin access, we will investigate more. Include a link to this topic in the email.
I would like to display posting time or last update time of the post in Block, is there any way to do this. Right now it is only support for posting date. But my site is use for display news so I need to display the time when the content is post to audience.