Danstano
Forum Replies Created
-
Everything is back and working well. I have no way of replicating the earlier issue unfortunately. Appears to be some conflict with another plugin but I will report here if I come across the same issue. I will close the thread since this is resolved for now.
Thank you!
This is what I am doing.
1. I have custom post types that store data inside wp_postmeta. So because my data is growing, I decided to have it inside custom tables.
2. Using your rapid-addon.php I added the code in myfile.php
function get_import_post_type($continue_import, $current_xml_node, $import_id) { // Retrieve import object. $import = new PMXI_Import_Record(); $import->getById($import_id); // Ensure import object is valid. if (!$import->isEmpty()) { // Retrieve post type. $post_type = $import->options['custom_type']; if ($post_type === 'fixture-result') { function save_fr_data_to_custom_database_table($post_id) { // Make wpdb object available. global $wpdb; // Retrieve value to save. $value = get_post_meta($post_id, 'fixtures_results', true); // Define target database table. $table_name = $wpdb->prefix . "fixtures_results"; // Insert value into database table. $wpdb->insert($table_name, array('ID' => $post_id, 'fixtures_results' => $value), array('%d', '%s')); // Delete temporary custom field. delete_post_meta($post_id, 'fixtures_results'); } add_action('pmxi_saved_post', 'save_fr_data_to_custom_database_table', 10, 1); } else { } } return true; } add_filter('wp_all_import_is_post_to_create', 'get_import_post_type', 10, 3); } } custom_table_data_add_on::get_instance();
3. So now the data imports well into the custom tables BUT only when I run the first time for new posts. When something changes in my csv and plugin has to update records, I see the data inside wp_postmeta table and record in my custom table remains unchanged instead of getting updated. I’m I missing something? For new posts, everything works well (data is stored in custom table & wp_postmeta data is cleared.)
Maybe checking my code can there can help point towards an issue.
Thank you.
Forum: Plugins
In reply to: [Yoast SEO] Adding custom data to the page analysis from custom fieldThat’s more clarity.
Forum: Plugins
In reply to: [Yoast SEO] Adding custom data to the page analysis from custom fieldHi, I’m doing this on localhost so there is no risk of breaking anything.
Forum: Plugins
In reply to: [Enhanced Text Widget] analyst misbehavingHow did you solve this? This popup is stressing me out.
Forum: Themes and Templates
In reply to: [Astra] Not Working with JS codeI always thought this is marked resolved after the issue is complete. And thanks for the attention on my issue.
Forum: Themes and Templates
In reply to: [Astra] Not Working with JS codeHi Herman, the issue is still unresolved. I sent the logins as you requested me days ago but still facing the problem. As above you said you were going to have a look at my site and requested that I sent you my logins. The calendar js code is working perfectly on other themes. I have tested that with multiple themes. I am just facing the issue with Astra. The only way this can be fixed is if you spared some time to have a look. It’s days but I’m still patient that you might have a chance to look at what’s going on. I don’t want to give up this theme.
- This reply was modified 4 years, 6 months ago by Danstano.
Forum: Themes and Templates
In reply to: [Astra] Not Working with JS codeHi,
I sent a support ticket yesterday.
Thank you.
Forum: Themes and Templates
In reply to: [Astra] My template for custom post type is not workingAs long as my code is working, who cares. Thank you.
Forum: Themes and Templates
In reply to: [Astra] My template for custom post type is not workingUnfortunately, I am working on localhost at the moment. This is what I have tried to come up with. I was unable to connect to adapt the content-single.php page so I decided to duplicate the single-team.php and do this below. Please help me troubleshoot any errors, just fumbled as far as I know. This is strange land ??
<?php /** * The template for displaying all single posts. * * @link https://developer.www.ads-software.com/themes/basics/template-hierarchy/#single-post * * @package Astra * @since 1.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } get_header(); ?> <?php astra_entry_top(); ?> <h1 class= "entry-title"> <?php the_title(); ?> </h1> <div class="entry-content clear" itemprop="text"> <!--content --> </div> <?php astra_entry_bottom(); ?> </article><!-- #post-## --> <?php astra_primary_content_bottom(); ?> </div><!-- #primary --> <?php if ( astra_page_layout() == 'right-sidebar' ) : ?> <?php get_sidebar(); ?> <?php endif ?> <?php get_footer(); ?>
- This reply was modified 4 years, 8 months ago by Danstano.
Forum: Themes and Templates
In reply to: [Astra] Mobile menu icon doesn’t appearSorry for interjecting but it looks to me that you’re missing this https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css
Forum: Themes and Templates
In reply to: [Astra] My template for custom post type is not workingThanks, I have followed the link you gave. Found the file content-single.php but how do I adapt it to be used on my the custom post type. I tried adding some code but it shows up in other post types as well. I duplicated the content-single.php and renamed it content-single-teams.php but it won’t work. Looks like I am supposed to add some code into the single-teams.php so that it finds the right file content-single-teams.php but I don’t know how to go about it.
- This reply was modified 4 years, 8 months ago by Danstano.
The import plugin author has helped fix it. Thanks to you for the kind response!
Thanks for the input. But the limit I have right now for the default import is that you need to import to one league/tournament at a time. I commend you for the forward thinking and that’s the beauty of this plugin. But here is a concern, I am trying to import those tens of teams but my teams belong in different leagues. Maybe I didn’t put this well, I don’t really need a new column for the away team, I only need to import the teams so that 1234|3222 in my file imports to the home and away teams respectively. Everything else as regards the import works perfectly except for this bit. Kindly, please let me know if there’s a way forward. I like the plugin that’s for sure but I’m stuck here. Please
All I need is the Home Team and Away Team in separate columns not rows. Please let me know whether this is possible,
My appreciation.