Search Results for 'block'

Results from the Forum
fbengo
Participant
#0

Hi guys,

I really wanted to show ‘related articles’ and ‘more from author’ on post page separately. I managed to do this with a little help of the support team. I’m sharing this, because I think it is a nice extra feature.

In the theme option panel you can enable/disable the ‘related article’ module which contains both ‘related articles’ and ‘more from author’. In my case I didn’t want to display ‘more from author’ on posts written by user ‘redactie’, because he is the redactor and 90% of my sites post are written by him. I just wanted to show ‘related articles’ on posts written by user ‘redactie’:

Because my website has a category called ‘expert blogs’ which contains posts that are written by doctors, I wanted to only display ‘more from author’ on posts (expert blogs) written by doctors:

All posts written by other users than ‘redactie’ and all posts with other categories than ‘expert blogs’ should still have displayed both ‘related articles’ and ‘more from author’:

Step 1:

Create backup of theme.

Step 2:

Open Newsmag/includes/shortcodes/td_related_posts.php and go to line 30:

$buffy .= '<h4 class="td-related-title">';
            $buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
            $buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
        $buffy .= '</h4>';

Step 3:

Add $post_cat = get_the_category(); to store the category of the post which contains the ‘related article’ module. The code will be:

$post_cat = get_the_category(); 
        $buffy .= '<h4 class="td-related-title">';
            $buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
            $buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
        $buffy .= '</h4>';

Step 4:

Place

Related articles:

$buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';

AND

More from author:

$buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';

into conditions. In my case:

If author of post is ‘redactie’, only display ‘related articles’:

if (strtolower(get_the_author_meta('display_name', $this->post->post_author)) == 'redactie') {
				$buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
			} 

If category of post is ‘expert blogs’, only display ‘more from author’:

elseif (strtolower($post_cat[0]->cat_name) == 'expert blogs') {			
				$buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
			}

In all other cases, display as normal both ‘related articles’ and ‘more from author’:

else {
				$buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
				$buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
			}

Step 5:

Save and close file.

Step 6:

Open Newsmag/includes/modules/td_module_single.php and go to line 731:

$td_block_args = array (
            'limit' => $td_related_limit,
            'ajax_pagination' => 'next_prev',
            'live_filter' => $td_related_ajax_filter_type,  //live atts - this is the default setting for this block
            'td_ajax_filter_type' => 'td_custom_related', //this filter type can overwrite the live filter @see
            'class' => $td_related_class
        );

Step 7:

Add $post_cat = get_the_category(); to store the category of the post which contains the ‘related article’ module. The code will be:

$post_cat = get_the_category();
         $td_block_args = array (
            'limit' => $td_related_limit,
            'ajax_pagination' => 'next_prev',
            'live_filter' => $td_related_ajax_filter_type,  //live atts - this is the default setting for this block
            'td_ajax_filter_type' => 'td_custom_related', //this filter type can overwrite the live filter @see
            'class' => $td_related_class
        );

Step 8:

Add condition to display ‘expert blogs’ posts by default when only ‘more from author’ is displayed. If you don’t add this condition, ‘related articles’ posts will be displayed by default and you will have to press ‘MORE FROM AUTHOR’ switch manually to load the relevant posts:

if ((strtolower($post_cat[0]->cat_name)) == 'expert blogs') {
			 $td_related_ajax_filter_type = 'cur_post_same_author';
		 }

So in case the posts have ‘expert blogs’ as their category, variable $td_related_ajax_filter_type will be ‘cur_post_same_author’ and the live filter will display ‘more from author’ posts.

Complete code will be:

$post_cat = get_the_category();
		 if ((strtolower($post_cat[0]->cat_name)) == 'expert blogs') {
			 $td_related_ajax_filter_type = 'cur_post_same_author';
		 }
		 
         $td_block_args = array (
            'limit' => $td_related_limit,
            'ajax_pagination' => 'next_prev',
            'live_filter' => $td_related_ajax_filter_type,  //live atts - this is the default setting for this block
            'td_ajax_filter_type' => 'td_custom_related', //this filter type can overwrite the live filter @see
            'class' => $td_related_class
        );

Step 9:

Save (in child theme /modules folder, in case you use child theme) and close file.

Step 10:

Open style.css (in child theme folder, in case you use child theme) and add following code to fix the corners of the module title background:

.td-related-title .single-item {
  border-radius: 3px;
}

Step 11:

Save file and close.

Step 12:

Reopen Newsmag/includes/shortcodes/td_related_posts.php and go to line 33 and add single-item after class="td-related-left td-cur-simple-item

