Php code error in wordpress if else statements [closed]

You have multiple syntax errors in your code, see comments in below code: Code: <?php $googleplay = get_option(‘director_googleplay’); ?> <?php if( $googleplay ) : ?> // use echo not print <a href=”https://wordpress.stackexchange.com/questions/133771/<?php echo $googleplay; ?>”> // rework your src/IMAGES statement // is this a constant/variable? <img src=”<?php echo IMAGES; ?>/googleplay.png” class=” img-responsive top-buffer-5″ alt=”Image”/> // … Read more

Adding Separator to Breadcrumbs

I’m not sure if you want it like this, however, this can be achieved by CSS. .crumbs > span > span + span { margin-left: 1em; } .crumbs > span > span + span:before { content: ‘|’; /* or something else */ *display: inline; display: inline-block; margin-left: -1em; width: 1em; text-align: center; } // EDIT … Read more

wordpress plugin license issue -New plugin development

You have to find out how the plugin is licensed that you are going to use. Then read the details of that licence. Usually the least to do is to mention the author and/or name of the plugin used. For reference WordPress is licensed under GPLv2 (or later). The WordPress License

Wrap posts p tags in div

You need to add it to a JS file and then enqueue it in your functions.php jQuery(document).ready(function($){ $(‘p’).wrap(‘<div class=”post-txt” />’); }); If you already have a js file, you can add it to that file and you’re done. Else, save the above snippet in a new file. Put that file in a folder called js … Read more

Assign Custom classes to every Excerpt

Firstly, there are syntax errors in your (last block of) code. And secondly, you don’t need to add any specific class at all. Just use the post ID for each post: <article id=”post-<?php the_ID(); ?>”> <div class=”post-content”> <?php if (‘excerpt’ === $gantry->get(‘blog-content’, ‘content’)) : ?> <div class=”excerpt”> <?php the_excerpt(); ?> </div> <?php else : ?> … Read more

List all anchor links on a page

In short, you’ll run the loop twice. The first time creating the links. The second time creating the posts. The trick is to figure out what the ID will be for the post. It needs to be something unique: We could use the slug or the post ID. <?php // I’m going to get the … Read more