Plugin settings page template
There are indeed some frameworks WP Alchemy Rilwis Meta Box Class etc… google will lead your way, as well as the in site search for both packages.
There are indeed some frameworks WP Alchemy Rilwis Meta Box Class etc… google will lead your way, as well as the in site search for both packages.
I’m making a couple of assumptions about how your theme is setup: You have two files: index.php. This is the file that begins the execution of the loop. content.php. This is the file in which your generic content template exists. You are familiar with get_template_part(). If not, it’s easy to implement. For example purposes, I … Read more
WordPress does not allow adding files though the admin side of things, therefore you will need FTP or SSH access to the server to add a file to your theme directory at least to initially add the template then you can edit it though your hearts content in the admin. (there may be a plugin … Read more
You would require the path to wp-blog-header.php to access WordPress functionality in a standalone PHP file. So your justthemenu.php file should contain the following code. <?php require(‘/wp-blog-header.php’); wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>
function wpse450_show_video( $atts ) { extract(shortcode_atts(array( ‘id’ => 0 ), $atts )); if( is_numeric($id) ) { $ngvideo_title = get_the_title($id); } ob_start(); include ‘path/to/file/video.php’; return ob_get_clean(); } add_shortcode( ‘ngvideo’, ‘wpse450_show_video’ ); You can use $id, $atts in our file as you would in your function. The code in your file will behave just like it would … Read more
Two options: Use conditional code inside of 404.php, to output different content/markup for the post-type Intercept the template at template_redirect, and include a separate template file for a 404 for the post-type. Personally, I’d go with option 1, as it is easier and more intuitive.
This might work for you, trying to hook early to the_content filter to strip the shortcode tag from it: add_filter(‘the_content’, ‘ad_filter_the_content’,1,1); function ad_filter_the_content($content) { // specify page id or array of page ids to include if (is_page(5)) { return str_replace(‘[orbit-slider category=”test”]’, ”, $content); } return $content; }
if it is the “Featured Image” of your post, you can use: <?php // check if the post has a Post Thumbnail assigned to it. if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?> check: the_post_thumbnail function else if you want to get the first image inside your post, you can use somthing like that: function … Read more
Found the answer. I hope this would be useful to others that might have this problem in the future. All you have to do is remove the content_save_pre filter and content_filtered_save_pre this will remove all Kses input form content filters. //temporarily disable remove_filter(‘content_save_pre’, ‘wp_filter_post_kses’); remove_filter(‘content_filtered_save_pre’, ‘wp_filter_post_kses’); wp_update_post($post); //bring it back once you’re done posting add_filter(‘content_save_pre’, … Read more
I am assuming you have a way to generate the attachment ID when inserting the image. You can then use the attachment ID to populate the input value. Are you not talking about an on-page input field? Try something like this: <?php //First get the attachment ID $attachment_id = 8; ?> <input type=”text” name=”tj_image_url” id=”tj_image_url” … Read more