Ahh yeah have_posts()..
I’ll modify the query.
Hi Andrei.
I can’t seem to locate a single query in the loop.php file?
Are the content display generated using pagebuilder or?
-
This reply was modified 10 years by
Phonetic.
It’s probably the loop functions that needs to be modified. Just can’t seem to find where it fetches the data source.
Hi Andrei.
I’m almost there with the modifications. So far the block code is working 100 % with several custom post types. But I still cannot show custom post types on the category pages. Top posts are working as the are based on the block settings, but the article display is not showing. I’ve been trying to find there in the code the ‘post_type’=> ‘post’ is set for that but can’t seem to find it.
So far i’ve changed this:
td_data_source.php
$wp_query_args = array(
'ignore_sticky_posts' => 1,
'post_type' => array('post','custom1','custom2','custom3'),
'post_status' => 'publish'
);
This will enable mega menus to fetch data from custom post types.
Out commented the post tytd_wp_booster_functions.php
// if ($post->post_type != 'post') {
// return $wordpress_template_path;
// }
This will enable custom post types to use the default post templates.
td_templates_settings.php line 89:
'template' => get_template_directory() . '/includes/wp_booster/wp-admin/content-metaboxes/td_set_post_settings.php',
));
Forcing the templates to show for custom cpt in edit post in backend.
I’ve also added custom cpt to search etc.
But where do I set the post types for the article display on category pages etc?
Hi Bogdan.
You’re still not really understanding what I am trying to achieve. I want every template available to a custom post type. Not just one. Thats kinda useless not being able to switch templates.
Hi Catalin.
I’m a developer myself. Can you point me to which part of the framework I need to take a look at?
The specific function is in td_ajax.php:case 'td_category_ids_filter': // by category - the user selected a category from the drop down. if it's empty, we show the default block atts
if (!empty($ajax_parameters['td_filter_value'])) {
$ajax_parameters['td_atts']['category_ids'] = $ajax_parameters['td_filter_value'];
unset($ajax_parameters['td_atts']['category_id']);
}
break;
Well they can actually. Which your own docs state. They are just limited to a single template without code modifications. I’ve already modified the wp_booster framework to include custom post types (which you should do by default if you ask me).
I was hoping that there was an easy solution, but I’ll get to work on modifying the rest of the framework myself.
Another thing. You might want to rewrite the error handling of your td_api.api. I.e. line 322:
td_util::error(__FILE__, "td_api_base::mark_used_on_page : a component with the ID: $id is not set.");
Will display errors on page and not only to error log.
Did some further testing. Using danish letters in the sidebar title will provoke the “bug”. Also sidebar names using : and – will do the same.
I brought out the beer a bit too soon. The error / bug is still there. Running out if ideas 🙁
I’ve finally found the root cause of the missing content. External / custom caching.
Forced every cache to null and it works.
Still pretty strange, but I’m sorry for the inconvenience.
Free beers on me 🙂
Try this: With 6.7 update running. Create a new sidebar. Switch to Widgets in WP Admin, Add a widget to the new sidebar and click save. Then reload the page. Widgets in the new side are not displayed / missing.
All parameters are fine. I’m able to reproduce the bug on 3 different installations. 100 % sure the error is related to the 6.7 update. Disabled every single plugin and even did a clean WP install with no plugins to be absolutely sure.
Tested on:
Apache 2.2 + mysql 5.5 + php 5.3
Apache 2.4 + mysql 5.6 + php 5.5
Apache 2.4 + MariaDB 10.x + php 7.0.4
On every setup new sidebar content will not be saved to a sidebar created after the 6.7 update.
-
This reply was modified 10 years by
Phonetic.
I’d really appreciate a fix / solution other than downgrading.
Reverting back to 6.6.5 and widgets can once again be added to newly created sidebars. Definitely seems like a 6.7 bug.
I’ve tested another upgrade on a different backend and samme error after update (with no update to VC.
I suspect it’s related to the visual composer changes you’ve made to the code in 6.7:
fix: removed some old Visual Composer detection code from td_wp_booster_functions.php, it was causing an error in certain cases
fix: improved the Visual Composer detection code inside the default page template file, it was triggered when the shortcodes didn’t have unique names(ex. Woocommerce shortcodes)
Hi Bogdan.
So far no errors at all. But I am not that surprised as the WordPress core team have been an integral part of the PHP7 alpha & beta-testing all along.
Hi Bogdan.
Just a quick update:
Regenerated all the thumbnails, and that fixed the existing images. I’ll try and add a new image now and see if the error still persists when added new images.
I’ve used 1920×1080 images for all testing so images are not being enlarged.
Just did some load testing. Using PHP 7, Apache 2.4.18 and MariaDB 10.1. Blazing fast compared to the old PHP5 + MySQL solution. (8 CPU, 20 GB RAM)
Hi Bogdan.
Thanks for a swift reply.
I thought Newspaper theme was PHP7 compliant.
Unfortunately we’re not going to downgrade PHP. Simply too many benefits of the much faster PHP7. But I was wondering if the error is due to a missing extension. Could possibly be PHP-GD or maybe ImageMagick missing or? I haven’t check the source for the functions you guys use, but there are no error reports in the logs.
Site won’t launch until mid April, so still some time for PHP7 support for Newspaper.
Hi Catalin.
Thanks a lot 🙂
Hi Catalin.
Thanks for clearing that up. I’ll get our developers to come up with a solution.
I would like to add a feature request though. I’m pretty sure that many users would love full width tops / menus with background image-functionality without “boxing” the top navigation etc.. I’ve peaked at your td-full-layout vs td-boxed-layout classes and it should possible with a pretty quick addition / change.
Thanks.
Hi Catalin.
I not looking to make the theme full width (content), but just make the header background(s) be full width (as they do when background ads are disabled) and not but be “cut” by content-width. Shouldn’t that be possible with some quick CSS?
Hi Catalin.
I’ve just tested the CSS and the top menus are not full width. They are still fixed width after applying the background image. Any way to fix this?
Thanks in advance!
Thanks for a swift reply Catalin.
Great pointers and I’m pretty sure we can get done pretty quickly. Tricky part will probably be having a dynamic wallpaper fetched from the ad server instead of a media file from within the theme settings.