Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
NickDeBaerdemaeker
tagDiv Member

ok thanks. any idea why the css is so big and taking such a long time to load, consequently ? I have added custom code via the theme panel but it looks like something else happened here too. I will check with a fresh download of the theme how big the style.css normally should be.

NickDeBaerdemaeker
tagDiv Member

I actually run into the same issue, seems to happen if one uses the mega menu.

NickDeBaerdemaeker
tagDiv Member

I had to remove the code <span>-</span> from the td module.php in the parent theme to get rid of it. (tried adding the php file to the child theme in the booster folder but that didn’t work)
I couldn’t find where the issue originates from, and it appeared after the last update of the new theme version 9, so to my mind it is likely a theme issue yes.

NickDeBaerdemaeker
tagDiv Member

Neither can I.

I tried copying module.php to the child theme with the span class removed but that doesn’t do the trick either. Only way then is to do it in the main theme.

I’ve tried everything I could now, removing my own custom css code too but to no avail.

NickDeBaerdemaeker
tagDiv Member

I should add that I am using the cloud templates and have a seperate cloud template made for this category, so maybe this is changeable in this template somehow ?

NickDeBaerdemaeker
tagDiv Member

yes and no, depends really.

No, if you want to filter the posts via the tagdiv composer. That option is really missing and much needed for what we wanted to do but sadly I’m no expert coder so I failed for 3 weeks straight.

Yes, but this was only for our alphabetical index we have used the posts table pro plugin which did the job perfectly.
https://barn2.co.uk/wordpress-plugins/posts-table-pro/

It allows filtering with taxonomies but I’m not sure if it would work with displaying full posts.

have a look, who knows it might be what you need.

NickDeBaerdemaeker
tagDiv Member

Solved it in the meantime, like so
<div class="post-title"><?php echo $td_mod_single->get_title();?><h1 class="entry-title"><?php if (empty(get_field('concertlocatie')) === false): ?><span class='location'><?php echo the_field('concertlocatie'); ?></span><?php endif; ?></h1></div>

with this css added

h1 {display: inline}

.location::before {
content: " - ";
}

so unless there’s another way around this to code it I think this works.

NickDeBaerdemaeker
tagDiv Member

Hi and thank you,

it’s http://v2.enola.be/2018/08/10/deus-2/

I have currently enclosed both pieces of code in a div like so, not sure if it’s necessary though.

<div class="post-title"><?php echo $td_mod_single->get_title();?><h1 class="entry-title"><?php echo the_field('concertlocatie'); ?></h1></div>

NickDeBaerdemaeker
tagDiv Member

I can do that, just thought it was programmable somewhere

NickDeBaerdemaeker
tagDiv Member

This would be a great feature as I’m looking for the exact same solution as well, hopefully with one of the next updates 😉

NickDeBaerdemaeker
tagDiv Member

this whas what I was looking for, however the height restriction would be useful if this can be included in a future update.

NickDeBaerdemaeker
tagDiv Member

I’m afraid that’s not what I’m asking.

In the menu I make us of mega menu categories.
I really need to make the “album recensies” show up in photo’s to the right,
whereas the link should point to the page http://v2.enola.be/albumrecensies/ instead of the category: http://v2.enola.be/category/muziek/muziek-recensies/

Can this be done in the mega menu block file ?
I tried writing a redirect url instruction in the functions but it’s simply not responding at all.

$url = 'http://v2.enola.be/category/muziek/muziek-recensies';
$my_var = 'category/muziek/muziek-recensies';

$url = str_replace("albumrecensies", $my_var, $url );

NickDeBaerdemaeker
tagDiv Member

no, none of them work anymore.
I can get the extra field to show in the tagdiv composer but that’s it really.

I looked into the option of the first link but wouldn’t know where to alter in the tdblock.php

NickDeBaerdemaeker
tagDiv Member

yes, custom taxonomies should be added to the filter options of the blocks. I’ve been literally breaking my head on trying to come up with a solution for our alphabetical index…

NickDeBaerdemaeker
tagDiv Member

Ok.

The tagdiv composer uses categories but not custom taxonomies to choose from to display a list of posts.

However it does support custom post type. Is it possible to show custom posts, with the custom taxonomy “alphabetical letter” ?

For instance the cd “Blackstar” would have category “albumreview” and alphabetical letter “ B”

If i can make a custom post type alphabetical letter, show the a,b,c… taxonomy there, would the tagduv composer then show a drop down list of the custom post type with the alphabet in it ?

If so what would be a good way to achieve this ?

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…

NickDeBaerdemaeker
tagDiv Member

the menu was made via wordpress itself. odd thing is that I can get menu to show there, but ticking the box inline doesnt alter it, it keeps showing as a list though. might have to add some additional css there.

NickDeBaerdemaeker
tagDiv Member

ok I think I got it. I had created custom category pages by hand, but I can now make a page via tagdiv, display the category I choose and adjust accordingly.

two questions though.
I want to add in an additional menu below like the way it is shown currently on http://v2.enola.be/category/muziek/muziek-recensies/

Also I need to set the image size to be square, is there any place I can set this ?

NickDeBaerdemaeker
tagDiv Member

I’ll look into it, will probably come in handy for the front page.
we’d like to use this however on a category page, would this method work there as well ?
http://v2.enola.be/category/muziek/muziek-recensies/

NickDeBaerdemaeker
tagDiv Member

Normally yes, but I’ve made custom loops etc that cause the tagdiv composer to not work…

So, I take it creating a new page using tagdiv might be an option.
Is it possible to show posts from a certain category, with a certain taxonomy ?

The point is that we are trying to make the posts appear from category musicreviews, which have the taxonomy alphabetical letter A on one page.

And later on posts from category livereviews, which are also in the taxonomy alphabetical letter A on a different page…

NickDeBaerdemaeker
tagDiv Member

Thanks.

So technically if I create taxonomy templates like those for the categories and refer to them it might work ?

NickDeBaerdemaeker
tagDiv Member

Ok, solved it myself so nevermind.
Had set the number of post limit manually so it all got overridden.

NickDeBaerdemaeker
tagDiv Member

perfect thank you very much. will get on this asap 🙂

NickDeBaerdemaeker
tagDiv Member

Hi, no this is not what I meant 🙂
We would like the design to be the same as our front page.

Currently the categories title is displayed with the red dots in the front and back.
We’d like to have it look like our sections on the front page which is block style 9, with a red underline.

NickDeBaerdemaeker
tagDiv Member

Is there a request page/address to ask for this feature or does it suffice that you know about it 🙂

Viewing 25 posts - 26 through 50 (of 52 total)