So it will be:

$buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';

Step 13:

Go to line 36 and add td-cur-simple-item single-item after class="td-related-right

So it will be:

$buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';

Step 14:

Save and close file.

Step 15:

Upload all files to your host and we are done! 🙂

Enjoy…

Lukas
Participant
#0

Hi guys,

I have a problem with infinite scroll and/or load more function.

When I use this and more articles load, 5 of them are the same ones as the ones that were displayed already. This is how the block looks like after pressing load more button once – http://postimg.org/image/ayuo97bh9/

Notice also the dates of the articles. They go from 7th of january to 6th and back to 7th.

Is there anything that can be done about this? Is it a bug or is it something that can be set up?

Web: androidportal.sk

Lucian
tagDiv Staff

Hi,

Please also check if other caches aren’t saved as well as the issue with saving settings usually appears because the server security module blocks the access to admin-ajax.php file. Try to verify if this happens when you save settings in other cases in theme panel and also verify the console for error while saving the settings on the Theme Panel, usually it displays a 403 or 404 error.
Contact your server administrator and explain the situation, as it’s requested many times during the a save the file it’s treated as threat so it’s banned. You can report false positives to your server administrator to remove it from the banned list.
Hope this helps! Please let me know and also provide your site’s URL!

Thanks

Alin [tagDiv]
tagDiv Staff

Hi,

“Load More” button works only on blocks. Sorry for inconvenience!
You can disable Big Grid from Theme Panel like this: http://screencast.com/t/eRoD22suckf

Thanks!

vj1023
Participant
#0

Hey NewsMag, A very happy new year.

My website running on your theme looks amazing.

Although after the launch today morning , i have a small bug or a problem blocking my work.

My visitors are unable to comment on my posts.
There is one post where the comments section is working , rest the comments box and the author box above the comment section aren’t clickable.

Here is the post where you can comment : Commentable

Here are the links Non-commentable : Can’t click the comment box or the Author Box.

Look this is not clickable.
Not clickable, Source : http://snag.gy/91axZ.jpg

Here are the settings which i tried for getting it fixed but nothing worked.

1. I selected all the posts and made the comments “allowed”
Comments allowed on every post, source : http://snag.gy/ADJxl.jpg

2. Discussion Settings also i made it open so anyone could come and post comments.
Discussion Panel Settings , source : http://snag.gy/sGqTU.jpg

Lucian
tagDiv Staff

Hi,

1. You have to add it here: http://screencast.com/t/BPsDrUZyaQXb
2. You can so it via css and use this custom css: http://screencast.com/t/eMu0jqpZOt

.post .td-main-content .td-classic-sharing {
display: block;
margin: 0px;
}

.post .td-main-content .td-post-sharing-bottom .td-classic-sharing {
margin: 0px 0px 10px 0px;
}

Thanks

Lucian
tagDiv Staff

Hi,

You can use the recommend size as it is right now and adjust it via css like this: http://screencast.com/t/KFhwg3mJ

.td-head-style8-logo-desktop img {
height: 68px !important;
}

.td-affix .td-head-style8-logo-desktop img {
height: 50px !important;
}

@media (max-width: 1018px) and (min-width: 768px) {
.td-header-style-8 .td-style-8-content-wrapper .td-head-style8-logo-desktop {
display: block !important;
}
}

It can be of the same size(300×100) as it will be re-sized like this: http://screencast.com/t/AZV87Yuhhtb

Thanks

Lucian
tagDiv Staff

Hi,

Please use this custom css to make the arrows and caption filed appear like this: http://screencast.com/t/GwKYl5Dav

.td-doubleSlider-1 .td-slide-item .td-gallery-slide-copywrite {
display: block;
background-color: rgba(21, 19, 19, 0.38);
left: 0px;
text-align:center;
}

.td-gallery-controls-wrapper {
display: inline-block;
}

Thanks

Radu
tagDiv Staff

Hi,
sorry for the delay, that part of the block system is a bit more complicated but here is the modification:


      $td_block_args = array (
            'limit' => $td_related_limit,
            'ajax_pagination' => 'next_prev',
            'live_filter' => 'cur_post_same_author',
            'td_ajax_filter_type' => 'td_custom_related',
            'class' => $td_related_class
        );
  • hide the title or modify it form includes/shortcodes/td_related_posts.php
  • This reply was modified 11 years by Radu.
  • This reply was modified 11 years by Radu.
Lucian
tagDiv Staff

Hi,

The ad could also be blocked, this will also show up in your browser console if you check it.
This troubleshooter could also help: https://support.google.com/adsense/answer/1208336?hl=en

