I tried to implement as per your instructions. Please check this screenshot it was with the_field.
I don’t know where i am making a mistake. I again changed the code to get_field and it still remains the same. Here you can see it.
Here is the full code of loop-single-1.php in which i am inserting.
<?php
/**
* The single post loop for post template 1
**/
if (have_posts()) {
the_post();
$td_mod_single = new td_module_1($post);
//show the breadcrumb
if (get_post_type($post) == 'post') {
echo td_page_generator::get_single_breadcrumbs($td_mod_single->title);
} else {
echo td_page_generator::get_page_breadcrumbs($td_mod_single->title);
}
?>
<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();?>>
<header>
<?php echo $td_mod_single->get_title();?>
<div class="meta-info">
<?php echo $td_mod_single->get_category();?>
<?php //echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_commentsAndViews();?>
</div>
</header>
<?php if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) { ?>
<p class="td-sub-title"><?php echo $td_mod_single->td_post_theme_settings['td_subtitle'];?></p>
<?php } ?>
<?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('art-big-1col');
}
?>
<div class="td-post-text-content">
<?php echo $td_mod_single->get_content();?>
// Set up your row, column, and tabs element
$to_echo = '[vc_row][vc_column width="1/1"][vc_tabs]';
// Simplest possible example of getting ACF data, sub in yours
$data_1 = get_field('2g_network');
$data_2 = get_field('3g_network');
// Repeat these lines for each tab, making sure each tab has a unique id
$to_echo .= '[vc_tab title="The first tab" tab_id="tab_1"];
$to_echo .= $data_1;
$to_echo .= '[/vc_tab]';
$to_echo .= '[vc_tab title="The second tab" tab_id="tab_2"];
$to_echo .= $data_2;
$to_echo .= '[/vc_tab]';
// (You could wrap each block in an if to skip a tab if the data is empty)
// When you have all your tabs, close the elements
$to_echo .= '[/vc_tabs][/vc_column][/vc_row]';
// We have to filter the whole string to make WP interpret the shortcodes
$to_echo = wpb_js_remove_wpautop($to_echo);
// Do whatever
echo $to_echo;
</div>
<div class="clearfix"></div>
<footer>
<?php echo $td_mod_single->get_post_pagination();?>
<?php echo $td_mod_single->get_review();?>
<?php echo $td_mod_single->get_source_and_via();?>
<?php echo $td_mod_single->get_social_sharing();?>
<?php echo $td_mod_single->get_social_like_tweet();?>
<?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();
}?>
I think the code is not executing. Am i placing it in the wrong way?
Great information. Thanks a lot Christopher. I am going to take SSL certificate. Actually, i want to know this because of your first post on this thread about mod_spdy. Thanks anyways.
Regards,
Thanks r1kay. I am done with it. Your help solved my query. Regards
Thanks for info Christopher. But i want the perfect results. Does mod_spdy comes with synthesis and is compatible with our theme?
Please guide a little about this. Thanks
As, i told you before i am not a PHP expert and may be I am messing something wrong with your code.
Thanks for reply, I previously activated child theme but synthesis allows me to activate one theme at a movement and therefore whenever i activate it, it throws an error in the dashboard.
I first created a number of fields like here under one group as you can see here.
Then i am inserted the code you provided in loop-single.php
// Set up your row, column, and tabs element
$to_echo = '[vc_row][vc_column width="1/1"][vc_tabs]';
// Simplest possible example of getting ACF data, sub in yours
$data_1 = the_field('2g_network');
$data_2 = the_field('3g_network');
// Repeat these lines for each tab, making sure each tab has a unique id
$to_echo .= '[vc_tab title="The first tab" tab_id="tab_1"];
$to_echo .= $data_1;
$to_echo .= '[/vc_tab]';
$to_echo .= '[vc_tab title="The second tab" tab_id="tab_2"];
$to_echo .= $data_2;
$to_echo .= '[/vc_tab]';
// (You could wrap each block in an if to skip a tab if the data is empty)
// When you have all your tabs, close the elements
$to_echo .= '[/vc_tabs][/vc_column][/vc_row]';
// We have to filter the whole string to make WP interpret the shortcodes
$to_echo = wpb_js_remove_wpautop($to_echo);
// Do whatever
echo $to_echo;
But now i don’t know what to do here on this screenshot.
I entered the custom fields on the post page but it’s not showing up.
And yes, i have FTP access of my site. Infact, i don’t have access to edit themes within dashboard due to my hosting strict security policy. That’s why, i was not able to take screenshot of code itself on the edit page of single loop.
Thanks again for support.
Hi Christopher, that’s really a nice thing to look at. I recently moved to Synthesis due to some bad experience with dreampress. They are saying they are the first one to implement mod_spdy.
I want to know from where can i start to implement SSL on this theme. Please provide some guidance.
Thanks
Thanks very much for such detailed answers. Can you please come to skype for just few minutes. I tried to add it up but making mistakes. If you don’t mind 🙂
I want to implement as you described it in the last post. But as i am not expert of PHP, i am making some mistakes. I want to insert groups and wants the output in the second tab like this page is displaying features of mobiles.
But this is displaying straight away i want to put these features using advance custom fields in tabs like first tab is for Text that i will put inside text box and second will be for Custom fields.
I think i already took a lot of your time and support from you. If you can help me in finishing it, it will be really helpful for me.
Thanks
Thanks a lot. That’s exactly what i am looking for. Can you please guide me where should i place this code in loop-single?
And for tab id should i change it or it will work automatically?
I tried this method before and now as well. You can see the outcome here. http://awesomescreenshot.com/0b43eroh49
Further, i don’t want to implement yoast breadcrumbs because i love TD Breadcrumbs function as it shows categories in Search Engines infront of main domain.
Please assist me in getting this. Stuck in it from 2 days.
Thanks a lot Snowwatch. It’s really simple and easy. Thanks
Thanks Lucian.
Thanks Christopher. The information you provided is exactly what i am looking for. Thanks for helping out tagdiv community.
Got it. Thanks a lot for wonderful support.
Thanks Christopher and Shashank. 🙂
True Christopher. So how can we prevent it. It’s necessary for some type of websites. Is there any way to edit it. I am using Yoast Plugin and sitemaps. Can’t we comment out it.
Thanks Lucian. I send an email along with a small inquiry on responsiveness of the theme.
Regards
Thanks a lot, Lucian. I got you and i checked my site and it’s not showing dates as well. I think google already indexed my site with dates and will remove them by time. Thanks for suggesting me using that tool.
Can you please give me your single-loop.php file along with a screenshot of advance custom field setup. I will be really grateful. I tried but it’s not working. Can i make a custom field without plugin? I think dreampress hosting has some issues with Advance Custom fields plugin due to varnish cache.
Still waiting 🙁
Thanks a lot Lucian. That really helped me. Worked like a charm.
Hi Marius, This last code is not working on my site. Infact it’s showing like this.
if (!get_field(‘hide_author’)) {
Author Box: Here is the author bos with above code and below code displaying on post page.
}
Can somebody please setup my speedbooster.php file according to pagespeed as descibed above. It will be really helpful. Thanks
Waiting for the answer? Please let me know how can i display more posts on a specific category page.
I added the style class but it’s still not working. Thanks for supporting me. I thought you are a member of support team. 🙂