Create side bar widget showing list of years as hyperlinks for a custom post type

First, create the custom WordPress widget. This will query all the years that have at least one post for your custom post type “Meeting.” Save the following code in your theme’s functions.php file: class Meeting_Archive_Widget extends WP_Widget { public function __construct() { parent::__construct(‘meeting_archive’, ‘Meeting Archive’, array(‘description’ => ‘List Meetings by Year’)); } public function widget($args, … Read more

how to test for options(fields) in settings API?

Before saving the options the first time get_option( ‘rtwhc_settings’ ) returns false as the option doesn’t exist. Saving values, deleting them and then saving again causes the value of get_option( ‘rtwhc_settings’ ) to be an array with the field names as keys, which have empty values. You can see this, if you var_dump() the option … Read more

Import WordPress header / footer into an external page(s)

You haven’t really given enough information to know what options you have within the software. You may be able to use a setting or hook into the loading of your forum. But, if not, perhaps you could use a combination of html, jquery and ajax to solve this. In your header/footer you could just hold … Read more

How to make 2 (or more) custom post type post pages sit under the same slug?

You were getting /video-demos-tours/post-name instead of /resources/post-name because the following line in your theme_build_post_args function is setting the rewrite slug to the post type slug (video-demos-tours): $args[‘rewrite’][‘slug’] = $slug; So you should fix that, but as for how, that is up to you. But then, although fixing that would give you the permalink structure you … Read more

this question is too generic to be answered. You need to debug and understand where those 2 meta are created. As a first step I would disaable all the plugin and enable one by one to see if it’s coming from a plugin.