mkormendy
Forum Replies Created
-
Forum: Plugins
In reply to: [Yoast SEO] Adding an external sitemep to the sitemap indexBetter late than never, place the following code into your functions.php file (or place in a separate plugin). What this does is get a list of all of the sub-sites, and for each sub-site, get the most recently modified content date (can be post, or page, or whatever), converts it to the proper format, and uses that for the lastmod node of each subsite xml listing.
Tested on WordPress 4.7
// add subsite sitemaps to sitemap.xml function add_sitemap_custom_items() { // only add the xml of the subsites to the main site if (get_current_blog_id() === 1) { // set blank content variable $sitemap_custom_items = ''; // set arguments for getting the most recent page (or post, or attachment or post type) $recent_args = array( 'numberposts' => 1, 'post_type' => 'page', // this can be posts OR attachment, OR whatever post type you want. 'post_status' => 'publish', 'suppress_filters' => true ); // get the subsites as an object $subsites = get_sites(); // loop through the subsites foreach( $subsites as $subsite ) { // store subsite details $subsite_id = get_object_vars($subsite)['blog_id']; $subsite_domain = get_object_vars($subsite)['domain']; $subsite_slug = get_object_vars($subsite)['path']; // we don't need to worry about the main site if ($subsite_id != 1) { // switch to the site currently in the foreach loop switch_to_blog($subsite_id); // get the most recent page (as based on the arguments above) $subsite_pages = wp_get_recent_posts($recent_args); // create a loop to get the details of the first post passed foreach ($subsite_pages as $subsite_page) : setup_postdata($subsite_page); // get the latest modified timestamp and format it to ISO 8601 date format (aka 'c' in php5) $latest_mod_date = date('c', strtotime($subsite_page['post_modified'])); endforeach; // clear query wp_reset_postdata(); // switch back to the main site restore_current_blog(); // concatenate this subsite sitemap xml with the domain, slug and proper latest modified content date for that site $sitemap_custom_items .= "<sitemap><loc>https://".$subsite_domain."".$subsite_slug."page-sitemap.xml</loc><lastmod>".$latest_mod_date."</lastmod></sitemap>\n"; } } // output list of sitemap.xml's for each site return $sitemap_custom_items; } } add_filter( 'wpseo_sitemap_index', 'add_sitemap_custom_items' );
Forum: Plugins
In reply to: [Multisite Widgets Context] Confusing Plugin OperationWebber .. why don’t you create a new thread instead of hijacking mine.
Forum: Plugins
In reply to: [Contact Form DB] No Data Available in TableLike I said: “when I go to the database and look at them directly, data is collected, in both the contact form db tables, as well as the tables from Gravity Forms”.
So the name of my forms in CFDB are there, and CFDB has captured many submissions for that form because I see them directly in the database wp_cf7dbplugin_submits table.
And regarding multisite, I also mentioned: “the main site is the only one that has forms available”, meaning, no other sub-site on multisite has any gravity forms present on them. This also means that none of the sub-sites are capturing submissions.
The main site is the only site with forms, and form data submissions.
- This reply was modified 8 years ago by mkormendy.
Forum: Plugins
In reply to: [Contact Form DB] Adding a Primary Key–what damage am I doingEvery time that I do a find and replace in the WordPress database when deploying from one environment to another, I end up having a mild error come up that the table “wp_cf7dbplugin_submits” has no primary key.
I want to run the command cravaus proposed, and have a unique ID, but I don’t want to break the DB or other processes that may rely on the DB when you finally do get around to adding the key.
What’s your timeframe for adding an ID key for the table?
We have a number of data cubes that we have built and that rely on these tables, and I don’t want them breaking when you upgrade this table to have a key.Forum: Plugins
In reply to: [Locations] Child page not found of page called "Locations"Thanks this was helpful! Unfortunately, I still had an issue with sub-pages and pages with the same slug after I tried using this feature, and the following post on Stack Exchange really helped me out to avoid the conflict:
Forum: Plugins
In reply to: [Contact Form DB] Do not save forms in DB named…Ahhh. Okay perfect.
Suggestion: I think revising the hint with an example on the settings page for that feature could benefit other users and avoid confusion.
BTW great job on the plugin, I really like how it does a lot of the heavy-lifting of parsing the json of forms in gravityforms into nicer tables in the DB.
Forum: Plugins
In reply to: [Contact Form DB] Do not save forms in DB named…Ahhh. Okay perfect.
I think revising the hint on the settings page for that feature could benefit users with an example.Forum: Plugins
In reply to: [Cachify] Only frontpage is in cacheIn the case of the following:
<Files index.php> php_value auto_prepend_file /pfad/plugins/cachify/apc/proxy.php </Files>
What does /pfad/ mean?
Forum: Plugins
In reply to: [Disable Gravity Forms Fields] Not working with textboxEdit the only JS file found in the plugin folder, replacing all of the content with this:
jQuery(document).ready(function(){
// differences described here: https://stackoverflow.com/a/7730719/634386
// for readonly
$('li.readonly textarea, li.readonly input, li.readonly select').attr('readonly','readonly');
// for disabled
$('li.disabled textarea, li.disabled input, li.disabled select').attr('disabled','disabled');
});
Not broken for me. Nor does the Ultimate Member plugin compare to the core function that If Menu represents.
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] More than one condition (operators?)Yes! this would be a super nice feature.
Forum: Reviews
In reply to: [CodeMirror File Editor] Great plugin, BUT…Since it’s using CodeMirror at the core, you can just drop-in the different themes that have been made for CodeMirror. No need for editing CSS files.
Here’s a few that you can download:
http:codemirror.net/theme/3024-day.css
http:codemirror.net/theme/3024-night.css
http:codemirror.net/theme/abcdef.css
http:codemirror.net/theme/ambiance.css
http:codemirror.net/theme/base16-dark.css
http:codemirror.net/theme/bespin.css
http:codemirror.net/theme/base16-light.css
http:codemirror.net/theme/blackboard.css
http:codemirror.net/theme/cobalt.css
http:codemirror.net/theme/colorforth.css
http:codemirror.net/theme/dracula.css
http:codemirror.net/theme/eclipse.css
http:codemirror.net/theme/elegant.css
http:codemirror.net/theme/erlang-dark.css
http:codemirror.net/theme/hopscotch.css
http:codemirror.net/theme/icecoder.css
http:codemirror.net/theme/isotope.css
http:codemirror.net/theme/lesser-dark.css
http:codemirror.net/theme/liquibyte.css
http:codemirror.net/theme/material.css
http:codemirror.net/theme/mbo.css
http:codemirror.net/theme/mdn-like.css
http:codemirror.net/theme/midnight.css
http:codemirror.net/theme/monokai.css
http:codemirror.net/theme/neat.css
http:codemirror.net/theme/neo.css
http:codemirror.net/theme/night.css
http:codemirror.net/theme/paraiso-dark.css
http:codemirror.net/theme/paraiso-light.css
http:codemirror.net/theme/pastel-on-dark.css
http:codemirror.net/theme/railscasts.css
http:codemirror.net/theme/rubyblue.css
http:codemirror.net/theme/seti.css
http:codemirror.net/theme/solarized.css
http:codemirror.net/theme/the-matrix.css
http:codemirror.net/theme/tomorrow-night-bright.css
http:codemirror.net/theme/tomorrow-night-eighties.css
http:codemirror.net/theme/ttcn.css
http:codemirror.net/theme/twilight.css
http:codemirror.net/theme/vibrant-ink.css
http:codemirror.net/theme/xq-dark.css
http:codemirror.net/theme/xq-light.css
http:codemirror.net/theme/yeti.css
http:codemirror.net/theme/zenburn.cssForum: Plugins
In reply to: [Store Locator Plus? for WP] Site is broken after upgrde to 4.5I prefer the update, or my code fix, which actually performs the intended task correctly instead of skipping over it (which could have a bad side effect).
Forum: Plugins
In reply to: [Store Locator Plus? for WP] Plugin 4.5 breaks site on WP 4.4.2I have fixed it on my site.
If you edit the class.activation.php file inside the includes directory of the plugin,… line 18, change
private $Upgrade;
topublic $Upgrade;
Forum: Plugins
In reply to: [Store Locator Plus? for WP] Site is broken after upgrde to 4.5I have fixed it on my site.
If you edit the class.activation.php file inside the includes directory of the plugin,… line 18, change
private $Upgrade;
topublic $Upgrade;