ubikus
Forum Replies Created
-
it’s necessary to add <?php body_class( $class ); ?> in body tag
because the style has this parent rule: body.kingcomposeris it possible to add this piece of code to the footer?:
<script type="text/javascript">var kc_script_data={ajax_url:"http://www.elmer-designstudio.com/test/elmernew/wp-admin/admin-ajax.php"}</script><script type="text/javascript">function kc_viewport(st){var d=document;if(d.compatMode==='BackCompat'){if(st=='height')return d.body.clientHeight;else return d.body.clientWidth}else{if(st=='height')return d.documentElement.clientHeight;else return d.documentElement.clientWidth}}function kc_row_action(force){var d=document;[].forEach.call(d.querySelectorAll('div[data-kc-fullwidth]'),function(el){if(force!==undefined&&force===true){if(el.getAttribute('data-kc-action')=='loaded')return;else el.setAttribute('data-kc-action','loaded')}var kc_clfw=d.querySelectorAll('.kc_clfw')[0];if(el.offsetWidth!=kc_viewport('width')){var rect=kc_clfw.getBoundingClientRect();el.style.left=(-rect.left)+'px';if(el.getAttribute('data-kc-fullwidth')=='row'){el.style.paddingLeft=rect.left+'px';el.style.paddingRight=(kc_viewport('width')-rect.width-rect.left)+'px';el.style.width=rect.width+'px'}else{el.style.width=kc_viewport('width')+'px'}}if(el.nextElementSibling!==null&&el.nextElementSibling.tagName=='SCRIPT'){if(el.nextElementSibling.innerHTML=='kc_row_action(true);'){el.parentNode.removeChild(el.nextElementSibling)}}})}</script>Yes, versión 2.3.1
Forum: Fixing WordPress
In reply to: Random post order and pagination for a specific queryYou could do something like this. Check if the word RAND is in the orderby, if so then modify the query else do nothing.
This will work if you are only using the RAND in one Query.
Otherwise you could invent a word to make the RAND like this:‘orderby’=>’myrand’
and then
$pos = stripos($orderby_statement, “MYRAND”);
function edit_posts_orderby($orderby_statement) { $pos = stripos($orderby_statement, "RAND"); if($pos===false) return $orderby_statement; else{ $seed = $_SESSION['seed']; if (empty($seed)) { $seed = rand(); $_SESSION['seed'] = $seed; } $orderby_statement = 'RAND('.$seed.')'; return $orderby_statement; } }Hope it works
Forum: Fixing WordPress
In reply to: Making a shortcode?Add this:
‘orderby=name&show_count=1&echo=0&title_li=&hide_empty=0‘Forum: Fixing WordPress
In reply to: renamed wp-content now plugin no updating/installingYes, you cannot rename wp-content folder unless you tell wordpress the new name:
define( ‘WP_CONTENT_DIR’, dirname(__FILE__) . ‘/blog/wp-content’ );