- NewspaperPosts Loop Element
- NewspaperFlex Block Builder and Flex Loop Builder
- Apitd_api_category_top_posts_style::update_key
- Apitd_api_category_top_posts_style::update
- Apitd_api_category_top_posts_style::add
- NewspaperBookmark – Save For Later
- NewspaperModules Builder in Newspaper Theme
- NewspaperFilters and sorting for taxonomies
- NewsmagPage templates
- NewspaperPage templates
- NewspaperSmart Sidebar
- NewspaperChild Theme Support
- ApiAPI – Thumbnail – Introduction
- ApiAPI – Category top section style – Introduction
Hi,
If you want to display custom content in the post pages, probably you need to edit the post template files in the theme. Each post template has a corresponding single and loo-single file – https://www.screencast.com/t/P4ZNnRzOb
The code most likely has a part that needs to be entered in the header file, and maybe something that needs to be placed in the post files, in order to appear on the posts. Try inserting that part in the loop-single file corresponding to the post template you are using. Editing one of the loop files you can see the post structure
– https://www.screencast.com/t/KTW2wRw5ZXyD
Thanks
HI Marius
I have placed the code to optimize the images
I have placed it at the end of “function.php”
I want to know if it’s right where I put it
Here is what I did
<?php
/*
Our portfolio: http://themeforest.net/user/tagDiv/portfolio
Thanks for using our theme!
tagDiv – 2017
*/
/**
* Load the speed booster framework + theme specific files
*/
// load the deploy mode
require_once(‘td_deploy_mode.php’);
// load the config
require_once(‘includes/td_config.php’);
add_action(‘td_global_after’, array(‘td_config’, ‘on_td_global_after_config’), 9); //we run on 9 priority to allow plugins to updage_key our apis while using the default priority of 10
// load the wp booster
require_once(‘includes/wp_booster/td_wp_booster_functions.php’);
require_once(‘includes/td_css_generator.php’);
require_once(‘includes/shortcodes/td_misc_shortcodes.php’);
require_once(‘includes/widgets/td_page_builder_widgets.php’); // widgets
/*
* mobile theme css generator
* in wp-admin the main theme is loaded and the mobile theme functions are not included
* required in td_panel_data_source
* @todo – look for a more elegant solution(ex. generate the css on request)
*/
require_once(‘mobile/includes/td_css_generator_mob.php’);
/* —————————————————————————-
* Woo Commerce
*/
// breadcrumb
add_filter(‘woocommerce_breadcrumb_defaults’, ‘td_woocommerce_breadcrumbs’);
function td_woocommerce_breadcrumbs() {
return array(
‘delimiter’ => ‘ <i class=”td-icon-right td-bread-sep”></i> ‘,
‘wrap_before’ => ‘<div class=”entry-crumbs” itemprop=”breadcrumb”>’,
‘wrap_after’ => ‘</div>’,
‘before’ => ”,
‘after’ => ”,
‘home’ => _x(‘Home’, ‘breadcrumb’, ‘woocommerce’),
);
}
// use own pagination
if (!function_exists(‘woocommerce_pagination’)) {
// pagination
function woocommerce_pagination() {
echo td_page_generator::get_pagination();
}
}
// Override theme default specification for product 3 per row
// Number of product per page 8
add_filter(‘loop_shop_per_page’, create_function(‘$cols’, ‘return 4;’));
if (!function_exists(‘woocommerce_output_related_products’)) {
// Number of related products
function woocommerce_output_related_products() {
woocommerce_related_products(array(
‘posts_per_page’ => 4,
‘columns’ => 4,
‘orderby’ => ‘rand’,
)); // Display 4 products in rows of 1
}
}
/* —————————————————————————-
* bbPress
*/
// change avatar size to 40px
function td_bbp_change_avatar_size($author_avatar, $topic_id, $size) {
$author_avatar = ”;
if ($size == 14) {
$size = 40;
}
$topic_id = bbp_get_topic_id( $topic_id );
if ( !empty( $topic_id ) ) {
if ( !bbp_is_topic_anonymous( $topic_id ) ) {
$author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );
} else {
$author_avatar = get_avatar( get_post_meta( $topic_id, ‘_bbp_anonymous_email’, true ), $size );
}
}
return $author_avatar;
}
add_filter(‘bbp_get_topic_author_avatar’, ‘td_bbp_change_avatar_size’, 20, 3);
add_filter(‘bbp_get_reply_author_avatar’, ‘td_bbp_change_avatar_size’, 20, 3);
add_filter(‘bbp_get_current_user_avatar’, ‘td_bbp_change_avatar_size’, 20, 3);
//add_action(‘shutdown’, ‘test_td’);
function test_td () {
if (!is_admin()){
td_api_base::_debug_get_used_on_page_components();
}
}
/**
* tdStyleCustomizer.js is required
*/
if (TD_DEBUG_LIVE_THEME_STYLE) {
add_action(‘wp_footer’, ‘td_theme_style_footer’);
// new live theme demos
function td_theme_style_footer() {
?>
<div id=”td-theme-settings” class=”td-live-theme-demos td-theme-settings-small”>
<div class=”td-skin-body”>
<div class=”td-skin-wrap”>
<div class=”td-skin-container td-skin-buy”>BUY NEWSPAPER NOW!</div>
<div class=”td-skin-container td-skin-header”>GET AN AWESOME START!</div>
<div class=”td-skin-container td-skin-desc”>With easy <span>ONE CLICK INSTALL</span> and fully customizable options, our demos are the best start you’ll ever get!!</div>
<div class=”td-skin-container td-skin-content”>
<div class=”td-demos-list”>
<?php
$td_demo_names = array();
foreach (td_global::$demo_list as $demo_id => $stack_params) {
$td_demo_names[$stack_params[‘text’]] = $demo_id;
?>
<div class=”td-set-theme-style”>” class=”td-set-theme-style-link td-popup td-popup-<?php echo $td_demo_names[$stack_params[‘text’]] ?>” data-img-url=”http://demo.tagdiv.com/demos_popup/newspaper/large/<?php echo $demo_id; ?>.jpg”></div>
<?php } ?>
<div class=”td-set-theme-style-empty”></div>
<div class=”clearfix”></div>
</div>
</div>
<div class=”td-skin-scroll”><i class=”td-icon-read-down”></i></div>
</div>
</div>
<div class=”clearfix”></div>
<div class=”td-set-hide-show”></div>
<div class=”td-screen-demo” data-width-preview=”380″></div>
<div class=”td-screen-demo-extend”></div>
</div>
<?php
}
}
//print_r(td_global::$all_theme_panels_list);add_filter( ‘jpeg_quality’, create_function(”, ‘return 50;’ ) );
Thanks for the follow-up via mail. To sum-up the problem:
If on td_first_install.php I use the code
// empty -> any version
if (!empty($td_db_version)) {
// wp_parse_args format
$args = array(
'post_type' => array('page', 'post'),
'numberposts' => '10',
'offset' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'meta_query' => array(
'relation' => 'OR',
array('key' => 'td_homepage_loop_filter'),
array('key' => 'td_unique_articles'),
array('key' => 'td_smart_list'),
array('key' => 'td_review')
),
'update_post_term_cache' => false,
);
I get the error
Warning: Invalid argument supplied for foreach() in /home/laplayst/public_html/wp-content/themes/Newspaper/includes/wp_booster/td_first_install.php on line 313
which refers to the line
foreach ($td_review[0] as $filter_key => $filter_value) {
I am not sure where the error is, I am running PHP 5.6 and even if my plugins are disabled the problem persists.
I know it’s the weekend but I hope someone will be able to help before the beginning of next week 🙁
-
This reply was modified 9 years by
SnakeEater.
Hi Simion,
Thank you for your response.
I checked the first issue and it’s only happends on Firefox. Chrome seems to work fine.
The background issue is fixed by activating the parent theme. I only have a functions.php, page.php and header.php besides the style.css in my child theme. I figured out it’s the page.php that is causing the problem.
I don’t just want to throw it out, because it’s in there for a reason, but it has been a while since I’ve edited it. I have no clue what I changed, can you recognize anything?
<?php
/* ----------------------------------------------------------------------------
the default page template
*/
get_header();
//set the template id, used to get the template specific settings
$template_id = 'page';
$loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)
//get theme panel variable for page comments side wide
$td_enable_or_disable_page_comments = td_util::get_option('tds_disable_comments_pages');
//read the custom single post settings - this setting overids all of them
$td_page = get_post_meta($post->ID, 'td_page', true);
if (!empty($td_page['td_sidebar_position'])) {
$loop_sidebar_position = $td_page['td_sidebar_position'];
}
// 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';
}
/**
* detect the page builder
*/
$td_use_page_builder = td_util::is_pagebuilder_content($post);
if ($td_use_page_builder) {
// the page is rendered using the page builder template (no sidebars)
if (have_posts()) { ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="td-main-content-wrap td-main-page-wrap">
<div class="td-container">
<?php the_content(); ?>
</div>
<?php
if($td_enable_or_disable_page_comments == 'show_comments') {
?>
<div class="td-container">
<div class="td-pb-row">
<div class="td-pb-span12">
<?php comments_template('', true); ?>
</div>
</div>
</div>
<?php
}
?>
</div> <!-- /.td-main-content-wrap -->
<?php endwhile; ?>
<?php }
} else {
//no page builder detected, we load a default page template with sidebar / no sidebar
?>
<div class="td-main-content-wrap">
<div class="td-container <?php echo $td_sidebar_position; ?>">
<div class="td-crumb-container">
<?php echo td_page_generator::get_page_breadcrumbs(get_the_title()); ?>
</div>
<div class="td-pb-row">
<?php
switch ($loop_sidebar_position) {
default:
?>
<div class="td-pb-span8 td-main-content" role="main">
<div class="td-ss-main-content">
<?php
if (have_posts()) {
while ( have_posts() ) : the_post();
?>
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php the_title() ?></span>
</h1>
</div>
<div class="td-page-content">
<?php
the_content();
endwhile;//end loop
}
?>
</div>
<?php
if($td_enable_or_disable_page_comments == 'show_comments') {
comments_template('', true);
}?>
</div>
</div>
<div class="td-pb-span4 td-main-sidebar" role="complementary">
<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" role="main">
<div class="td-ss-main-content">
<?php
if (have_posts()) {
while ( have_posts() ) : the_post();
?>
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php the_title() ?></span>
</h1>
</div>
<div class="td-page-content">
<?php
the_content();
endwhile; //end loop
}
?>
</div>
<?php
if($td_enable_or_disable_page_comments == 'show_comments') {
comments_template('', true);
}?>
</div>
</div>
<div class="td-pb-span4 td-main-sidebar" role="complementary">
<div class="td-ss-main-sidebar">
<?php get_sidebar(); ?>
</div>
</div>
<?php
break;
case 'no_sidebar':
?>
<div class="td-pb-span12 td-main-content" role="main">
<?php
if (have_posts()) {
while ( have_posts() ) : the_post();
?>
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php the_title() ?></span>
</h1>
</div>
<div class="td-page-content">
<?php
the_content();
endwhile; //end loop
}
?>
</div>
<?php
if($td_enable_or_disable_page_comments == 'show_comments') {
comments_template('', true);
}?>
</div>
<?php
break;
}
?>
</div> <!-- /.td-pb-row -->
</div> <!-- /.td-container -->
</div> <!-- /.td-main-content-wrap -->
<?php
}
get_footer();
Hello,
I’m wondering if there’s a way to add subtitles to the excerpts of my post, so that the excerpt has a title and a subtitle. I’d like these to display on my homepage. My website is finalfatloss.com
Just wondering if there’s a way to do this.
In another thread, I saw this code that might be useful:
<?php $td_subtitle_module = get_post_meta($this->post->ID, ‘td_post_theme_settings’, true); ?>
<p class=”td-sub-title”><?php if(!empty($td_subtitle_module[‘td_subtitle’])){echo $td_subtitle_module[‘td_subtitle’];} ?></p>
But I’m not quite sure how to integrate it.
Here’s my front-page-php code:
<?php
/* Home page */
get_header();
// display – Your latest posts
// @see https://codex.wordpress.org/Function_Reference/is_home
if (‘posts’ == get_option(‘show_on_front’)) {
?>
<div class=”td-main-content-wrap td-blog-index”>
<div class=”td-container”>
<div class=”td-crumb-container”>
<?php echo td_page_generator_mob::get_home_breadcrumbs(); ?>
</div>
<div class=”td-main-content”>
<?php
locate_template(‘loop.php’, true);
echo td_page_generator_mob::get_pagination();
?>
</div>
</div> <!– /.td-container –>
</div> <!– /.td-main-content-wrap –>
<?php
// display – A static page
} elseif ((‘page’ == get_option(‘show_on_front’)) && is_front_page()) {
//prepare the loop variables
global $paged;
$td_page = get_query_var(‘page’) ? get_query_var(‘page’) : 1; //rewrite the global var
$td_paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1; //rewrite the global var
//paged works on single pages, page – works on homepage
$paged = max( $td_page, $td_paged );
$td_list_custom_title =__td(‘LATEST ARTICLES’, TD_THEME_NAME);
?>
<div class=”td-main-content-wrap td-main-page-wrap”>
<?php
// display Big Grid Mob 1 and the content at the top of the page
if ( empty( $paged ) or $paged < 2 ) { //show this only on the first page
if ( have_posts() ) { ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class=”td-container”>
<?php echo do_shortcode(‘[td_block_big_grid_mob_1 sort=”featured”]’); ?>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<?php }
}
?>
<div class=”td-container td-pb-article-list td-main-content” role=”main”>
<?php if ( empty( $paged ) or $paged < 2 ) { ?>
<h4 class=”block-title”><span><?php echo $td_list_custom_title; ?></span></h4>
<?php }
$posts_per_page = get_query_var(‘posts_per_page’) ? get_query_var(‘posts_per_page’) : 10;
// query used on Latest Articles section
$wp_query_args = array(
‘ignore_sticky_posts’ => 1,
‘post_status’ => ‘publish’,
‘posts_per_page’ => $posts_per_page,
‘paged’ => $paged,
);
query_posts($wp_query_args);
locate_template(‘loop.php’, true);
echo td_page_generator_mob::get_pagination();
wp_reset_query();
?>
</div>
</div>
<?php
}
get_footer();
Thank you.
Best,
Dan
Hi Catalin,
Sorry, young DIY here :). I tried, but somehow it didn’t work.
As my default post template is “default” http://www.screencast.com/t/WVqhl8xyADA, I opened loop-single.php in /wp-content/themes/Newsmag.
I found the code line http://www.screencast.com/t/dIlv0ivnQmo, now can you let me know where I shall paste it ?
Here is the full code:
<?php
/**
* The single post loop Default template
**/
if (have_posts()) {
the_post();
$td_mod_single = new td_module_single($post);
?>
<article id=”post-<?php echo $td_mod_single->post->ID;?>” class=”<?php echo join(‘ ‘, get_post_class());?>” <?php echo $td_mod_single->get_item_scope();?>>
<div class=”td-post-header td-pb-padding-side”>
<?php echo td_page_generator::get_single_breadcrumbs($td_mod_single->title); ?>
<?php echo $td_mod_single->get_category(); ?>
<header>
<?php echo $td_mod_single->get_title();?>
<?php if (!empty($td_mod_single->td_post_theme_settings[‘td_subtitle’])) { ?>
<p class=”td-post-sub-title”><?php echo $td_mod_single->td_post_theme_settings[‘td_subtitle’];?></p>
<?php } ?>
<div class=”meta-info”>
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_views();?>
<?php echo $td_mod_single->get_comments();?>
</div>
</header>
</div>
<?php echo $td_mod_single->get_social_sharing_top();?>
<div class=”td-post-content td-pb-padding-side”>
<?php
// override the default featured image by the templates (single.php and home.php/index.php – blog loop)
if (!empty(td_global::$load_featured_img_from_template)) {
echo $td_mod_single->get_image(td_global::$load_featured_img_from_template);
} else {
echo $td_mod_single->get_image(‘td_640x0’);
}
?>
<?php echo $td_mod_single->get_content();?>
</div>
<footer>
<?php echo $td_mod_single->get_post_pagination();?>
<?php echo $td_mod_single->get_review();?>
<div class=”td-post-source-tags td-pb-padding-side”>
<?php echo $td_mod_single->get_source_and_via();?>
<?php echo $td_mod_single->get_the_tags();?>
</div>
<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo $td_mod_single->get_item_scope_meta();?>
</footer>
</article> <!– /.post –>
<?php echo $td_mod_single->related_posts();?>
<?php
} else {
//no posts
echo td_page_generator::no_posts();
}
Please hep me
I want my comments above tags on posts. I have followed instructions above but there is no changes. Here is links to codes:
Here is the Loop-single-1.php : https://pastebin.com/VSHW2yrN
single_template_1.php: https://pastebin.com/WuEvywku
Thanks. Does the do_shortcode() method match me, just which file do I edit? This one in the link to the screen is one entry I guess? Need to check first in some loop of the number which in the order in the list is the entry and if 4 is followed by it do_shortcode ();
like this:
<?php
$postnum = 0;
while(have_posts()) : the_post();
if($postnum == 3) {
echo do_shortcode (‘[td_block_ad_box spot_id=”custom_ad_1″]’);
$postnum = 0;
}
//view another category entry
$postnum++;
endwhile;
?>
PS. Sorry for my bad english.
Hi,
Social Network accounts can be added in the theme panel using the available options
– https://www.screencast.com/t/hfhZHDnDy
For the post sharing there is not option to add a social at the moment. You could try to use a plugin that could add that button on your website. If you have a shortcode that you must enter, here you can find the post templates in the theme – https://www.screencast.com/t/TTlWf8zxDV7u
Each post template has a corresponding loop single file, by opening one of these files you can see the post structure – https://www.screencast.com/t/KdrDShyLe7w
The default sharing for the posts can be found here
– https://www.screencast.com/t/0S9jdqtH
Thanks
Hi,
There is no option to add blocks in the post content. However, you can try to use a do_shortcode to insert it
– https://www.screencast.com/t/MvdKju9Y58
You must edit the corresponding file to the post template that you are using. For example post template 2, you need to edit loop-single-2.php and insert the block you want in the post structure (below the related article section if that is what you want). Please note that this may not work properly, and cause unexpected results since blocks were not meant to be used in posts. You can try this solution and see if you can manage this, maybe with additional modifications.
This is the code used in the example
<?php echo do_shortcode ('[td_block_1]'); ?>
Thanks
Hi,
I am looking to display the time on a post (i.e: posted on April 30, 2017 @ 10:25:35 pm). I have formatted both date and time under Settings->General but in the post I still show only the date.
I checked the loop-single.php and changed to true the following statement <?php echo $td_mod_single->get_date(true); /?>
It does not display the time, I am still only seeing the date in te posts.
Can you assist
Regards,
KSangoyah
Hi,
The Latest articles section has the same filtering capabilities of blocks, so you could filter and sort the posts that are displayed in this section. This can be done in the post loop settings here
– https://www.screencast.com/t/2x7KZNTMoDvh
More information about page templates here
– https://forum.tagdiv.com/page-templates-2/
Or you could use an offset for the Latest Articles section
– https://forum.tagdiv.com/offset-feature/
Thanks
That does help a lot, Bogdan, and please accept my sincerest apologies, I was referencing the wrong image on my cloud ;-( Hopefully this will make sense now, what I am trying to do is to go from this, which is how the page currently looks on mobile:
http://media.altimac.com.s3.amazonaws.com/images/obits-mobile-A.png
to this:
http://media.altimac.com.s3.amazonaws.com/images/obits-mobile-B.png
so that we can see more than the top of the deceased’s head. It looks like you have given me some clues, though, that I could try either
@media (max-width:767px) {
.category-obituaries .td_module_mob_2 .td-module-thumb {
height: 116px;
}}
Or I could use the API as you noted and do something like
td_api_thumb::update(‘td_???????’,
array(
‘name’ => ‘td_????????’,
‘width’ => 100,
‘height’ => 75,
‘crop’ => array(‘center’, ‘middle’),? ‘none’?
‘post_format_icon_size’ => ‘small’,
‘used_on’ => array(
‘Module 6, 7’, ‘Block 1, 2, 7, 8’
)
)
);
where “td_???????” are the thumbnails that are used in the mobile posts loop page for both the “grid” of the first three listings and then the list of the remainder. I am thinking they are td_324x160 for the grid and td_80x60 for the list of posts following but that is my best guess based on how they look on the mobile theme.
Hello peconiconline,
Please notice that the entire function which creates the title posts is get_title and it is located in td_module_single_base.php core file, like this -> https://www.screencast.com/t/Q90A74w6zr So, this function is called back for each post template used by you in loop-single, according to your post style used by you. For example, if you are using the post template style 1, the title for this post is called in loop-single-1.php, like this -> https://www.screencast.com/t/K3e03wpy
Thanks for your understanding!
Hello vasik,
If you want to affect the posts templates, you should edit the single templates according to your post templates style used by you. For example, if you ar using the Post Template Style 1 yo should edit the loop_single_1.php core files like this -> https://www.screencast.com/t/MlRI1WwoA3f8
Thanks for your understanding!
Hello,
I am attempting to use the WP filter “the_title” to add content to the title on single posts. However, I am having trouble selecting just the post loop.
Without any conditionals, the_title is selecting all the items on the page, including the menu items and the posts inside the mega menu.
Using the conditional “in_the_loop” should select just the single post, but it doesn’t.
Here is the code I am using:
if (in_the_loop()) :
$title = $meta_value . $title;
endif;
return $title;
This doesn’t affect anything on the page, including the single post.
I have also tried is_main_query, but that selects everything, including the menu items and the posts inside the mega menu.
Please advise.
Hi,
I’m working with a site for a magazine and I’m using Newspaper as the theme for the site.
They publish all the articles from their issues on the site, and we’re using a custom taxonomy to categorize the articles into the different issues. I’ve created a specific template to show the custom taxonomy (‘taxonomy.php’), which is a slight modification of the standard archive-template.
The main feed of articles on the site is sorted from the latest to the oldest (the latest article appears first on the site). My problem now is that I want to sort the articles on the issue-pages (that are using taxonomy.php) in reverse order compared to the main feed (from the oldest to the latest).
Can anybody help me with that?
My latest try is to point taxonomy.php to ‘loop-taxonomy.php’ (which is a copy of ‘loop.php’ where I try to sort the posts differently) instead of ‘loop.php’, but with no luck. The modification I’ve done to ‘loop-taxonomy.php’ is this:
//sort posts
query_posts($query_string . '&orderby=date&order=ASC');
if (have_posts()) {
while ( have_posts()...
Thanks in advance!
Hi again,
would it be at least possible to get taxonomies added to the post loop settings. I can´t see a reason why its not there. You can filter posts based on a custom post type. But my post type also has taxonomies i would like to filter for.
I watched your code but you convert the regular wp queries to some custom arrays, at least it looks like that.
Maybe you could provide me with some quick help where and how to add functionality for it?
that would be superb.
Hi,
I have a bit of an issue on my hands.
I have added a custom post type and I am unable to exclude it, from the loop at the bottom of the homepage. I have a total of 3 posts created as my CPT. What I noticed is that only 2 of them are displayed at any given time and they both generate 2*
<div class="td-container tdc-content-wrap">
The CPT is not using the format that I have chosen (for the bottom articles) and it renders the entire content. I have tried filtering the posts by another category, excluding the category of the CPT but with not results.
Any ideas what might cause this issue ?
Thank you!
Hi,
I’d like to have posts with a full width featured image and title but still retain the side bar.
So page elements would be:
Breadcrumbs
Category tag
Title (full width)
Author date
Feature image (full width)
Content with a right side bar.
These websites probably describe it better:
What’s the best way to achieve this layout? Can any of the single or loop templates be modified to do this?
Post style 9 https://demo.tagdiv.com/newspaper/td-post-major-deep-feelings-january-2015-deep-house-mix/ looks closest. Just needs the title and feature image flipping.
Thanks in advance.
Kes
Bogdan! This tutorial of yours worked just perfect!!! Thanks
So here it is in short what I did if you want to try
1. Get your App ID and Code for Comments from Facebook Developers. It is super easy but if you don’t know how to do, there are a lot of how-to on internet. However as a tip you just need to create a new App (for Website) and the use this link to configure the code for your site (https://developers.facebook.com/docs/plugins/comments#configurator)
2. After get your code from FB, you go and aste your big piece of code right after body tag (there is a screenshot about how to do that) http://screencast.com/t/97g6RJdc02cp
3. Change the file of each post templase you use.
In my case I changed all SINGLE_TEMPLATE files instead LOOP_SINGLE files. The only difference between change SINGLE_TEMPLATE files instead of the LOOP_SINGLE ones is the position where the Plugin will be placed. With you go with the Single_Template your comments area will be quite in the end of the post after all things (which I like more because it is more intuitive for users to find you comments area on the bottom). The LOOP_SINGLE files place your comment area after the post itself and before the author box. For me this mess a little the design.
So is you go with SINGLE_TEMPLATE follow this: http://screencast.com/t/wPRAEUTQrkU it should look like so: http://screencast.com/t/ie2S4vTFZ
But if you wnat the comments right after the Post itself change LOOP_SINGLE following this: http://screencast.com/t/TpOJKoUG8g
*** Use this code for the template files (do not use that one facebook says to paste on each page because only this one gets automatic the permalink for each of your posts) >>
<div class=”fb-comments” data-href=”<?php echo get_permalink($td_mod_single->post->ID); ?>” data-width=”100%” data-numposts=”5″></div>
and boom, you have noe a FB Comments plugin working pretty on your website
=D
-
This reply was modified 9 years by
leoforce.
Thank you for your response. I actually already modified td_block__1.php, my problem is that if i remove posts from there, i’m looping over a limited number of posts, and i ended up displaying less posts than supposed for the design.
That number being defined upstream, while creating the post’s loop for that specific block.
So my question is : Can i have any action on the building of the loop via the API (not on how it’s displayed, this part i got it) or is this a customization of the theme that needs to be done in that case ?
Thanks
Hello,
Sorry but categories cannot be treated as pages so you cannot customize the category content as you would pages. Visual composer does not have any such option. Categories are loops of the posts found in that category, not a custom page to show different content. It is not a page but rather an archive, a taxonomy for posts.
Thank you!
Hi,
I’d like to modify posts displayed on Block 1 feature through the API, but i don’t understand if this can be done.
Basically i would like to remove posts of a certain taxonomy.
I don’t get where and how (if ?) i can modify the parameters of the loop ?
Thanks for your help.
Hi!
We are working with Newspaper 7 and we cannot manage to keep active the visual composer (VC) for posts. We set up in the visual composer settings so it will be active for: pages/posts/mega footer but then once we edit any post with the VC once we publish or update it then it comes back to the regular editor and VC disappears..and we need to go back to the setting of the VC and reset again the permissions for pages… we are in this loop for a while now and struggling to solve it!
Thanks in advanced