Permalink structure as code in back-end?

Your code works to create links, and WordPress should make a valiant effort to find the correct post, but it doesn’t get complete permalinks. To do that you will need to query the database for the post and construct a permalink if one is found. function transform_pseudo_anchor_wpse_101201($match) { global $wpdb; if (isset($match[1])) { $name = … Read more

shortcode for recent custom type post

This seems to work with custom post type : function get_custom_posts( $params ) { extract( shortcode_atts( array ( ‘number’ => ‘1’, ‘excerpt’ => 290, ‘readmore’ => ‘no’, ‘cpt’ => ‘post’, ‘readmoretext’ => ‘Read more’ ), $params ) ); //$latest_posts = get_posts( ‘category=0&numberposts=” . $number . “&suppress_filters=false’); OLD $latest_posts = query_posts( ‘post_type=”.$cpt.”&posts_per_page=” . $number ); wp_reset_query(); … Read more

Custom shortcode that writes to file

Your code works for me on a development server. As is, it saves to the site root directory. My guess is that you are trying to write to a directory to which the server does not have write access. I would suggest saving to wp-content/uploads or some other directory where you should reasonably have write … Read more

Migration Question

You can read this article about migration in codex. That’s a good start. When migrating there are no special tricks, you just have to upload your files to new location and change some datas in your DB to tell WordPress your website has a new location. Be cautious with those 3 wp options tables which … Read more