How to create a shortcode with HTML code in it and custom parameters/

As per the shortcode documentation, your shortcode callback recieves any parameters set by the user in a $atts variable. You can combine them with any default values you might have with shortcode_atts(). function newsletter( $atts ) { $atts = shortcode_atts( array( ‘url’ => ‘https://domain.com/newsletter/z2o7q6’, // change default value as needed ‘headline’ => ‘Newsletter Box Headline’, … Read more

I need css code to divide my webpage sections into two columns

First, move your headings into their sections, so your structure looks more like this: <main> <section> Heading Here Cards Here </section> <section> Heading Here Cards Here </section> </main> Then you can do this in a few different ways with CSS. The simplest way is to add a class to each section and then float the … Read more

Implement “No related posts for this entry” into the loop?

I still can’t see how the code and the problem is substantially different from your original topic; however, try to add your text into the typical ‘else’ location for a loop if no posts are found; change this line: <?php endwhile; endif; ?> to: <?php endwhile; else : echo ‘<h3 class=”no-related-posts”>sorry but there are no … Read more

HTML in PHP problem [closed]

You get the error because you try to call php inside php. Try to use this snippet and see what is different: <?php if(get_field(‘post_image’)) { echo ‘<img src=”‘. get_field(‘post_image’) .'” />’; } else { echo ‘<img src=”‘ . get_bloginfo(‘template_url’) . ‘/images/images/default.jpg” />’; } ?> Also pay attention that bloginfo immediately prints value, when get_bloginfo returns … Read more

How to create an Single-Portfolio page?

You have to use the Slug of your Custom Post Type “portfolio” for the filename, as you pointed out, single-portfolio.php is correct if your slug is “portfolio”. You just have to take one more step, create the file in the Theme directory (the same folder where your single.php is located). WordPress automatically selects the single-portfolio.php … Read more

How to edit homepage in WordPress?

If it really is the header you want to edit, you can find its source here: /wp-content/themes/Wallbase/header.php Depending on A) what it is exactly that you want to customize, and B) how your theme is set up and what options it comes with, you might want to try the Theme Options, which can be found … Read more

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