How to loop through a custom post type using a shortcode and output each element in the loop using shortcodes

Probably you need to create a shortcode with parameters. You should have different parameters for font size, color, bold, underline or anything else. The user should insert a value for each of these parameters in the shortcode. You can find what you need here https://developer.wordpress.org/plugins/shortcodes/shortcodes-with-parameters/ It is a little tricky though because you must check … Read more

Error in Wordprewss loop for page template [closed]

I wasn’t able to recreate the error. Maybe it’s coming from <?php get_sidebars(‘right’); ?> I did change your code a little, but it didn’t give the “unexpected endwhile” error you spoke of. If it’s coming from line 1 I’d guess it’s the header.php file? Here is the adjusted code if you want to try it: … Read more

Fix html inside a for loop [closed]

First of all you have the PHP syntax all messed up. Second, you misused some WordPress template tags – you already echo the entire link like so you need to return post permalink and title, but right now the_permalink and the_title_attribute functions echo the code. Here’s your code fixed: foreach( $terms as $term ) : … Read more

Same posts within a paginated page

The problem is that you are running query_posts in the middle of the page, which, by the way you should nearly never do. That will overwrite the main query– the global $wp_query object. Pagination should probably appear to work. The problem is that the original main query runs before your template loads and thus before … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)