Thanks

Lucian
tagDiv Staff

Hi,

Make sure you add it like this: http://screencast.com/t/q6y00M2JYwx and also make sure you empty cache and check this without any plugins active. As you can see in the screenshot below I have also tested this and works fine.
Add the css pasted below or style it yourself as you like:

.wp-social-login-connect-with {
display: inline-block;
position: relative;
top: -10px;
}

.wp-social-login-provider-list {
display: inline-block;
}

.wp-social-login-provider-list img {
display: inline;
}

Result: http://screencast.com/t/j9ZGOOH54jJu

Thanks

Breakwater
Participant
#0

Is there a way to use the TagDiv Slider Gallery in Visual Composer through one of the VC Elements or Blocks?

I tried to follow the Newsmag documentation for pages and create a TagDiv Slider Gallery through a VC Text Element by using Add Media > Gallery. But the drop down menu didn’t have the TagDiv Slider Gallery option.

I want to be able to add a TagDiv Slider Gallery into a page through VC in any location I want.

Thank you. – Any help would be awesome.

simchris
tagDiv Member

fyi,
you should avoid inline HTML/CSS in posts, and instead create a custom style, then apply the style class to the span or div, as applicable.

Some upcoming security settings may cause browsers to ignore inline CSS altogether (meaning in the body, not inline CSS specified in the head as classes).

so,
For the following post, the editor used direct html code for font size (<span style=”font-size: 24pt;”>)

better to create class,
.ourcustomfs24{font-size:24px; line-height:1.5em}

then do
<span class="outcustomfs24">Our special headline without semantic meaning</span>

We do this for custom sidebar text block in some stories for an info box, and also for custom blockquote, etc.

This also would allow you to create a custom @media query for mobile, just for that style class; such as making the class 16px for the mobile media size.

  • This reply was modified 11 years by simchris.
felizubi
Participant
#0

Hi! Congrats on the great template. In fact I was going to use Newspaper for my site initially —which I bought a month ago— but then I saw Newsmag and had to change my plans and buy this one too.

I am migrating my site from Joomla, and have everything set but a few things that I really need help, please:

1.- I need to hide author on post (both below title and author box) on some categories. I need most of the categories to show the author, but I need to hide it on two or three.
2.- I loved megamenu, and for it to work properly I had to group some categories in a parent category, but this way my permalink get changed, too long (I’m using the custom option /%category%/%postname%/). So, is there a way to have three or four categories on a megamenu without having to group these categories under one parent?
3.- Little white spaces between Video List and Footer, and between Block 2 (black, sidebar) and Video List –> dev site
4.- The image cropping is not working right. Images on Megamenu are being stretched instead of cropped. Is there a way to crop all images (thumbs) on the template?
5.- I customized date format on the top menu, and other format for blocks, but now I need a third format for posts. how can i do this (Post template style 2)?
6.- I need a sidebar widget (Facebook like box) to not show on screens from 768px to 1023px. And how can I center it on the column when showing?
7.- On 2-columns Slider (homepage), is it possible to not show Views and Comments? And is it possible to change the half-opaque-layer to something like this:
Example for the layer for post info.

Regards,
Felipe Z.

fbengo
tagDiv Member

Hi Lucian,

Thanks for your help, but I got a problem:

I tried to display related-posts and more-from-author seperately by adding code beneath to /includes/shortcodes/td_related_posts.php. The problem is that I cannot find a way to load more-from-author posts by default when only the more-from-author switch is being displayed. Displaying related-posts works fine, because the posts are already loaded by default.

Where can I find the default constructor of the posts that are displayed?

//get the filter for this block
        $buffy .= '<h4 class="td-related-title">';
            $post_cat = get_the_category(); 
			if (strtolower(get_the_author_meta('display_name', $this->post->post_author)) == 'redactie') {
				$buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
			}
			elseif (strtolower($post_cat[0]->cat_name) == 'expert blogs') {
				$buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
			}
			else {				
				$buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
				$buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
			}
		$buffy .= '</h4>';

Before pressing ‘MORE FROM AUTHOR’ title (still showing wrong ‘RELATED ARTICLES’posts):

After pressing ‘MORE FROM AUTHOR’ title (showing correct posts):

How can I load the posts like in the 2nd image is displayed by default when only the ‘MORE FROM AUTHOR’ module is displayed?

Please help me, I am trying for so long now….

chizme
Participant
#0

Hi

I want to resize Image Featured . it works with “Block 3”

http://upic.me/show/54168882

Thanks.

