Sydney: See all our news button link


#1

I have an issue with my latest news widget on the frontpage and I don’t know how to resolve it.
I’ve looked around on the forum but could not find a working solution so far.

I want the button on the widget Latest news on the frontpage to link to an specific design with all of my latest news posts, no matter the category. Also when I click on a post on the frontpage, it takes me to the single post page. Which has an link to a category “onze verhalen” this link takes me to the same default post page.
How can I manipulate these buttons and links to send them to one page, which I design my self, which isn’t the default blogpage.

I did change the setting where I have a static page and also set up a specific posts page.
please check the following link:

any help would be greatly appreciated.
Kind regards,
Harold


#2

Hello Harold,

It looks like the button links to blog page already. Do you still need an assistance?

Regards,
Kharis


#3

kharisblank,

Thank you for you response.
The weird thing is that this page that is shown does not represent my blogpage.
What ever I do with the sidney widgets or the site origin widgets the don’t change or represent the layout that I’ve adjusted in the back-end. It just shows what seems to be the default wordpress layout.

I’m just want to create an different more attractive tiled layout for the posts.

So please advice me on how to achieve this.
Thanks in advance


#4

Kharis,

please advise some more on the extra comment above. I now see a bit what is happening.
I can’t seem to be able to change the link on the Lastest news widget. Once you click on the title of the article on the front page you’ll get forwarded to a single post. Which is correct. If you then on the single post click on the orange link “onze verhalen”. It forwards you to https://valkerij.info/category/verhalen/
This should be https://valkerij.info/berichten/

Thanks in advance,
Harold


#5

Hello Harold,

I am sorry for the long delay. To set a custom link for latest news button, try doing the below steps:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box
    ;(function($) {

      if( $('.widget_sydney_latest_news .more-button') ) {
        var link = 'https://valkerij.info/berichten/';
        $('.widget_sydney_latest_news .more-button').attr('href', link);
      }

    })(jQuery);
  1. Update

Clear any applied cache before reloading your site to see the changes.

Regards,
Kharis


#6

Kharisblank,

Thank you for responding. Sorry for my delay as well.
Unfortunately this does not work as expected.
I had the TC custom Javascript already installed. Because in the past I already added a short script for the employee widget. Now I have the following code.

    jQuery(function($) {

      if( $('.sydney_employees_widget').length ) {
          $('.team-item').each(function(){
            var link = $(this).find('.name a').attr('href');

            if(link != undefined) {
              $(this).find('.pop-overlay').wrapInner('<a href="'+link+'"></a>');
              $(this).find('.avatar').wrapInner('<a href="'+link+'"></a>'); 
            }
            
          });
      }   

    });

    ;(function($) {

      if( $('.widget_sydney_latest_news .more-button') ) {
        var link = 'https://valkerij.info/berichten/';
        $('.widget_sydney_latest_news .more-button').attr('href', link);
      }

    })(jQuery);

What happens at this time is the following:

  1. On the homepage I have the Latest post widget.

  2. The see more button has dissapeared. (don’t know how.)

  3. When I click on one of the links, they take me to the single post page. (which is OK)

  4. On the single post page there is an orange link (onze verhalen)
    eventhough I pasted your code, these links are still forwarded to https://valkerij.info/category/verhalen/ which is not the correct page.

I hope you can help me out to find a solution for this. If needed I could create an account for you. Would that do any good?

Thanks in advance.

Harold Lentink


#7

Hello Harold,

1

The latest news button will appear if category slug has been set in the widget setting. If hasn’t, it’ll appear if posts page has been specified in the Settings > Reading panel. “A static page (select below)” is active and a page chosen for “Posts page”.

3

To change archive link at the top of single post page, use this jQuery code:

    (function($){

      if( $('.single-post').length ) {
        var link = 'https://valkerij.info/berichten/';
        $('.entry-header .post-cat').attr('href', link);
      }

    })(jQuery);

Regards,
Kharis


#8

Kharis,

Again sorry for my delay. The problem with the button on de widget seems to be persistant. So I choose to leave it be. The customer seems to be satisfied with it. The rest of the solutions worked fine now. Thanks for the help. And maybe in the future well be in touch for another WP Sydney site. Thanks for you great support.
Kind regards.
Harold Lentink


#9

Okay Harold. You’re welcome. Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis