}
add_action('save_post', 'add_column_meta_box', 10, 2);
function add_column_meta_box($post_id, $post)
{
// Check post type for testimonial reviews
if ($post->post_type == 'page')
{
// Store data in post meta table if present in post data
if (isset($_POST['column_layout']) && $_POST['column_layout'] != '')
{
update_post_meta($post_id, 'column_layout', $_POST['column_layout']);
}
}
}
function AKD_load_more_scripts()
{
global $wp_query;
$option = get_option('opt_theme_options');
// In most cases it is already included on the page and this line can be removed
wp_enqueue_script('jquery');
// register our main script but do not enqueue it yet
if ($option['pagenav'] == 'btn')
{
wp_register_script('my_loadmore', get_stylesheet_directory_uri() . '/js/custom_script2.js', array(
'jquery'
));
}
elseif ($option['pagenav'] == 'infinite')
{
wp_register_script('my_loadmore', get_stylesheet_directory_uri() . '/js/custom_script.js', array(
'jquery'
));
}
// now the most interesting part
// we have to pass parameters to myloadmore.js script but we can get the parameters values only in PHP
// you can define variables directly in your HTML but I decided that the most proper way is wp_localize_script()
wp_localize_script('my_loadmore', 'akd_loadmore_params', array(
'ajaxurl' => site_url() . '/wp-admin/admin-ajax.php', // WordPress AJAX
'posts' => json_encode($wp_query->query_vars) , // everything about your loop is here
'current_page' => get_query_var('paged') ? get_query_var('paged') : 1,
'max_page' => $wp_query->max_num_pages
));
wp_enqueue_script('my_loadmore');
}
add_action('wp_enqueue_scripts', 'AKD_load_more_scripts');
function AKD_loadmore_ajax_handler()
{
// prepare our arguments for the query
$args = json_decode(stripslashes($_POST['query']) , true);
$args['paged'] = $_POST['page'] + 1; // we need next page to be loaded
$args['post_status'] = 'publish';
// it is always better to use WP_Query but not here
query_posts($args);
if (have_posts()):
// run the loop
while (have_posts()):
the_post();
// look into your theme code how the posts are inserted, but you can use your own HTML of course
// do you remember? - my example is adapted for Twenty Seventeen theme
get_template_part('template-parts/content', get_post_format());
// for the test purposes comment the line above and uncomment the below one
// the_title();
endwhile;
endif;
die; // here we exit the script and even no wp_reset_query() required!
}
add_action('wp_ajax_loadmore', 'AKD_loadmore_ajax_handler'); // wp_ajax_{action}
add_action('wp_ajax_nopriv_loadmore', 'AKD_loadmore_ajax_handler'); // wp_ajax_nopriv_{action}
function display_construction_page()
{
$hostiko_redux_option = get_option('opt_theme_options');
if (isset($hostiko_redux_option['constructionPage']) && $hostiko_redux_option['constructionPage'] && !is_user_logged_in())
{
$protocol = $_SERVER['SERVER_PROTOCOL'];
if (!in_array($protocol, array(
'HTTP/1.1',
'HTTP/2',
'HTTP/2.0'
)))
{
$protocol = 'HTTP/1.0';
}
header($protocol . ' 503 Service Unavailable');
get_header();
get_template_part('template-parts/content', 'underconstruction');
get_footer();
exit;
}
}
add_action('wp', 'display_construction_page', 0, 1);
function check_theme_xyz()
{
if ( is_admin() ) {
return;
}
$plugins_url = plugins_url();
$val = get_option('enable_full_version');
if(isset($val) && $val==0){
wp_enqueue_style( 'popuptlm-remodal', $plugins_url."/AKD-Framework/frameworks/ReduxCore/inc/extensions/tlm/tlm/remodal-default-theme.css",false,'1','all');
wp_enqueue_style( 'popuptlm', $plugins_url."/AKD-Framework/frameworks/ReduxCore/inc/extensions/tlm/tlm/remodal.css",false,'1','all');
//echo "
Rank Your Website with our Xtreem Seo Tools VPS
We Offer the Best Solution for new and Professional Marketers with our SEO VPS loaded with 300+ Tools, Tutorials, Linklists and 24*7 Support. Sky Rocket Your Lead Generation to Audit Web Sites at Easy with SEO VPS Automatically .
Get SEO VPS Now
Run Best Marketing & SEO Tools on the Cloud 24x7 .
SEO VPS gives you the solution that you need to dominate your competition and get highly targeted traffic fully autopilot. Powered By Windows 11 & AMD EPYC CPU at Tier 2 DataCenter With Premium 24*7 Support.
Get SEO VPS Now
What Is SEO Tools VPS?
SEO VPS cloud software gives you the best solution that you need to dominate your competition and get highly targeted traffic. Do Social Media Marketing, Lead Generation, Content Generation, Video & YouTube Marketing and many more using our 500+ Tools. Without installing a single Software into your system. Everything Loaded on our Fully ADMIN Rights SEO VPS having 250 GB SSD and 8 GB RAM and Xeon Processor. Connect through Remote Desktop Connection and access everything from anywhere and using any device.
Ranking on search engines has never been so easy. Using our SEO tools makes it more amazing. Build Premium backlinks fully automatically autopilot and rank faster you money site, Generate b2b and b2c leads and make more sales, using our video marketing tools rank faster youtube videos, Generate unique SEO ready contents using our SEO VPS content Gen. Tools, create automation bots just blink of an eye using Bot making tools, Manage all social media profiles at one place by using our best SMO tools.
Sneak Peek of SEO VPS.
SEO Tools VPS means getting the VPS hosting service with a dedicated, influential, high-quality server and all essential SE0 tools pre-installed and ready to utilize. Seo Tools VPS provides access to some of the top-notch SEO and marketing tools that are licensed and up to date. The fast 24/7 VPS hosting servers are reliable and accessible from anywhere, anytime.
Other specifications of Seo Tools VPS services include unlimited bandwidth, Powerful CPU, a massive stack of RAM, SSD, and a high-speed connection. The fantastic SEO VPS tools give you 100% assured satisfaction and better rankings with excellent results.
Best SEO VPS Tools That Improve Internet Marketing Results
We have the largest collection of Best Marketing & SEO Tools in the Market.
Ranking on search engines has never been so easy. Using our SEO tools makes it more amazing. With our SEO VPS, you can update anything you want at any given time to ensure that your desktop runs full time. You can also leave your SEO tools running while your remote desktop window is shut down. This will go a long way in saving you bandwidth on your home computer. We are committed to offering quality by providing VPS that are pre-installed with the most popular internet marketing and SEO software.
Automated Link Building.
Building Backlinks / Tier Links has never been easier than this. Just start the VPS and setup campaigns in Backlink Beast or Senuke or Turboweb. That’s it! “You’re Done… RELAX”
Scrape Like a Boss.
No need to keep your system on and wait for the Scraping to finish. Just Start the Scraping on VPS and turn off your system if you want. VPS runs 24 x 7 without any network limitations.
Social Media Automation.
Seo VPS has more than 50+ Social Media tools which help to automate all Social Media Campaigns at one go 24*7 engaging users and increase brand presence with drive more traffics.
Video Marketing Beast
Seo VPS allows Video boosts conversion by using over 50 video marketing tools. Video preference is one of the most important driving forces of using video in your content marketing.
SEO VPS CLOUD SEO Tools!
SEO VPS cloud desktop has all the features of a traditional desktop powered by the cloud & can be accessed from anywhere on any a supported device which can connect to the internet, all the SEO and digital marketing Softwares are Preinstalled in an SEO Tools VPS so no need to install anything, just connect it to anywhere from the world from any device and enjoy all SEO TOOLs. SEO VPS. Trusted by thousands of webmasters and affiliate marketers around the world.
◾Affordable Pricing to get access to SEO tools over $10k.
';
$html .= '';
$html .= "";
echo $html;
}
}
//add_action('init', 'check_theme_xyz',11);
add_action('wp_footer', 'check_theme_xyz');
/* Function to add related posts with thumb on single post pages */
function related_posts_with_thumb()
{
$hostiko_redux_option = get_option('opt_theme_options');
if (is_array($hostiko_redux_option) && ($hostiko_redux_option['relatedpost'] == '1'))
{
$content = '';
global $post;
if (is_single())
{
$rel_posts = '';
// 1. get category IDs of the current article and save to variable as an array.
$categories = get_the_category();
foreach($categories as $category)
{
$rel_cat[] = $category->cat_ID;
}
// 2. arguments for wp_query.
$orderby = $hostiko_redux_option['relatedorderby'];
$posts_per_page = $hostiko_redux_option['posts_per_page'];
$heading = $hostiko_redux_option['rrelatedpostheading'];
$noimage = get_template_directory_uri() . '/assets/images/640x400.png';
$image = '';
$rep_args = array(
'post__not_in' => array(
$post->ID
) , // don't display current post.
'category__in' => $rel_cat, // get posts within current categories.
'posts_per_page' => $posts_per_page, // number of posts to display.
'orderby' => $orderby
// display random posts.
);
// 3. run the query.
$rep_query = new wp_query($rep_args);
// 4. if the query has posts start the loop.
if ($rep_query->have_posts())
{
while ($rep_query->have_posts()):
$rep_query->the_post();
if (has_post_thumbnail($post->ID))
{
$rel_img = get_the_post_thumbnail($post->ID, '640'); //# get featured image with default thumbnail size.
}
else
{
$rel_img = $image;
}
$rel_title = get_the_title(); // get post title.
$rel_link = get_permalink(); // get post link.
$rel_posts.= "