single.php change into a modal popup bootstrap wordpress

Check the original answer Here. <div class=”container” style=”margin-top:20px; min-height:500px;” > <div class=”row”> <?php $labels = new WP_Query(array( ‘post_type’ => ‘slider’, ‘posts_per_page’ => 1000 )); while ( $labels->have_posts() ) : $labels->the_post(); ?> <?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array(5600,1000 ), false, ” ); ?> <a href=”#myModal-<? the_ID(); ?>” data-toggle=”modal” > <div class=”span2″ style=”background: #09F url(<?php echo $src[0]; … Read more

Override parent theme translation on child theme

I think I found a solution, but before a little Premise load_theme_textdomain() and load_child_theme_textdomain() are basically equal, the only difference is the default path they use: they get the current language (using get_locale()) and add the relative .mo file to the path passed as argument; then they call load_textdomain() passing as argument both the textdomain … Read more

Displaying wp menus by name without using theme locations

Umm u can do that easily. And this is the way I do how i register my menu in functions.php add_action(‘init’, ‘register_custom_menu’); function register_custom_menu() { register_nav_menu(‘custom_menu’, __(‘Custom Menu’)); } Then in ur admin panel u create different menu by ur desired name. And get the menu where ever u want like this. EX:- if I … Read more

When does WordPress wrap inline scripts in CDATA?

Actually, it is not WordPress that is inserting the CDATA tags, but the visual editor, TinyMCE. Details of TinyMCE are offtopic here, but you can read a solution to this on Stackoverflow. That said, stopping TinyMCE may not be the full solution you want. WordPress itself also has a function for adding CDATA tags, wxr_cdata, … Read more