Recent posts with comment count in “Sidebar” template [closed]

‘;’ is missing in this line echo “<dt>$recent_date &nbsp; / &nbsp; <span class=”comment”><a href=”$recent_link#disqus_thread”>$recent_count</a></span></dt><dd><a href=”$recent_link” title=”$recent_title”>$recent_title</a></dd>” For this reason code is throwing the fatal error. Please replace that line with this code echo “<dt>$recent_date &nbsp; / &nbsp; <span class=”comment”><a href=”$recent_link#disqus_thread”>$recent_count</a></span></dt><dd><a href=”$recent_link” title=”$recent_title”>$recent_title</a></dd>”;

Jquery Ui Tabs not working

Why are you using hosted versions of jQuery and jQuery UI when WordPress has local versions? To use tabs you need to add the tabs register code in a js file or in your footer (via the wp_footer filter) in your functions.php e.g. function wpse203799_footerscript(){ ?> <script type=”text/javascript”> $(function() { $( “#tabs” ).tabs(); }); </script> … Read more

Can anyone tell some online tuts for plugin development for beginner? [closed]

A good place to start is creating a plugin to replace adding code to your functions.php file and making it “must use”. That way your code additions are independent of your theme. It’s basic and useful and won’t be accidentally removed, or disabled. http://wpninjas.com/how-to-create-a-simple-wordpress-plugin/ https://premium.wpmudev.org/blog/why-you-shouldnt-use-functions-php/ Hope that helps! PS I’m new, so please excuse me … Read more

Retrieve a post with its ACF repeater fields in wordpress

<?php $the_query = new WP_Query(array( ‘post_type’ => ‘our-partners’, ‘posts_per_page’ => 1, ‘order’ => ‘DESC’ )); if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); if( have_rows(‘slider_partenaires_hp’) ): //”slider_partenaires_hp” is the repeater field // loop through the rows of data while ( have_rows(‘slider_partenaires_hp’) ) : the_row(); // display a sub field value echo “<li … Read more

How to make a sticky footer?

I think I figured out the answer. In your footer.php file add a div like that goes outside the footer and assign your footer class to it. For example, <div class=”sticky-footer”> <footer id=”colophon” class=”site-footer”> <div class=”site-info”> <?php /* translators: 1: Theme name, 2: Theme author. */ printf( esc_html__( ‘Theme: %1$s by %2$s.’, ‘best’ ), ‘best’, … Read more

Invalid Menu Items

I’ve identified two issues, the first, this: ‘rewrite’ => true, ‘rewrite’ => array( ‘slug’ => ‘districts’ ), Can just be this: ‘rewrite’ => array( ‘slug’ => ‘districts’ ), And the second, the reason you get invalid menu items, is because districts is being used as the rewrite slug, but, the internal namevof the taxonomy is … Read more

getting id of page

I think this is what you want: $qobj = get_queried_object(); var_dump($qobj->term_id); get_queried_object will get information about the current page. That information varies by type and content for different pages but on a taxonomy page it will give you a stdClass object with taxonomy data related to that page..