PS: On a similar note, it doesn’t acknowledge links in the sidebar. I wanted to put my “cornerstone” content as a permanent link in the sidebar. But Yoast seems to want you to link to your cornerstone content in the body of each post.
Actually, ignore my second post. The canonical link should have been:
https://vrnation.tv/category/animated-shorts/
My mistake.
I’m still wondering if those settings are correct.
Actually, it’s even worse. When I link to the page above, it redirects to the template.
Help!
I too struggled this problem. But there’s an easier way to do this. Right click on the word “Row” and click delete…
Where would I find the equivalent code for cloud templates. Adding target=”_blank” works on the built in templates, but I wanted to do the same thing on a customized cloud template?
Thanks!
My previous post should be deleted so as not to confuse someone trying to follow in my footsteps, but I can’t seem to delete it. I was barking up the wrong tree. I found the code in
/public_html/wp-content/plugins/td-cloud-library/state/single/tdb_state_single.php
Line 1031-1032
$next_post = get_next_post();
$prev_post = get_previous_post();
Should be changed to:
$next_post = get_next_post(true);
$prev_post = get_previous_post(true);
And then the next and previous buttons in your custom cloud templates will also follow the same category.
I found this snippet of code in wp-content/plugins/td-cloud-library/shortcodes/single/tdb_single_next_previous.php.
It seems to control the next and previous posts for any single post template that has been opened by TD-Composer. If you use the untouched template, the technique mentioned above works for me. But when I switch to a custom template, it starts showing next and previous based on date, regardless of category.
It there a way to edit this code below to make it stay within its category for next and previous posts?
I’d really appreciate any help.
function render( $atts, $content = null ) {
parent::render( $atts ); // sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
global $tdb_state_single;
$post_next_prev_data = $tdb_state_single->post_next_prev->__invoke();
$prev_post = !empty( $post_next_prev_data[‘prev_post_url’] ) ? true : false;
$next_post = !empty( $post_next_prev_data[‘next_post_url’] ) ? true : false;
$buffy = ”;
if( $prev_post || $next_post ) {
$post_next_prev_data[‘prev_post_title’] = empty( $post_next_prev_data[‘prev_post_title’] ) ? ” : $post_next_prev_data[‘prev_post_title’];
$post_next_prev_data[‘next_post_title’] = empty( $post_next_prev_data[‘next_post_title’] ) ? ” : $post_next_prev_data[‘next_post_title’];
Nevermind. Increasing the php memory limit to 256 MB fixed it.
This trick seems to work for me, but only for the existing single post page templates. I created a cloud template and added the next/previous element in TD composer, but it seems to call from a different file, rather than “td_module_single_base.php”
If I could find and edit that file, it would really make my day.