Lucas
tagDiv Member

Unfortunately, I originally tried that by editing block 14’s module. That’s how I get the odd timing.

Any other suggestions?

Thanks!

Lucian
tagDiv Staff

Hi,

Sorry for the delay!
You can do it via page builder using the Visual Composer plugin and set your page to full width then chose a custom layout for your page then use the widgetised sidebar element to set an already created sidebar or just build your sidebar adding other VC elements/widgets/blocks: http://screencast.com/t/zwsOdVFTwoE
You can also set a sidebar to the whole page, from here: http://screencast.com/t/R7eysHLebf0
Please also go trough our documentation:
* https://forum.tagdiv.com/homepage/
* https://forum.tagdiv.com/sidebars/

Please provide a link top your site so I can check this or if you use the “Homepage – bg + with article list”
or “Homepage – bg – no article list” page templates make sure you don’t use a slider as those template already add a big slider to the page so you wont need to add another, that’s why you get two slider on page.
You can remove the slider you have added in order to fix this or you can use another template and add it yourself.
Hope this helps!

Thanks

toppbottom
Participant
#0

Per your instruction I have placed this in the custom css to have the “To the Top” button appear on my mobile phone, and although you have provided a screenshot, it still does not appear on my phone. I have an Android (Note 3). I am not sure if that matters, but what can I do at this point to get it to appear? Thanks in advance.


@media
(max-width: 768px) {
.td-scroll-up-visible {
display: block;
}
}

Lucian
tagDiv Staff

Hi,

1. An option for changing the footer text color hasn’t been added there due to the variety of the content you can add there. You can change the text color for module/blocks from panel and you can use custom css for the elements you want to change color of and don’t have an option.

2. That is not an issue as the widgets title are different from the blocks titles and were designed that way. You can also alter that space via custom css and adjust it as you like.

3. Use this css for that: http://screencast.com/t/NbnPWh7fH

@media (max-width: 767px){
.td-footer-container .td-pb-span4, .td-footer-container .td-pb-span8, .td-footer-container .td-pb-span12 {
padding-bottom: 0px !important;
}

.td-footer-container .widget_nav_menu {
padding-bottom: 0px;
margin-bottom: 0px;
}
}

4. Use this css for that: http://screencast.com/t/Or8noyKw

.td-footer-container .block-title > a, .td-footer-container .block-title > span {
background-color: red;
}

5. I will add this on our feature requests list, however we have almost 200 feature requests and we have to pick very carefully what we implement, thanks for the suggestion though, we will consider it.

6. Replied here: https://forum.tagdiv.com/topic/heading-slider-module-missing-in-mobile-version/#post-32694

7. We will take a look at this and fix it in next theme versions if we find something wrong wit it as I haven’t managed to recreate this.

Thanks

Lukas
Participant
#0

Hi there,

I have finally made everything I wanted to, apart from archives. They weirdly show only 3 articles per page (which is a setting from homepage VC builder). Am I seriously blind or is there a way to change this?

Alternatively, is there a way to build a homepage using blocks without the need to have the latest articles at the bottom?

Many thanks! 🙂
Lukas

Lucian
tagDiv Staff

Hi,

You can find the filter code here: http://screencast.com/t/u7qzUKxPfia8
Here is the related posts block: http://screencast.com/t/sKzqfmuG9LRa
Hope this helps!

Thanks

Alin [tagDiv]
tagDiv Staff

Hi,

We already know about this issue(text block with title) and we have it on our todo list and will fix it in next theme version.
Please use a Text Block for title: http://screencast.com/t/Il0C7DVwpUn and another Text Block for shortcode.

Sorry for the inconvenience!
Thanks!

Lucian
tagDiv Staff

Hi,

If you refer to this sort option which appears on blocks: http://screencast.com/t/I0tGsAJZ you can remove it from here: http://screencast.com/t/8JM0TYEqV

Thanks

Lucian
tagDiv Staff

Hi,

The unique articles feature dose work well. If you set the unique articles feature on your page then each posts will only show once so if you set the latest articles on all blocks then the because of this feature the posts will only appear on the top of the pages and will be excluded form the blocks that follow.
Please note that this feature also applies to the thicker: http://screencast.com/t/MOn3lDro so the posts that appear here will be excluded from the blocks below.
You can used it like that by setting a sport order for it like “popular (all time)” or “highest rated” : http://screencast.com/t/rjwL48nRwlP
We will also consider changing it’s functionality and set it as the posts added there don’t affect the unique articles feature on page.

Thanks

Viewing 25 results - 37,301 through 37,325 (of 39,816 total)