FooGallery not opening custom URL, resolved

Recently I wanted to add a small, yet nice looking gallery of work to my site, specifically to my About page. Although I do use and advocate for Elementor as a product (especially for non coders) I didn’t much like the galleries on offer there, and I am generally not one to use “non Elementor created” add-ons.

I decided to go with FooGallery as I like the typical style it uses and had used it years previously, with good results.

Adding the gallery itself is a breeze, and I was organised enough to have all of my images sized to what I liked, so creating a carousel with a half dozen or so images of websites I had either created, or designed and created, didn’t take too long at all. Thinking it would be good to also have a link to the website, I carefully added custom URLs to each of the images in the gallery.

Check the Gallery Settings, Thumbnail Link

I am using the Carousel style gallery, so one thing to check here is that the Thumbnail Link setting (at the bottom of the General settings of the Gallery) is set to “Custom URL”.

Picture of FooGallery Carousel Mode Gallery Settings

I figured once done, I could save the gallery, view it on the live page, and people could click through to the real deal. WHAT A FOOL I WAS!!

Check the Lightbox Settings

With the above set, you also need to check the Lightbox settings on the Gallery itself (not the general Foobox settings) and set this to something other than the default; set it to FooBox.

This solution was found largely thanks to a WordPress support topic, found here, but part of me wanted to write this blog about it if for nothing other than to remind myself this issue existed!

Once then saved and page loaded, the custom URL was working as expected.

I hope you found this helpful! If so, please share with your socials, or let me know if you run into any issues in the comments section.

Having Blog in your Post URL without affecting Custom Post Types

Is it possible to include “blog” in the Post URL?

I was working on a project where I was transferring to a different CMS (WordPress), and the original blogs all had “blog” in the URL. I wanted the same format in the new site, figuring this was the best thing to do for existing SEO.

However, the new WordPress site is also using Custom Post Types (CPTs) and I didn’t want to affect the URLs of those posts. My instinct was to change the Permalink Settings to add “/blog” to the front, but this also affected the CPT URL.

example of Permalink Structure with blog at the front

Checking with my good friend Google seemed to take me longer to find the solution than expected, and admittedly I may be just stupid, but I thought I’d write this to see if it helps anyone else in the same, or similar, situation.

Why not use a Custom Post Type plugin to handle this?

It is highly likely that a decent Custom Post Type plugin would be able to handle this “out of the box”, however I had already created the post type somewhat manually, using what I think is a very nifty little plugin called WPCode which typically means for me less plugins installed overall (seriously, check it out, it’s great).

Ultimately it meant I had basically entered the CPT code manually, but obviously had something missing that might allow me to “strip” or ideally “ignore” this starting part of the URL structure.

Links high up the Google SERP had me looking at various Custom Post Type plugin solutions, or more like stripping it after the post was published or upon retrieval which seems like a slow way of doing things (or if not slow, less efficient), meaning doing something via the functions.php file.

Finding what I thought was going to be my answer, as it at least spoke about the Post Type registering process, only gave me half the answer and contained my bug bear (one of many) of typically developers (yes I am looking at mostly ALL of you developers out there!) that tend to post incomplete code snippets under the assumption that I am smart enough to figure out the rest. Well I am NOT, dammit!

My answer with a more or less complete code snippet

My Custom Post Type is Projects. I want the URL / slug to appear as “project”, so something in the line of https://mysite.com/project/project-post-title.

So in my arguments array, the start of which looks like below:

// Set other options for Custom Post Type
      
    $args = array(
        'label'               => __( 'Projects', 'responsive-mobile-child' ),

I had the following right at the end or the array:

'rewrite' => array( 'slug' => 'project'), // my custom slug

    );

Which worked perfectly fine until I changed the Permalink structure as per above, which meant I now had https://mysite.com/blog/project/project-post-title.

Not cool, and probably not ideal for SEO considering the original “projects” had the more desirable URL.

All I had to do though was slightly edit that rewrite line, so it now included ‘with_front’ => False and now it looks like this:

