-
AuthorSearch Results
-
January 7, 2017 at 9:32 am #57686
Topic: Home page blocks
in forum All Other ThemesHi,
I would like to know how can I have customised content in the homepage blocks. Currently on the homepage blocks, the content is showing however even the shortcodes are showing which are a part of the page. I look forward for your response.Screenshot: https://www.dropbox.com/s/txqctejal44946m/homepage.JPG?dl=0
January 6, 2017 at 1:28 pm #57629In reply to: Split Social Media Section
Hi Dave,
I don’t quite understand how to use the Shortcode Ultimate plugin, already have it active but no pop-up box was coming up for when I was trying to edit.
So I’ve gone with the extended version to make it happen (which it has) but if you can show me the tidier version too that would be great. Here is how I’ve made it happen –
<div style=”float: left; width: 46%;”>[custom-facebook-feed]</div>
<div style=”float: right; width: 46%;”>[instagram-feed]</div>
<div style=”clear: both;”></div>January 6, 2017 at 12:44 pm #57607In reply to: Split Social Media Section
Hi Mark,
You can use column shotcode for this on the right hand side column you can add Instagram feed and on the left column facebook feed.
Column shortcode available in Appearance>>Theme Option>>Shortcode or you can also use plugin Shotcode Ultimate plugin.
Regards,
DaveJanuary 6, 2017 at 9:32 am #57573In reply to: Testimonials and Inner Banner
Hi Susanne,
Kindly go to Appearance>>Widget>>Sidebar Main
Drag and drop text widget in sidebar main to remove default sidebar. You can add contact form shortcode in that text widget.
For the header image go to Appearance>>Customize>>Header and change/remove the image from there.
Regards,
DaveJanuary 5, 2017 at 5:50 pm #57512In reply to: Problems loading theme back up
Hi Dave,
Thanks for the prompt response, i have managed to do the first part, but am unsure about were to look to remove the shortcodes as i am pretty new to building websites. Should i be looking in the coding of the theme???
Thanks Marc
January 5, 2017 at 3:34 pm #57505In reply to: Centering "latest posts" shortcode in column
So if there is more than one post the entire thing will center on the page? I removed the “show=”3” and everything is still justified over to the left?
Or will the multiple posts come in and I’ll have one in column 1, one in column 2, etc? I assumed the latest posts shortcode would pile them vertically, one on top of the other in a scrolling column.
DS
January 5, 2017 at 7:21 am #57460In reply to: Cleaning – Welcome and Industry we serve Page
Hi Zainab,
Use this shortcode of section 1:
[columns size="3"]<img src="http://www.yourwebsite.com/wp-content/uploads/2016/10/cleaning-girl.png" alt="cleaning-girl" class="aligncenter size-full wp-image-16240" />[/columns][columns size="2-3"][lefttitle text="Welcome To Perfect Cleaning" titlecolor="#ffffff" seperatorcolor="#ffffff"]<p style="color:#fff;">Nam non nisl quis justo facilisis scelerisque id vitae justo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed ullamcorper ex sed venenatis tristique. Ut consectetur consequat mauris, eu tincidunt odio gravida nec. Nulla sit amet dolor massa.</p><p style="color:#fff;">Praesent lobortis, mi iaculis sagittis cursus, neque elit mollis magna, ut consequat dolor nibh et tellus. Donec efficitur iaculis nisi quis finibus. Cras sit amet hendrerit risus, eget eleifend Nunc imperdiet ante ac tortor eleifend condimentum. Sed non ipsum urna. </p>[space height="30"][readmore align="left" button="About More" links="#"][readmore align="left" button="Workers" links="#"][space height="30"][weprovide col="3" icon="fa-users" iconcolor="#ffa200" color="#ffffff" title="HIGHLY-TRAINED STAFF" description="Phasellus pulvinar auctor nisisuscipit. Cras lacus mi, venenatis bibendum eleifend." url="#"][weprovide col="3" icon="fa-cogs" iconcolor="#ffa200" color="#ffffff" title="QULAITY CLEANING TOOLS" description="Phasellus pulvinar auctor nisisuscipit. Cras lacus mi, venenatis bibendum eleifend." url="#"][weprovide col="3" icon="fa-clock-o" iconcolor="#ffa200" color="#ffffff" title="FAST & EFFECTIVE SERVICE" description="Phasellus pulvinar auctor nisisuscipit. Cras lacus mi, venenatis bibendum eleifend." url="#" last="last"][/columns]Shortcode for section 2:
[columns size="2"][lefttitle text="Industries We Serve" titlecolor="#383838" seperatorcolor="#2196f3"]<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam viverra aliquet egestas. Donec vulputate, orci in accumsan fermentum, est nisl placerat ipsum, et tempus lectus purus sed quam. Proin mattis at mi ut placerat.</p>[su_row] [su_column size="1/2"][weserve icon="fa-plane" title="Airports & Airlines" link="#"][clear][weserve icon="fa-futbol-o" title="Sports & Fitness Centers" link="#"][clear][weserve icon="fa-car" title="Auto Dealerships" link="#"][/su_column][su_column size="1/2"][weserve icon="fa-university" title="Schools & Universities" link="#"][clear][weserve icon="fa-music" title="Entertainment Venues" link="#"][clear][weserve icon="fa-hospital-o" title="Medical Facilities" link="#"][/su_column] [/su_row][/columns][columns size="2"][lefttitle text="Clients Testimonials" titlecolor="#383838" seperatorcolor="#2196f3"][space height="20"][testimonials-box col="1" show="1"][/columns]Regards,
BradJanuary 5, 2017 at 7:17 am #57459In reply to: Problems loading theme back up
Hi Marc,
Kindly go to Setting>>reading>>Select your latest posts
You have to remove all the shortcodes in the pages that you have created for another themes.
Regards,
DaveJanuary 5, 2017 at 6:26 am #57436In reply to: customize footerposts shortcode
Hi Kirk,
This issue was resolved from our end. Kindly use this shortcode for footerposts:
[footerposts show="3" catid="enter category id here"]Regards,
BradJanuary 5, 2017 at 6:07 am #57432In reply to: SKT White Pro – maximum number of "our team" in hp
Hi Amedeo,
1) Kindly go to Appearance>>Theme Option>>Shortcode
You will find button shortcode there. use the shortcode in the section.
2) Yes, you can limit the number of photo on homepage. Kindly use this shortcode
[photogallery filter="false" show="3"]If you want filter in photo gallery then use “true” in filter.3) Did you select the categories for images?
Regards,
DaveJanuary 4, 2017 at 8:52 pm #57406Topic: Architect Pro – Our Partners Shortcode
in forum All Other ThemesHello,
I’m trying to create another section under the our partners section on the homepage that has the same slider with certifications in it using the same exact shortcode, but it doesn’t seem to be showing up. The site address is devtest.amtesting.co
Thank you in advance for the help it means a lot!
Evan Laird
January 4, 2017 at 7:56 pm #57402Topic: Centering "latest posts" shortcode in column
in forum All Other ThemesTrying to build up a section on the homepage containing the [latest-posts show=”3″] shortcode and no matter what I do with the column width the latest list refuses to move into the center of the page.
I have the columns working fine in a section above, and when I replace the latest posts with any other content they center perfectly. Is there a CSS change needed or will the latest posts only live on the left?
January 4, 2017 at 5:45 pm #57387In reply to: All sorts of things I need help with.
1) Fixed
2) Fixed
3) Fixed
4) I did the text box but it took away the contact info. Is there a way to edit the contact info and add the social media icons to it?
5) The no sidebar part is fixed but I still need to know how to shut off page comments and avoid the categories from showing on the blog post.
6) Yes, I am looking to change the cream color to other colors.
I emailed support about 4 and 7 so I am waiting to hear back.I have a couple other things I need help with.
A) I have the girlie theme. There is a slideshow at top of page (homepage slider). There is an option to add text to the photos. I would like to change the font but every font I change, thinking is the one for the slider, it does not change. Can you please let me know what font option I have to change for that?
B) I need to edit the contact form. The shortcode was added to the contact page but it asks for website on the contact form which I do not need from my clients. I would like to change that option to Type of session but I have no idea where to find the contact form to edit it since it was a shortcode supplied by your themes.Thank you.
January 4, 2017 at 12:01 pm #57336In reply to: SKT White Pro – maximum number of "our team" in hp
Hi Amedeo,
Kindly go to wp-content/themes/skt-white-pro/inc/custom-functions.php
and replace the code with below code:
<?php /** * @package SKT White * Setup the WordPress core custom functions feature. * */ // get_the_content format text function get_the_content_format( $str ){ $raw_content = apply_filters( 'the_content', $str ); $content = str_replace( ']]>', ']]>', $raw_content ); return $content; } // the_content format text function the_content_format( $str ){ echo get_the_content_format( $str ); } function is_google_font( $font ){ $notGoogleFont = array( 'Arial', 'Comic Sans MS', 'FreeSans', 'Georgia', 'Lucida Sans Unicode', 'Palatino Linotype', 'Symbol', 'Tahoma', 'Trebuchet MS', 'Verdana' ); if( in_array($font, $notGoogleFont) ){ return false; }else{ return true; } } // subhead section function function sub_head_section( $more ) { $pgs = 0; do { $pgs++; } while ($more > $pgs); return $pgs; } //[clear] function clear_func() { $clr = '<div class="clear"></div>'; return $clr; } add_shortcode( 'clear', 'clear_func' ); //[separator height="20"] function separator_shortcode_func($atts ) { extract( shortcode_atts( array( 'height' => '50', ), $atts ) ); $sptr = '<div style="clear:both; min-height:20px; height:'.$height.'px; background:url('.get_template_directory_uri().'/images/hr_double.png) no-repeat center center transparent;"></div>'; return $sptr; } add_shortcode( 'separator', 'separator_shortcode_func' ); //[column_content]Your content here...[/column_content] function column_content_func( $atts, $content = null ) { extract( shortcode_atts( array( 'type' => '', 'animation' => '', ), $atts ) ); $colPos = strpos($type, '_last'); if($colPos === false){ $cnt = '<div class="'.$type.' '.$animation.'">'.do_shortcode($content).'</div>'; }else{ $type = substr($type,0,$colPos); $cnt = '<div class="'.$type.' '.$animation.' last_column">'.do_shortcode($content).'</div>'; } return $cnt; } add_shortcode( 'column_content', 'column_content_func' ); //[hr] function hrule_func() { $hrule = '<div class="clear hrule"></div>'; return $hrule; } add_shortcode( 'hr', 'hrule_func' ); //[hr_top] function hr_top_func() { $hr_top = '<div class="clear linktotop"><a title="Top of Page" href="#top">Back to Top</a></div><div class="clear hrule"></div>'; return $hr_top; } add_shortcode( 'hr_top', 'hr_top_func' ); // [searchform] function searchform_shortcode_func( $atts ){ return get_search_form( false ); } add_shortcode( 'searchform', 'searchform_shortcode_func' ); // accordion function accordion_func( $atts, $content = null ) { $acc = '<div style="margin-top:35px;">'.get_the_content_format( do_shortcode($content) ).'<div class="clear"></div></div>'; return $acc; } add_shortcode( 'accordion', 'accordion_func' ); function accordion_content_func( $atts, $content = null ) { extract( shortcode_atts( array( 'title' => 'Accordion Title', ), $atts ) ); $content = wpautop(trim($content)); $acn = '<div class="accordion-box"><h2>'.$title.'</h2> <div class="acc-content">'.$content.'</div><div class="clear"></div></div>'; return $acn; } add_shortcode( 'accordion_content', 'accordion_content_func' ); // remove excerpt more function new_excerpt_more( $more ) { return '... '; } add_filter('excerpt_more', 'new_excerpt_more'); // get post categories function function getPostCategories(){ $categories = get_the_category(); $catOut = ''; $separator = ', '; $catOutput = ''; if($categories){ foreach($categories as $category) { $catOutput .= '<a href="'.get_category_link( $category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s", 'skt-white' ), $category->name ) ) . '">'.$category->cat_name.'</a>'.$separator; } $catOut = 'Categories: '.trim($catOutput, $separator); } return $catOut; } // replace last occurance of a string. function str_lreplace($search, $replace, $subject){ $pos = strrpos($subject, $search); if($pos !== false){ $subject = substr_replace($subject, $replace, $pos, strlen($search)); } return $subject; } //custom post type for Our Team function my_custom_post_team() { $labels = array( 'name' => __( 'Our Team', 'skt-white' ), 'singular_name' => __( 'Our Team', 'skt-white' ), 'add_new' => __( 'Add New', 'skt-white' ), 'add_new_item' => __( 'Add New Team Member', 'skt-white' ), 'edit_item' => __( 'Edit Team Member', 'skt-white' ), 'new_item' => __( 'New Team Member', 'skt-white' ), 'all_items' => __( 'All Team Members', 'skt-white' ), 'view_item' => __( 'View Team Members', 'skt-white' ), 'search_items' => __( 'Search Team Members', 'skt-white' ), 'not_found' => __( 'No team members found', 'skt-white' ), 'not_found_in_trash' => __( 'No team members found in the Trash', 'skt-white' ), 'parent_item_colon' => '', 'menu_name' => 'Our Team' ); $args = array( 'labels' => $labels, 'description' => 'Manage Team', 'public' => true, 'menu_icon' => 'dashicons-groups', 'menu_position' => null, 'supports' => array( 'title', 'editor', 'thumbnail' ), 'has_archive' => true, ); register_post_type( 'team', $args ); } add_action( 'init', 'my_custom_post_team' ); function pricing_table_shortcode_func( $atts, $content = null ) { extract( shortcode_atts( array( 'columns' => '4', ), $atts ) ); $ptbl = '<div class="pricing_table pcol'.$columns.'">'.do_shortcode( str_replace(array('<br />','\t','\n','\r','\0'.'\x0B'), array('','','','','',''), $content) ) .'<div class="clear"></div></div>'; return $ptbl; } add_shortcode( 'pricing_table', 'pricing_table_shortcode_func' ); function price_column_func( $atts, $content = null ) { extract( shortcode_atts( array( 'highlight' => '', 'bgcolor' => '', ), $atts ) ); $pcol = '<div class="price_col '.( (strtolower($highlight) == 'yes') ? 'highlight' : '' ).'" '.( ($bgcolor!='') ? 'style="background-color:'.$bgcolor.' !important;"' : '' ) .'>'.do_shortcode( $content ) .'</div>'; return $pcol; } add_shortcode( 'price_column', 'price_column_func' ); function price_column_header_func( $atts, $content = null ) { $pheader = '<div class="th">'.strip_tags($content).'</div>'; return $pheader; } add_shortcode( 'price_header', 'price_column_header_func' ); function price_column_footer_func( $atts, $content = null ) { extract( shortcode_atts( array( 'link' => '#', ), $atts ) ); $pfooter = '<div class="tf"><a href="'.$link.'">'.strip_tags($content).'</a></div>'; return $pfooter; } add_shortcode( 'price_footer', 'price_column_footer_func' ); function price_row_footer_func( $atts, $content = null ) { $prow = '<div class="td">'.$content.'</div>'; return $prow; } add_shortcode( 'price_row', 'price_row_footer_func' ); function teamoutput_func( $atts ) { extract( shortcode_atts( array( 'show' => -1, ), $atts ) ); $teamoutput = '<div class="team-members">'; wp_reset_query(); $k = 0; query_posts('post_type=team&posts_per_page='.$show); if ( have_posts() ) : while ( have_posts() ) : the_post(); $k++; $teamoutput .= '<div class="team-col"><div class="teamthumbs"><a href="'.get_the_permalink().'">'.get_the_post_thumbnail().'</a></div> <h3>'.get_the_title().'</h3> '.content( of_get_option('teamexcerptlength') ).' </div>'.(($k%4==0) ? '<div class="clear"></div>' : ''); endwhile; endif; wp_reset_query(); $teamoutput .= '<div class="clear"></div>'; $teamoutput .= '</div>'; return $teamoutput; } add_shortcode( 'ourteam', 'teamoutput_func' ); function testimonialoutput_func( $atts ){ $testimonialoutput = ''; wp_reset_query(); $n = 0; query_posts('post_type=testimonial&posts_per_page=3'); if ( have_posts() ) : while ( have_posts() ) : the_post(); $n++; if( $n%3 == 0 ) $nomgn = ' last'; else $nomgn = ' '; $testimonialoutput .= '<div class="testimonial-box'.$nomgn.'">'.get_the_post_thumbnail( get_the_ID(), array(82,82) ).' <div class="testimonial-post"> <h4>'.get_the_title().'</h4> '.content( of_get_option('testimonialslength') ).' </div> </div>'; endwhile; else: $testimonialoutput .= '<p>Sorry, testimonials is empty.</p>'; endif; wp_reset_query(); $testimonialoutput .= '<div class="clear"></div>'; return $testimonialoutput; } add_shortcode( 'testimonials', 'testimonialoutput_func' ); //Social function skt_white_social_area($atts,$content = null){ return '<div class="social-icons">'.do_shortcode($content).'</div>'; } add_shortcode('social_area','skt_white_social_area'); function skt_white_social($atts){ extract(shortcode_atts(array( 'icon' => '', 'link' => '' ),$atts)); return '<a href="'.$link.'" target="_blank" class="fa fa-'.$icon.' fa-2x" title="'.$icon.'"></a>'; } add_shortcode('social','skt_white_social'); // Social function latestpostsoutput_func( $atts ){ extract( shortcode_atts( array( 'show' => '', ), $atts ) ); $postoutput = ''; wp_reset_query(); $n = 0; //global $wp_query; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array('posts_per_page' => $show, 'paged' => $paged, 'post__not_in' => get_option('sticky_posts') ); query_posts( $args ); if ( have_posts() ) : while ( have_posts() ) : the_post(); $n++; if( $n%4==0 ) $nomgn = 'last'; else $nomgn = ' '; if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); $imgUrl = $large_image_url[0]; }else{ $imgUrl = get_template_directory_uri().'/images/img_404.png'; } $postoutput .= '<div class="news-box '.$nomgn.'"> <div class="news"> <div class="newsthumbbx"><a href="'.get_the_permalink().'"><img src="'.$imgUrl.'" alt=" " /></a></div> <h4><a href="'.get_the_permalink().'">'.get_the_title().'</a></h4> <div style="float:left;">'.get_the_date().'</div> <div style="float:right;color:#cccccc;font-weight:bold;font-size:15px"><img style="width:auto;float:left;position:relative;top:3px;" src="'.get_template_directory_uri().'/images/icon-comment.png" /> '.get_comments_number().'</div><div class="clear"></div> </div> </div>'; endwhile; $postoutput .= '<div class="post-nav">'; $postoutput .= '<div class="prev-page">' . get_previous_posts_link( "« Newer Entries" ) . '</div>'; $postoutput .= '<div class="next-page">' . get_next_posts_link( "Older Entries »", 3 ) . '</div>'; $postoutput .= '</div>'; endif; wp_reset_query(); $postoutput .= '<div class="clear"></div>'; return $postoutput; } add_shortcode( 'latestposts', 'latestpostsoutput_func' ); function social_media_func( $atts ) { $pcol = '<div class="social-icons">'; if( of_get_option('facebook', true)!= '' ) $pcol .= '<a href="'.of_get_option('facebook', true).'"><div class="icon-fb"></div></a>'; if( of_get_option('twitter', true)!= '' ) $pcol .= '<a href="'.of_get_option('twitter', true).'"><div class="icon-twitt"></div></a>'; if( of_get_option('youtube', true)!= '' ) $pcol .= '<a href="'.of_get_option('youtube', true).'"><div class="icon-ytube"></div></a>'; if( of_get_option('rss', true)!= '' ) $pcol .= '<a href="'.of_get_option('rss', true).'"><div class="icon-rss"></div></a>'; if( of_get_option('linkedin', true)!= '' ) $pcol .= '<a href="'.of_get_option('linkedin', true).'"><div class="icon-in"></div></a>'; $pcol .= '<div class="clear"></div></div>'; return $pcol; } add_shortcode( 'social_icons', 'social_media_func' ); function contactform_func( $atts ) { $atts = shortcode_atts( array( 'to_email' => get_bloginfo('admin_email'), 'title' => 'Contact enquiry - '.get_bloginfo('url'), ), $atts ); $cform = "<div class=\"main-form-area\" id=\"contactform_main\">"; $cerr = array(); if( isset($_POST['c_submit']) && $_POST['c_submit']=='Submit' ){ $name = trim( $_POST['c_name'] ); $email = trim( $_POST['c_email'] ); $phone = trim( $_POST['c_phone'] ); $website = trim( $_POST['c_website'] ); $comments = trim( $_POST['c_comments'] ); $captcha = trim( $_POST['c_captcha'] ); $captcha_cnf = trim( $_POST['c_captcha_confirm'] ); if( !$name ) $cerr['name'] = 'Please enter your name.'; if( ! filter_var($email, FILTER_VALIDATE_EMAIL) ) $cerr['email'] = 'Please enter a valid email.'; if( !$phone ) $cerr['phone'] = 'Please enter your phone number.'; if( !$comments ) $cerr['comments'] = 'Please enter your question / comments.'; if( !$captcha || (md5($captcha) != $captcha_cnf) ) $cerr['captcha'] = 'Please enter the correct answer.'; if( count($cerr) == 0 ){ $subject = $atts['title']; $headers = "From: ".$name." <" . strip_tags($email) . ">\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $message = '<html><body> <table> <tr><td>Name: </td><td>'.$name.'</td></tr> <tr><td>Email: </td><td>'.$email.'</td></tr> <tr><td>Phone: </td><td>'.$phone.'</td></tr> <tr><td>Website: </td><td>'.$website.'</td></tr> <tr><td>Comments: </td><td>'.$comments.'</td></tr> </table> </body> </html>'; mail( $atts['to_email'], $subject, $message, $headers); $cform .= '<div class="success_msg">Thank you! A representative will get back to you very shortly.</div>'; unset( $name, $email, $phone, $website, $comments, $captcha ); }else{ $cform .= '<div class="error_msg">'; $cform .= implode('<br />',$cerr); $cform .= '</div>'; } } $capNum1 = rand(1,4); $capNum2 = rand(1,5); $capSum = $capNum1 + $capNum2; $sumStr = $capNum1." + ".$capNum2 ." = "; $cform .= "<form name=\"contactform\" action=\"#contactform_main\" method=\"post\"> <p class=\"left\"><input type=\"text\" name=\"c_name\" value=\"". ( ( empty($name) == false ) ? $name : "" ) ."\" placeholder=\"Name\" /></p> <p class=\"right\"><input type=\"email\" name=\"c_email\" value=\"". ( ( empty($email) == false ) ? $email : "" ) ."\" placeholder=\"Email\" /></p><div class=\"clear\"></div> <p class=\"left\"><input type=\"tel\" name=\"c_phone\" value=\"". ( ( empty($phone) == false ) ? $phone : "" ) ."\" placeholder=\"Phone\" /></p> <p class=\"right\"><input type=\"url\" name=\"c_website\" value=\"". ( ( empty($website) == false ) ? $website : "" ) ."\" placeholder=\"Website with prefix http://\" /></p><div class=\"clear\"></div> <p><textarea name=\"c_comments\" placeholder=\"Message\">". ( ( empty($comments) == false ) ? $comments : "" ) ."</textarea></p>"; $cform .= "<p class=\"left\">$sumStr<input style=\"width:200px;\" type=\"text\" placeholder=\"Captcha\" value=\"". ( ( empty($captcha) == false ) ? $captcha : "" ) ."\" name=\"c_captcha\" /><input type=\"hidden\" name=\"c_captcha_confirm\" value=\"". md5($capSum)."\"></p><div class=\"clear\"></div>"; $cform .= "<p class=\"sub\"><input type=\"submit\" name=\"c_submit\" value=\"Submit\" /></p> </form> </div>"; return $cform; } add_shortcode( 'contactform', 'contactform_func' ); //custom post type for Our photogallery function my_custom_post_photogallery() { $labels = array( 'name' => __( 'Photo Gallery','skt-white' ), 'singular_name' => __( 'Photo Gallery','skt-white' ), 'add_new' => __( 'Add New','skt-white' ), 'add_new_item' => __( 'Add New Image / Video','skt-white' ), 'edit_item' => __( 'Edit Image/Video','skt-white' ), 'new_item' => __( 'New Image/Video','skt-white' ), 'all_items' => __( 'All Images/Videos','skt-white' ), 'view_item' => __( 'View Image/Video','skt-white' ), 'search_items' => __( 'Search Images/Videos','skt-white' ), 'not_found' => __( 'No images/videos found','skt-white' ), 'not_found_in_trash' => __( 'No images/videos found in the Trash','skt-white' ), 'parent_item_colon' => '', 'menu_name' => 'Photo Gallery' ); $args = array( 'labels' => $labels, 'description' => 'Manage Photo Gallery', 'public' => true, 'menu_icon' => 'dashicons-format-image', 'menu_position' => null, 'supports' => array( 'title', 'editor', 'thumbnail' ), 'has_archive' => true, ); register_post_type( 'photogallery', $args ); } add_action( 'init', 'my_custom_post_photogallery' ); // register gallery taxonomy register_taxonomy( "gallerycategory", array("photogallery"), array( "hierarchical" => true, "label" => "Gallery Category", "singular_label" => "Photo Gallery", "rewrite" => true ) ); add_action("manage_posts_custom_column", "photogallery_custom_columns"); add_filter("manage_edit-photogallery_columns", "photogallery_edit_columns"); function photogallery_edit_columns($columns){ $columns = array( "cb" => '<input type="checkbox" />', "title" => "Gallery Title", "pcategory" => "Gallery Category", "view" => "Image", "date" => "Date", ); return $columns; } function photogallery_custom_columns($column){ global $post; switch ($column) { case "pcategory": echo get_the_term_list($post->ID, 'gallerycategory', '', ', ',''); break; case "view": the_post_thumbnail('thumbnail'); break; case "date": break; } } //[photogallery filter="false"] function photogallery_shortcode_func( $atts ) { extract( shortcode_atts( array( 'show' => -1, 'filter' => 'true' ), $atts ) ); $pfStr = ''; $pfStr .= '<div class="photobooth">'; if( $filter == 'true' ){ $pfStr .= '<div class="filter-gallery"><ul class="clean" id="filter"><li class="current"><a href="javascript:void(0)">All</a></li>'; $categories = get_categories( array('taxonomy' => 'gallerycategory') ); foreach ($categories as $category) { $pfStr .= '<li><a href="javascript:void(0)">'.$category->name.'</a></li>'; } $pfStr .= '</ul></div>'; } $pfStr .= '<div class="gallery"><ul class="clean" id="portfolio">'; $j=0; query_posts('post_type=photogallery&posts_per_page='.$show); if ( have_posts() ) : while ( have_posts() ) : the_post(); $j++; $videoUrl = get_post_meta( get_the_ID(), 'video_file_url', true); $imgSrc = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full'); $terms = wp_get_post_terms( get_the_ID(), 'gallerycategory', array("fields" => "all")); $slugAr = array(); foreach( $terms as $tv ){ $slugAr[] = $tv->slug; } if ( $imgSrc[0]!='' ) { $imgUrl = $imgSrc[0]; }else{ $imgUrl = get_template_directory_uri().'/images/img_404.png'; } $pfStr .= '<li class="'.implode(' ', $slugAr).'" '.( ($j%4==0) ? 'style="margin-right:0"' : '' ).'> <strong>'.get_the_title().'</strong> <a href="'.( ($videoUrl) ? $videoUrl : $imgSrc[0] ).'" rel="prettyPhoto[pp_gal]"><img src="'.$imgSrc[0].'"/></a> </li>'; unset( $slugAr ); endwhile; else: $pfStr .= '<p>Sorry, photo gallery is empty.</p>'; endif; wp_reset_query(); $pfStr .= '</ul></div>'; $pfStr .= '<div class="clear"></div></div>'; return $pfStr; } add_shortcode( 'photogallery', 'photogallery_shortcode_func' ); function toggle_func( $atts, $content = null ) { extract( shortcode_atts( array( 'title' => 'Click here to toggle content', ), $atts ) ); $tog_content = "<div class=\"toggle_holder\"><h3 class=\"slide_toggle\"><a href=\"#\">{$title}</a></h3> <div class=\"slide_toggle_content\">".get_the_content_format( $content )."</div></div>"; return $tog_content; } add_shortcode( 'toggle_content', 'toggle_func' ); function tabs_func( $atts, $content = null ) { $tabs = '<div class="tabs-wrapper"><ul class="tabs">'.do_shortcode($content).'</ul></div>'; return $tabs; } add_shortcode( 'tabs', 'tabs_func' ); function tab_func( $atts, $content = null ) { extract( shortcode_atts( array( 'title' => 'Tab Title', ), $atts ) ); $rand = rand(100,999); $tab = '<li><a rel="tab'.$rand.'" href="javascript:void(0)"><span>'.$title.'</span></a><div id="tab'.$rand.'" class="tab-content">'.get_the_content_format($content).'</div></li>'; return $tab; } add_shortcode( 'tab', 'tab_func' ); function gradient_button_func( $atts ) { extract( shortcode_atts( array( 'size' => 'small', 'bg_color' => '#636b74', 'color' => '#fff', 'text' => 'More', 'title' => 'Click', 'url' => '', 'position' => 'center', ), $atts ) ); $btn = "<div class=\"clear\"></div>"; $btn .= "<a href=\"{$url}\" "; $btn .= ($title != "") ? " title=\"{$title}\" " : ""; $btn .= "class=\"grad-btn-{$size} btn-align-{$position}\" style=\"background-color:{$bg_color}; color:{$color}\">"; $btn .= "{$text}</a>"; $btn .= "<div class=\"clear\"></div>"; return $btn; } add_shortcode( 'gradient_button', 'gradient_button_func' ); function simple_button_func( $atts ) { extract( shortcode_atts( array( 'size' => 'small', 'bg_color' => '#636b74', 'color' => '#fff', 'text' => 'More', 'title' => 'Click', 'url' => '', 'position' => 'left', ), $atts ) ); $btn = "<div class=\"clear\"></div>"; $btn .= "<a href=\"{$url}\" "; $btn .= ($title != "") ? " title=\"{$title}\" " : ""; $btn .= "class=\"simple-btn-{$size} btn-align-{$position}\" style=\"background-color:{$bg_color}; color:{$color}\">"; $btn .= "{$text}</a>"; $btn .= "<div class=\"clear\"></div>"; return $btn; } add_shortcode( 'simple_button', 'simple_button_func' ); function round_button_func( $atts ) { extract( shortcode_atts( array( 'style' => 'dark', 'text' => 'More', 'title' => 'Click', 'url' => '', 'position' => 'left', ), $atts ) ); $btn = "<div class=\"clear\"></div>"; $btn .= "<a href=\"{$url}\" "; $btn .= ($title != "") ? " title=\"{$title}\" " : ""; $btn .= "class=\"round-btn-{$style} round-btn btn-align-{$position}\">"; $btn .= "<span>{$text}</span></a>"; $btn .= "<div class=\"clear\"></div>"; return $btn; } add_shortcode( 'round_button', 'round_button_func' ); function msg_box_func( $atts, $content = null ) { extract( shortcode_atts( array( 'type' => 'info', 'bg_color' => '#f6f6f6', 'color' => '#333', 'start_color' => "#fff", 'end_color' => "#eee", 'border' => "#ccc", 'align' => '', 'width' => '100%', ), $atts ) ); $msg = ''; if($type == 'success'){ $msg = '<div class="msg-success"><div class="msg-box-icon">'; $msg .= ($content == '') ? "This is a sample of the 'success' style message box shortcode. To use this style use the following shortcode" : $content; $msg .= '</div></div>'; }elseif($type == 'error'){ $msg = '<div class="msg-error"><div class="msg-box-icon">'; $msg .= ($content == '') ? "This is a sample of the 'error' style message box shortcode. To use this style use the following shortcode." : $content; $msg .= '</div></div>'; }elseif($type == 'warning'){ $msg = '<div class="msg-warning"><div class="msg-box-icon">'; $msg .= ($content == '') ? "This is a sample of the 'warning' style message box shortcode. To use this style use the following shortcode." : $content; $msg .= '</div></div>'; }elseif($type == 'info'){ $msg = '<div class="msg-info"><div class="msg-box-icon">'; $msg .= ($content == '') ? "This is a sample of the 'info' style message box shortcode. To use this style use the following shortcode." : $content; $msg .= '</div></div>'; }elseif($type == 'about'){ $msg = '<div class="msg-about"><div class="msg-box-icon">'; $msg .= ($content == '') ? "This is a sample of the 'about' style message box shortcode. To use this style use the following shortcode." : $content; $msg .= '</div></div>'; }elseif($type == 'custom'){ $msg = "<div style=\"width:{$width};\" class=\"msg-align-{$align}\"><div class=\"msg-custom\" style=\"background-color:{$end_color}; background: -moz-linear-gradient(center top , {$start_color}, {$end_color}); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from({$start_color}), to({$end_color})); background: -webkit-linear-gradient(top, {$start_color}, {$end_color}); background: -ms-linear-gradient(top, {$start_color}, {$end_color}); background: -o-linear-gradient(top, {$start_color}, {$end_color}); border:1px {$border} solid; color:{$color};\">"; $msg .= ($content == '') ? "This is a sample of the 'simple' style message box shortcode." : $content; $msg .= '</div></div><div class="clear"></div>'; }elseif($type == 'simple'){ $msg = "<div class=\"msg-simple\" style=\"background-color:{$bg_color}; color:{$color};\">"; $msg .= ($content == '') ? "This is a sample of the 'simple' style message box shortcode." : $content; $msg .= '</div>'; } return $msg; } add_shortcode( 'message', 'msg_box_func' ); function unorderedlist_func( $atts, $content = null ) { extract( shortcode_atts( array( 'style' => 'list-1', ), $atts ) ); $content = wpautop(trim($content)); $ulist = '<ul class="'.$style.'">'.$content.'</ul>'; return $ulist; } add_shortcode( 'unordered_list', 'unorderedlist_func' ); function skt_client_banner_main($atts, $content = null){ return '<div class="client_banner">'.do_shortcode($content).'</div>'; } add_shortcode('client_main','skt_client_banner_main'); function skt_client($atts){ extract(shortcode_atts(array( 'image' => '', 'link' => '#', 'clear' => '' ), $atts)); return '<div class="client '.$clear.'"><a href="'.$link.'" target="_blank"><img src="'.$image.'" /></a></div>'; } add_shortcode('client','skt_client'); define('SKT_PRO_THEME_URL','https://www.sktthemes.org/themes/skt-white-pro/'); define('SKT_THEME_DOC','http://sktthemesdemo.net/documentation/skt-white-doc/'); define('SKT_FORUM','https://www.sktthemes.org/forums/');Regards,
DaveJanuary 4, 2017 at 8:03 am #57306In reply to: Links Not Working
Hi Mark,
This issue was resolved from our end. I have added a section between services and testimonials. Kindly use plugin for Instagram photo feed and use its shortcode inside the section.
Regards,
Dave -
AuthorSearch Results
Search Results for 'shortcode'
-
Search Results
-
Topic: Home page blocks
Hi,
I would like to know how can I have customised content in the homepage blocks. Currently on the homepage blocks, the content is showing however even the shortcodes are showing which are a part of the page. I look forward for your response.Screenshot: https://www.dropbox.com/s/txqctejal44946m/homepage.JPG?dl=0
Hello,
I’m trying to create another section under the our partners section on the homepage that has the same slider with certifications in it using the same exact shortcode, but it doesn’t seem to be showing up. The site address is devtest.amtesting.co
Thank you in advance for the help it means a lot!
Evan Laird
Trying to build up a section on the homepage containing the [latest-posts show=”3″] shortcode and no matter what I do with the column width the latest list refuses to move into the center of the page.
I have the columns working fine in a section above, and when I replace the latest posts with any other content they center perfectly. Is there a CSS change needed or will the latest posts only live on the left?
