Duplicate domain database to local – How?

I will suggest WordPress Duplicator, It is best tool for copying your site to any other host/localhost, and its free, I have used it many times and it works every-time with different server settings. Please note that I haven’t affiliated with it in any way.

Passing a shortcode attribute to a sub-function

There are different ways to get the result. You can use a class, store the div content in a class or instance variable and output it when needed. As alternative you can use a function with a static variable, to hold the content. I’ll use this second alternative, converting it in a class is an … Read more

file_exists() acting weird

You are using get_template_directory_uri(), that’s URL, not PATH. Instead use get_template_directory(), that’ll return PATH. Like: $csv = get_template_directory() . ‘/report/report.csv’;

Using Echo in ShortCode – Stuck

You can also use output buffering to catch all output you generate. Use it like following: function fl_aries_co_today_shortcode() { global $wpdb; $results = $wpdb->get_results(“SELECT horoscope FROM wpaa_scope_co WHERE date = CURDATE() AND sign = ‘aries'”); ob_start(); foreach($results as $r) { echo “”.$r->horoscope.””; } $content = ob_get_contents(); ob_end_clean(); return $content; } add_shortcode( ‘fl_aries_co_today’,’fl_aries_co_today_shortcode’ );

Add footer.php to WordPress child theme

You have wrong argument for the filter. The first argument of the add_filter is the filter you are hooking up to. In your case it’s the mesmerize_get_footer_copyright. The second argument is the Call back function that would run the filter is called. So change your add_filter to this add_filter(‘mesmerize_get_footer_copyright’, ‘change_copyrightText’, 10,1) ;

Rectangle avatars

As far as I know the get_avatar() function only allows for square values. That doesn’t mean you couldn’t use styling to display a rectangular avatar. Essentially you would use styling to “shave off” 150px from the width. So, let’s assume that your theme file produces a 300 x 300 pixel avatar for the post author … Read more

Display all posts in current category

Try this: $cat = get_query_var(“cat’); $PozCat = get_category ($cat); $PozCat->id // give to us current cat id. Then use this hook in your query: <ul> <?php $cat = get_query_var(‘cat’); $PozCat = get_category ($cat); //$PozCat->id query_posts(‘posts_per_page=-1&cat=”.$PozCat->id); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><a href=”https://wordpress.stackexchange.com/questions/70634/<?php the_permalink();?>”><?php the_title(); ?></a></li> <?php endwhile; endif; … Read more