'rewrite' => array( 'slug' => 'project', 'with_front' => False), // my custom slug
);

Saving the Permalink again at this point seems a good idea, so after doing that my “Projects” all had the appropriate URL (with just “projects” in the URL) and my regular posts have “blog” in the URL.

Huzzah!

Hope this has helped someone, and if any more explanation, or code snippets, are required then feel free to get in touch. And don’t forget to share!

How to remove the text “Published On:” in Avada custom archive page

Avada theme screenshot

Recently I created a custom Blog and Blog Archive page for a site using the Avada theme, and this brought my first experience with Fusion Builder. 

This in itself was a reasonably smooth process, once I watched a tutorial or two on how to best delineate between header, content, and footer.

Whilst I got the Blog page working the way I wanted it, I noticed on the Blog Archive page that, within the meta information, some extra strings were being presented such as showing “Published On:” before the published date, and “Categories:” before the list of categories. These don’t show on the standard Blog page, and it seemed more tied to the Post Card Blog Archive element I was using.

I couldn’t find any way within Avada options (nor element options) to control this, or change the labelling.

Thanks to this Stack Overflow question, I was able to find more generally where the issue was coming from but then had to dive a little deeper to find out the exact file in question, as it wasn’t mentioned in any of the answers.

Part of the issue is that the above mentioned strings all form part of a single span, meaning that the “Published On:” string was immediately followed by the actual published date, and contained within a single span. This meant a CSS solution alone was not going to work.

So, for those that might have followed the same path and looking for something a little more specific, I can tell you that the way I fixed it was to find the Fusion Builder plugin (fusion-builder), then the “shortcodees” folder, “components” folder, meta.php file.

Doing a search for “Published On:” within this file showed this:

case 'published_date':
	/* Translators: %s: Date. */
	$content .= '<span class="fusion-tb-published-date">' . sprintf( esc_html__( 'Published On: %s', 'fusion-builder' ), get_the_time( $date_format ) ) . '</span>' . $separator;
	break;<br />

I kept the “%s” component so that the code now read as this (recommended to make a copy of the original file before editing):

case 'published_date':
	/* Translators: %s: Date. */
	$content .= '<span class="fusion-tb-published-date">' . sprintf( esc_html__( '%s', 'fusion-builder' ), get_the_time( $date_format ) ) . '</span>' . $separator;
	break;

Rinse and repeat for “Categories:” and any other meta label you might want to remove. Save the file, and upload it to the server, refresh the page and got the result I wanted.

The downside of this method is that the changes will need to be made again if and when the Avada theme is updated, but to date I have not found another way to handle this situation.

In the meantime, I hope this information has helped you!

Options to replace nRelate related articles plugin

blog feature image

Sadly, the nRelate WordPress plugin, a simple yet effective related articles plugin, will soon cease to be. Support for this plugin will come to an end on 31st December 2014.

With nRelate often appearing in the list of best related article plugins, this has forced many people to search for a new product, perhaps something just as simple or something with a few more options. Read more Options to replace nRelate related articles plugin

59 WordPress tutorials for all levels

blog feature image

Recently found a list of WordPress tutorials on the Creative Bloq website, that has a vast range of well explained “how to” articles, for the beginner as well as the more experienced WordPress user.
some examples of the WordPress tutorials on offer
I am still working through the list myself, and sometimes find that links are not working (for articles linked to Smashing Magazine in particular. The link has wp. at the very beginning, if you replace this with www. then it tends to work as expected).

59 WordPress Tutorials

When there is a space in your php file no one can hear you scream

blog feature image

Except for perhaps most people on my street, nobody could hear my cries of anguish when met with first of all the “white screen of death” in a WordPress site I was working on.

Couple this with also being unable to access the Dashboard area of WordPress, with an error such as:

Warning: Cannot modify header information – headers already sent by (output started at //home/htdocs/wordpress/wp-config.php:1) in /home/htdocs/wordpress/wp-login.php on line 12

Or something similar.

Both on a live site. Whoops.
Read more When there is a space in your php file no one can hear you scream