big_s
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Change Permalink of Single Post to OriginalHi jayseae,
Some manual queries on the back end identified and solved the issue. The problem was that another page with the same slug had been created however this page was also flagged as the landing page in settings. The permalink of this page was therefore automatically changed by WP to only the domain rather than domain + page slug based permalink so wasn’t obvious in wp-admin.
Thanks anyway.
Forum: Fixing WordPress
In reply to: Change Permalink of Single Post to OriginalHi, thanks for taking time to look at this.
Definitely running 3.9.1. Programming solutions are fine but just an unexpected necessity. This seems such a trivially simple thing to want to do. I am surprised the WP database doesn’t get tidied up enough after a page has been deleted so that you are able to create a new page with the same permalink after.
Sure I could start running queries on the DB but surely a plugin like WP Optimize or WP Clean Up should remove any extraneous posts and associated meta for me. Do I really have to get my hands that dirty to solve this? – I have 150+ sites to do this on and so the more complex the solution the more of a real pain this becomes.
Any other ideas?
Forum: Plugins
In reply to: Change from GET to permalink style URLSeems the solution involves adding a rewrite rule within wordpress. I have tried the following but alas it doesnt work:
add_action( 'init', 'product_gallery_rewrite_rule' ); function product_gallery_rewrite_rule () { add_rewrite_rule( '^gallery/([^/]*)/?', 'gallery.php?pslug=$matches[1]', 'top' ); }
Anyone any ideas why this isnt working? I havent explicitly flushed the rewrite rules but have visited the permalinks page a few times and cleared caches etc.
Thanks.
Forum: Fixing WordPress
In reply to: infolinks injection – site hackedSure, these are all due diligence activites that we have already conducted. I was hoping that someone may have experienced the same problem and is able to shed light on how to stop it as all our efforts have so far failed.
Thanks.
Forum: Fixing WordPress
In reply to: infolinks injection – site hackedSure, these are all due diligence activites that we have already conducted. I was hoping that someone may have experienced the same problem and is able to shed light on how to stop it as all our efforts have so far failed.
Forum: Fixing WordPress
In reply to: infolinks injection – site hackedSure, these are all due diligence kind of activities but I was hoping that someone may have specific experience with the same problem and found a way to prevent it as all our efforts along the lines noted so far have failed.
Forum: Fixing WordPress
In reply to: Using wpdb->wp_query with wp_remote_postHaha thanks Rajesh, such a simple things I couldn’t see it!
Nice one ??
Forum: Hacks
In reply to: Programmatic Activation Of Theme Not WorkingHi,
Anyone got any ideas on this? Just need to know how and where to call this function solostream_option_setup() above. Can I append it to a file somewhere and then remove after function has been called or can I write a separate php file to call it or…
Thanks,
big_s.
Forum: Hacks
In reply to: Programmatic Activation Of Theme Not WorkingHi,
Thanks for the reply. I am actually a noob to wordpress core and functions so any advice is welcome.
After some more rooting around based on your tips I found the following in a file called theme-settings.php (obvious really!) that is included as
require_once(TEMPLATEPATH . "/theme-settings.php");
within functions.php of the new theme:<?php // Add default settings and show Theme Settings page after activation /*-----------------------------------------------------------------------------------*/ if (is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) { add_action('admin_head','solostream_option_setup'); header( 'Location: '.admin_url().'themes.php?page=theme-settings.php' ); } function solostream_option_setup(){ //Update EMPTY options $solostream_array = array(); add_option('solostream_options',$solostream_array); $template = get_option('solostream_template'); $saved_options = get_option('solostream_options'); foreach($template as $option) { if($option['type'] != 'header'){ $id = $option['id']; $std = $option['std']; if(empty($saved_options)) { update_option($id,$std); $solostream_array[$id] = $std; } else { //Store the old values over again. $solostream_array[$id] = $saved_options[$id]; } } } update_option('solostream_options',$solostream_array); } ...
As you can see its a Solostream theme. So the question now is how and where from do I call this solostream_option_setup() function? Hopefully that should do it ??