[Solved] Meteor Slides as header only for homepage and Use featured image of each page as header for respective pages

I have got answer for it. I have changed the code to add meteor slides plugin in functions.php to show the slideshow just in the homepage. <?php if ( is_front_page() ) { if ( function_exists( ‘meteor_slideshow’ ) ) { meteor_slideshow(); } } ?> After that i used a plug called WP display header to set … Read more

[Solved] Custom page template

Your code will only display a list of your posts if the page that is using that template is set to be the Posts Page (in admin settings). If you want any other page to display a list of posts, then you need to write a custom query inside the template. E.g. using WP_Query: $args … Read more

[Solved] Create A Metabox For A Custom Field

This will create a metabox for you to enter a video code. //Creating a MetaBox for Posts to enter Video Code. add_action(‘add_meta_boxes’,’video_meta_box’); function video_meta_box(){ add_meta_box(‘video_box_id’, ‘Enter Video ‘ , ‘video_box_cb’,’post’,’normal’,’default’); } function video_box_cb($post){ $value = get_post_meta($post->ID,’video_box’,true); echo ‘<textarea rows=”4″ cols=”50″ id=”video_box”, name=”video_box”>’; echo $value; echo ‘</textarea>’; } add_action(‘save_post’,’save_video_box’); function save_video_box($post_id){ $box_data = $_POST[‘video_box’]; update_post_meta($post_id,’video_box’,$box_data); } … Read more

[Solved] Plugin to install a plugin

You can take a look at TGM-Plugin-Activation plugin. It should give you good starting point. As written in the documentation: TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install and even automatically activate plugins in singular … Read more

[Solved] Query not returning CPT posts

I had a similar problem and posted the solution here: http://wordpress.org/support/topic/role-scoper-updating-query_posts query_posts causes the main WP_Query to be discarded. That may or may not be the behavior you want. If no, you need to update WP_Query, then you could update your functions.php file to include a register filter that displays your content types as part … Read more

[Solved] Get posts that matches specific terms of multiple custom taxonomies

I’ve finally solved this problem. I’m copying the code because it may help someone 🙂 I’ve found the solution by populating an arrray and checking if a brand is or is not there, so I only get each brand one time. <?php //Query to match department $args = array( ‘tax_query’ => array( array( ‘taxonomy’ => … Read more

[Solved] How to place an image into header.php? [closed]

Don’t use a relative URL. If you look at the source you are probably trying to load the image from http://sitename.com/images/ when what you likely want is http://sitename.com/wp-content/themes/themename/images/. Assuming the image is in the theme directory in a folder that shares a directory with style.css, do this: <img id=”topL” src=”https://wordpress.stackexchange.com/questions/78271/<?php echo get_stylesheet_directory_uri(); ?>/images/img01.png”/> http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri 3 … Read more

[Solved] Separated Comment from Post

ahaaa 😀 it’s success, I use CSS. Here the screenshot the code i use on single.php : <!– post section –> <section class=”post-section all-round grid”> <div class=”content_wrapper”> <!– YOUR CONTENT –> </div> </section> <!– end .post-section –> <!– comment section –> <section class=”comment-section all-round grid”> <?php if ( comments_open() || get_comments_number() ) : ?> <?php … Read more

[Solved] How to hide WordPress files / structure? [closed]

If you are new to php and mod_rewrite i suggest so you check with the section of my response. Or if you keen to try it yourself, you can use something like this to hide the wp-content/plugins path structure: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^modules/(.*) /wp-content/plugins/$1 [L,QSA] </IfModule> This will change the path to /modules … Read more