launchinteractive
Forum Replies Created
-
Forum: Reviews
In reply to: [Merge + Minify + Refresh] Excellent and lightweight pluginThanks for the review!
Forum: Plugins
In reply to: How to update plugin Homepage URLI found it. I just need to change the plugin URI in the plugin comments
I submitted a patch that has been merged. My solution was very similar..
$url = untrailingslashit( untrailingslashit( get_permalink() ) . '/' . $slug . '/' . $gallery->slug );
Hi. If your using the current version modify the foogallery_album_build_gallery_link function in this file: /wp-content/plugins/foogallery/extensions/albums/functions.php
so that it looks like this…
function foogallery_album_build_gallery_link( $gallery ) { return apply_filters( 'foogallery_album_build_gallery_link', $_SERVER['REQUEST_URI'] . '/gallery/' . $gallery->slug ); }
Forum: Plugins
In reply to: [Relative URL] Breaks CDN scriptsSame issue and the fix works for me too. Why not update the plugin?
ok, I’ve finally worked out whats going on. The gallery page existed all along but the link from the album was wrong. The reason is my permalink structure. I like to have my permalinks without the trailing slash.
To solve this I’ve made this change:
if ( 'default' === $format ) { $url = untrailingslashit($_SERVER['REQUEST_URI']) .'/'. $slug . '/' . $gallery->slug; } else { $url = add_query_arg( $slug, $gallery->slug ); }
This works for permalinks with and without the slash as well as pages with parents.
hmm, do you have an example of what the rewrite rules in the htaccess should be so I can compare with mine?
Thanks, thats now working here https://schoolprideaccessories.com.au/album-test without pretty urls. Any idea why the pretty urls aren’t working?
should there be more rewrite rules here?
That plugin description says not to bother as it does the same as saving the permalinks which I’ve already tried. Do you still want me to install it?
Yeah, its currently offline atm. I’ve also tried it on a live site: https://poboxdesigns.com.au/test
This site is also bringing up a 404.Permalink structure is: /%category%/%postname%
Its currently on my dev server: https://demo.launchinteractive.com.au:8007/cool-stuff
Forum: Reviews
In reply to: [Publish View] Really nice pluginThanks for the feedback! I’m glad you like it.
Forum: Fixing WordPress
In reply to: Force page for non found CPT taxonomyI’ve managed to get this working hooking into the pre_get_posts action…
//load page when publication term doesn't exist function publications_page($query) { global $wp_query; if ( !$query->is_main_query() ) return; if(is_tax() && isset($wp_query->query['publication']) && !term_exists($wp_query->query['publication'])) { $page = get_page_by_path($_SERVER['REQUEST_URI'] ); if($page != NULL) { $wp_query = new WP_Query(array( 'post_type' => 'page', 'page_id' => $page->ID )); } } } add_action('pre_get_posts','publications_page');
Forum: Plugins
In reply to: disable plugin for post type without a view pageMy plugin is now live here: https://www.ads-software.com/plugins/publish-view/
However I’m not currently checking for the existence of a view page. I just added an if statement so that ACF worked. This is my code:
function publish_view_submitbox_start(){ global $post; global $wp_version; if($post->post_type != 'acf') { if($post->post_status == 'auto-draft' || $post->post_status == 'draft') { submit_button('','primary','publish',false, array('onclick'=>"jQuery(this).after('<input type=\"hidden\" name=\"publishview\" value=\"Y\" />')",'title'=>'Publish & View','id'=>'publishview')); } else if($post->post_status == 'publish') { submit_button('','primary','publish',false, array('onclick'=>"jQuery(this).after('<input type=\"hidden\" name=\"publishview\" value=\"Y\" />')",'title'=>'Update & View','id'=>'publishview')); } } }
Note the ACF if statement. I would like to avoid being so specific and detect if I should output anything. Any help would be appreciated!