Adding a new layout for genesis

I have attempted answering my own question with the following code: // Added to layout.php in /genesis/lib/structure.php add_action(‘genesis_before’, ‘modalwindow_layout_logic’); function modalwindow_layout_logic() { $site_layout = genesis_site_layout(); if ( $site_layout == ‘modalwindow’ ) { // Remove default genesis sidebars remove_action( ‘genesis_after_content’, ‘genesis_get_sidebar’ ); remove_action( ‘genesis_after_content_sidebar_wrap’, ‘genesis_get_sidebar_alt’); remove_action( ‘genesis_footer’, ‘genesis_do_footer’ ); remove_action( ‘genesis_header’, ‘genesis_do_header’ ); // Remove layout … Read more

Pagination not working properly

Don’t use query_posts in the template. If you delete that line, your template will paginate correctly. If you want to alter the main query, use the pre_get_posts action. Currently, your query overwrites the default main query, and you don’t set any pagination parameters within the query, so you’re always going to get the first 10 … Read more

HTML to WORDPRESS [closed]

Designing in plain ‘ol HTML and CSS could make easier. However, there are many features of the WordPress framework that you’ll miss out on. Read some of the WP documentation in the Codex to begin with: https://codex.wordpress.org/Site_Design_and_Layout I will also draw your attention to the body class attribute, which I find extremely useful when designing … Read more

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