- Apitd_api_single_template::update_key
- Apitd_api_single_template::update
- Apitd_api_single_template::add
- ApiAPI – Single Template – Introduction
- ApiPractical example – How to add a new Block and Module
- ApiAPI – Category top section style – Introduction
- Apitd_api_module::update
- Apitd_api_module::add
- ApiAPI – Modules – Introduction
- Apitd_api_block::update
- Apitd_api_block::add
- ApiAPI – Blocks – Introduction
- ApiUsing the Theme API in plugins
Please can you add the ‘category__not_in’ field for each component because I don’t want to overwrite your stuff each time.
Regards,
ex:
class td_slide extends td_block {
function __construct() {
$this->block_id = 'td_slide';
add_shortcode('td_slide', array($this, 'render'));
}
function render($atts){
$this->block_uid = td_global::td_generate_unique_id(); //update unique id on each render
extract(shortcode_atts(
array(
'limit' => 5,
'sort' => '',
'category_id' => '',
'category_ids' => '',
'category__not_in' => '',
....
function get_map () {
//get the generic filter array
$generic_filter_array = td_generic_filter_array::get_array();
//add custom filter fields to generic filter array
array_push ($generic_filter_array,
+array(
+ "param_name" => "category__not_in",
+ "type" => "textfield",
+ "value" => '',
+ "heading" => "Exclude posts from categories id (, separated)",
+ "description" => "",
+ "holder" => "div",
+ "class" => ""
+),
In td_data_source
class td_data_source {
static $fake_loop_offset = 0; //used by the found row hook in templates to fix pagination. The blocks do not use this since we use custom pagination there.
/**
* converts a pagebuilde array to a wordpress query args array
* creates the $args array from shortcodes - used by the pagebuilde + widgets + by the metabox_to_args
* @param string $atts : the shortcode string
* @param string $paged : page number /1 or /2
* @return array
*/
static function shortcode_to_args($atts = '', $paged = '') {
extract(shortcode_atts(
array(
'category_ids' => '',
'category_id' => '',
+ 'category__not_in' => '',
...}
if (!empty($category__not_in)) {
$wp_query_args['category__not_in'] = explode(',', $category__not_in);
}
Hi,
Thanks @TheMediumUTM!
Using .widget class will not work because the block dose not have a parent container with that class, best will be to use the css like this:
.td-post-sidebar .td_mod6 {
border-bottom: 1px solid #7d7d7d;
}
Result: http://screencast.com/t/oxKbz3Sd8ca1
This will work only for post page template, you need other css for other sidebars.
Thanks
Hi,
Sorry for the delay. I have checked your site and noticed that you use the Homepage with background template so the big slider from the top of the page doesn’t have any posts because you don’t have any posts in your featured category, you need to add posts into featured category which will show up in the slider.
You already have the layout at 1170px which is the full width layout.
Thanks
First, to set a page as your homepage, do this:
1. Create a page and call it “Home” or something.
2. Go to WordPress’s “Reading” settings and set it to use a static page. Then you can choose the page you made.
Then you can customize your homepage by editing that page you made.
If you edit it and see the normal WordPress editing screen, click the blue “Backend Editor” button, which will take you to Visual Composer’s editing view.
From there, you will see the rows and columns that make up your homepage. If you want, set the homepage template at the right, from one of tagDiv’s basic ones. Then you can click on the + icons to add an element. For example, a slider, a Big Slider, a Revolution Slider at the top.
Then the main part of your homepage is usually made up of block elements. The demo homepage is made of blocks set to show their categories. When you edit a block’s settings, that’s when you would make them show your categories — and many other options.
Hope this is helpful! Post again if anything’s unclear.
Hello,
I just noticed this morning that my Home Page Template is missing. It’s still running on my site http://www.tribyoot.org, but the page is missing from the Admin and so I cannot access it using WP Bakery or otherwise.
Do you have any idea why this might happen and how I can recover it? I have tried disabling all plugins, cleared caches and restarted the site. It’s running on the front end, so it’s there somewhere, just no longer named Home Page.
I hope you can help.
Philip
It’s found in the folder when you download all the files from Themeforest. 🙂
They really should add a note about this in the documentation, as it’s standard practice to include version info with file downloads. However most folks new to webdev would not know that.
Note the files:
*changed_files_4.2_4.2.14.2.1.html
*update_log.txt
[ V 4.2.1 ]
– fix categories display in Theme panel -> Categories
– fix Revolution Slider z-index issue with menu behind
– fixed footer copyright text problem with some characters
– fixed social counter + twitter
– social counter – added no follow on links
– classic blog – text logo fix
– classic blog – menu colors fix
– classic blog – boxed version fix
– fixed sidebar bug on template + loop
—————-
Newspaper theme
Here is a list of all the changes between v 4.2 and v 4.2.14.2.1
Modified files – 17 files
•footer.php
•includes\wp_booster\td_config.php
•includes\wp_booster\td_css_generator.php
•includes\wp_booster\td_page_generator.php
•js\min\site.min.js
•less_files\editor-style.less
•less_files\menu-top.less
•less_files\pagebuilder\td_revolution_slider.less
•less_files\post-templates.less
•less_files\stacks.less
•page-homepage-bg-loop.php
•page-homepage-loop.php
•parts\menu-header-center.php
•sidebar.php
•style.css
•wp-admin\images\post-templates\post-templates-icons-5.png
•wp-admin\panel\views\panel_categories.php
Deleted files – 0 files
•none
New files – 0 files
•none
Hi,
The best way to do this is to use VC to add your post content and then add a block into your post content which is set to infinite load: http://screencast.com/t/RAFpBqRJqF
Enable VC on post editing panel from here: http://screencast.com/t/fCBxUJiLksw
Another way would be to use the do_shortcode() function and add the code inside post template. You can create the shortcode for the block using page builder then switching to classic mode just get the shortcode and add it into the function then into the template where you want to show up. If you don’t know how to do this we recommend you to hire freelancer to do it for you.
Hope this helps!
Thanks
Hi Christopher,
As you can see the div of the sidebar has just two classes span4 column_container and it’s a bit harder to target just the sidebar via css and change it’s background color as long as a div just like that is used in the footer also and changing the sidebar will get you changing the footer also, here is an example: http://screencast.com/t/rPW4QDKyh
You can do it tough by adding a specific class on each template you want to change the sidebar color then use that class to target the sidebar and change it’s color via custom css. Here is an example for the category page template: http://screencast.com/t/bTwprqfBwJ and the result: http://screencast.com/t/MNts8tpk
using this css:
.custom-sidebar-background {
background-color: lightgray;
}
You can add this class for all templates and use it to change the sidebar’s background color.
Another thing that you should take into consideration is that the sidebar doesn’t have any padding so you would want to add some padding to it using the same class, but keep in mind that the some blocks may react not in an expected way to this padding because of the width.
Also, as you probably noticed, the post page sidebar has a class which you can use .td-post-sidebar
Regarding the option on panel for this we will leave this at everyone’s hand and use this method to achieve this. This option will be available though within our new theme which we are working on.
Hope this helps!
Thanks
-
This reply was modified 11 years by
Lucian.
Wellllllll…. I had trade some posts with RADU on this topic in hopes he might add a custom field on the user page for an author image loaded locally (this can be hacked from the functions.php file; I did this with one of my own responsive themes in 2011 pre-bootstrap which was insane — three column layouts without bootstrap were really a freaking pain for responsive; float right inside a float right … ugh!).
This was on my to do list before I got sick … and was just thinking the same thing 🙂
You would think there would be plugin for this, since really all it takes is adding new field to user meta for each user; then calling that from the theme author box template.
This may be my Labor Day weekend project ! 🙂
example how to on this topic of adding custom user meta
http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields
in the above case we’d be replacing a twitter field with a user photo field, where we could put in local URL to the user photo (e.g., /uploads/my-name-here_100x100.jpg); then call that in the Newspaper theme.
Hi,
This theme also supports custom shortcodes, you can add the shortcodes on category page using the do_shortcode() function, like this: http://screencast.com/t/0dkXGyKB
Result: http://screencast.com/t/mq3fjjZvd
Thanks
-
This reply was modified 11 years by
Lucian.
Hello,
some themes support custom shortcodes on category pages (top and below) or a category header-picture (e.g. post stlye 3 could look great here), this may be easier to implement. In my case, I’m going to replace category pages by custom pages but it’s really complicated, yes.
-
This reply was modified 11 years by
davistar.
Hi
I want to change the Page Navigation of the homepage. I am using the Homepage – bg + latest articles template for my homepage. I would like to change it to this: http://screencast.com/t/FUOGk506
Please tell me where the code is situated, so that I can edit it by myself. And if possible, just give me the code 🙂
Thanks!
Hello,
I have updated the Newspaper Theme from version 3.8.4 to version 4.2. Since doing so, the Big Slider template used on our front page is no longer using the generated thumbs of the featured categories’ posts featured images. When looking at the page source, I see that it is using the full sized original image and using img width and img height values to constrain the generated thumb that do not correspond to what image sizes that are specified for the Big Slider template. I have re-generated my thumbs and this doesn’t help.
Any ideas?
Peter
Hi,
I know that there are some users that requested that we implement custom layouts on category pages… This particular feature is VERY hard to do right (with pagination support and also the possibility to change the second page). No other theme has this kind of feature because of that.
We have over 150 feature requests and we have to allocate resources very carefully to the ones that benefit the most users.
Hi,
Thanks @TheMediumUTM!
@CSTAwestminster
Sorry for the delay! Please make sure you have posts in the featured category as the first slider the one that is inserted into page by the “Homepage – bg + with article list” template it displays post from the featured category. If you want to display posts from other categories you can do it like this: https://forum.tagdiv.com/topic/big-slide-background-homepage-doesnt-show-any-post/#post-18910
Hope this helps!
Thanks
Hi,
Thanks @mehedi!
@sbo
You can use a plugin like Advanced Custom Fields and use the following method or similar way like shown here: https://forum.tagdiv.com/topic/function-to-hide-ads-and-function-to-show-author/#post-8993
Or you can create a condition into the category page template and based on category ID you can chose to display certain ads, you can hire a freelancer from sites like: http://studio.envato.com/ to do it for you if you don’t know how to do it yourself.
Hope this helps!
Thanks
Some elements in child them won’t over-ride certain custom modules, so to “hack” a new feature into an existing module (not a page template), it requires hacking the parent, unfortunately.
Likely you will need to locate the file which has the login widget code and edit it to put in generic links on that dropdown, or add query if the links are unique to each user.
If you look in your theme folder, under includes > widgets > td_login_widget.php
you would likely add the links there.
e.g.,
echo '<ul class="top-header-menu td_ul_logout">
<li class="menu-item">
<a href="#" class="td_user_logd_in">' . $current_user->display_name . '</a>
</li>
<li class="menu-item">
<span class="td-sp td-sp-ico-logout"></span>
<a href="' . wp_logout_url(home_url()) . '">' . __td("Logout") . '</a>' .
get_avatar($current_user->ID, 20) .
'</li>
</ul>';
Always good to “explore” the files and folders for the theme to look at what is there, as this is often the starting point for any special customizations not built into the theme itself. Most of the stuff “included” onto pages/posts that are not main templates are found in the /includes/ folder.
Hope that helped! 🙂
Medium, I agree with the images being small. I had planned on fixing those problems once I have the layout finished.
The top slider should, if I’ve read the documentation right, be holding the Big Slider. I’ve chosen the Homepage template in the Visual Composer list with the Homepage – bg + with article list. So that Big slider should be sitting in the location that it looks like you’re missing slides. Instead it seems to have pulled beneath it, leaving the box open above.
Good point about the weekend. I work so much I forget the days of the week. Thank you for your help though, I appreciate it.
Hi Lucian,
I want, when access some categories, that website show some different layout. So i will make some page (use visual composer), with a page define for a category.
How to custome? If you have tutorial for problem, please send me.
Best regards,
My pleasure. I ended up not using cache plugin, since mod_pagespeed does great job in combination with server-based cache since it doesn’t have to run through the php system or wordpress code as a caching “plugin” does. You *can* use one, but I found it didn’t help much really and caused too many issues when I need to update a page or template.
Trick is knowing how to clear the cache on server when you go to update the theme to clear out everything before and after upgrade so web browsers can “see” the new versions of the style sheets.
But I think you’ve got it 🙂
Hi,
1. You can use the "Homepage - bg" template with or without the article list and full layout like this: http://screencast.com/t/LXRL8Yqn and you will get this result: http://screencast.com/t/IvREH9NKGvD4
2. It’s possible, you cloud try to add your own image and then replace it within modules/sliders.. besides wordpress default cropping sizes http://screencast.com/t/ifk8fE1HYk and we added more sizes inside the functions.php file – http://screencast.com/t/2QaaubXnqxL you can also add your own there and then use it.
Those sizes are used on modules and sliders (including the Big Slider) , you can read here about the thumbs used on modules and sliders – https://forum.tagdiv.com/modules-and-blocks/
You also have to regenerate thumbs after you add a new image size.
About the cropping modes, you can create your own images sizes and use it like I said before, hare are some more info about this:
1. http://codex.wordpress.org/Function_Reference/add_image_size
2. http://www.davidtan.org/wordpress-hard-crop-vs-soft-crop-difference-comparison-example/
Hope this helps!
Thanks
Hi,
Please install the demo data from theme panel > welcome http://screencast.com/t/NOYhjn6gnV the “Homepage 4” layout should come with the demo data then you will be able to edit the page and see how it’s built.
Or add a new page and add the following shortcodes in the page like this: http://screencast.com/t/GypkMSlFewI
[vc_row][vc_column width="1/1"][td_slide_big category_id="207" limit="8" hide_title="hide_title"][/vc_column][/vc_row]
You will need to set the page template to “Homepage – with article list” like this: http://screencast.com/t/z0kdaXL3Zp
You also need enough posts for this to work.
The best way it’s to install the demo data then you will get this homepage.
Thanks
Hi,
Yes, you can use the “Homepage – bg – no article list” page template for your Homepage http://screencast.com/t/VTFrs9KuFE And then you can hide the big slider using this css:
.page .td-big-slide-background .td_block_big_grid {
display: none;
}
Result: http://screencast.com/t/Zwocn3wz26aU
Thanks
Hi,
I’m trying to use the page template “Homepage – bg with article list” but when I see the page, the Big Slide with the color background doesn’t show any latest post. You can see the attachment.
I set the maximum post to 4.
Am I doing something wrong?