Telescope: Adding categories, messed up slug? - telescope

Is anyone else having this issue? When I tried to add a category, the URL to the category isn't correct.
It adds a "category/{slug name}"
example: .comcategory/style

Just add "/" to the end of "Site URL"
"http://www.yourdomain.com/"

Related

Hide character with jQuery inside a span with a class

I've looked for the solution to this but nothing seems to be working.
I have an SKU within a span with a class of "sku". Some of the SKUs have periods before the SKU to allow for adding more than one product with the same SKU.
I'd like to hide the periods when the SKU is displayed though.
This is my code:
<span class="sku">..THESKU</span>
And this is the jQuery I am using:
<script>
$('span.sku').html($('span.sku').html().replace('.',''));
</script>
Is the right, or am I missing something? Thanks.
Your code will only replace one dot '.'. You can use regex to remove all the dots instead:
const skus = $('span.sku');
$('span.sku').each(function() {
const text = $(this).html();
const cleaned = text.replace(/\./g,'');
$(this).html(cleaned);
})
Hope this helps!
EDIT: Updated as suggested by #Taplar
I just wanted to give an update with this. I still couldn't get the periods to hide, but I found a way to have duplicate SKUs so there was no longer a need for this. Thanks for all your help.
If anyone has a similar issue, the code I used is below which I added to the themes functions file.
add_filter( 'wc_product_has_unique_sku', '__return_false', PHP_INT_MAX );

Change "Search and Filter" Plugin Default Text

I've installed the free version of "Search and Filter" plugin. I want to change the default text on the dropdown menu "All Categories" and "All Tags" to something else. I've tried using CSS but it didn't work. How can I do this?
If you have server FTP details then go to wp-content/plugins/your-plugin-folder, Try to find function where text like "All Categories" and "All Tags". Then try to call hook function using that function name from your wp-content/themes/your-theme/function.php.
So, when you update that plugin its not replace code on hook function and its working as it is.
Try this.
[searchandfilter fields="search,product_tag,product_cat" submit_label ="Search" search_placeholder="Search for a service" all_items_labels="All Tags, All Location"]
For me, I replaced All Tags with All location. Somehow label change only works for the second item of the shortcode. In my case Its product_cat.
Try to play around with the shortcode/label with this code.
I fix it with this:
[searchandfilter fields="search,category,post_tag" submit_label ="Search" search_placeholder="any keyword" all_items_labels=",All Technologies, All Countries" headings="Search,Technologies,Countries"]

How to change link

I have a link of a hotel which shows us three types of rooms, I need to change that link somehow so it will become direct link to "modern" type room like if I clicked on that rooms, the thing is that that link doesn`t change after I choose "modern" rooms. Can someone please show me and explain how to do that? Here is the link
Post some code so we can see what you're dealing with...
Maybe try using an anchor to wrap the content:
<div id ="#anchor_here"> code here </div>
To link straight to that section:
go to section
if i correctly understand u, you wanna change your static link based on the end users choice, for this purpose you have several choice and the best one is using JavaScript and Jquery same as below:
in html:
<a id="linkId" href="your_linl"> select me </a>
in js:
$('#linkId').attr('href' , 'new link')
is it the answere you looking for ? if not, plz explain more .

Thymeleaf loops and iterating

this is my template : http://pastebin.com/Gmdmqwxa
Whenever I add comment it is adding always to the first question on the list, even if I click on the others question 'Add Comment' button.However, the remove button works just fine for all the questions.
I think i know what it is working like that, so i thought i could use iterStat or something like that to iterate through questions, and then set th:action with iterStat, but its not working
<div th:each="question, iterStat : ${person.questions}" >
th:action="#{'/newComment/' + ${iterStat.current}}"
Maybe anyone has different idea how to fix this issue ?

Issue with title tag in <img> - show text until spacebar

So I have little issue with my title tag.
So I have some message like
IHaveSpacebars = I'd like to show you everything
I'm adding image via coffescript because I have to, but I think it wouldn't change a thing, so heres image code
<img src=\"#{url("/static/css/images/tick_shield.png")}\" style=\"margin-top:-6px\" title=" + i18n('IHaveSpacebars') + ">
i18n returns full string "I'd like to show you everything" so this is working well (checked via firebug).
So my issue: when I move mouse cursor over my image tick_shield.png it shows only I'd instead of I'd like to show you everything. I believe I messed up with this " + variable + " in title tag but I couldn't find anything else :/ examples that don't work:
title=i18n('IHaveSpacebars')
returns i18n('IHaveSpacebars') instead of txt
IHaveSpacebars = "I'd like to show you everything"
giving that one " " works, but that string is also used in other names (like column name) which will return column name with " ".
So do you guys (and girls:)) know how to write it correctly? I'm sure it's my fault with this " + . + " but couldn't find how to write it different.
Ok I found out a solution so maybe someone will find it helpful:
title="+"'"+i18n('IHaveSpacebars')+"'
The reason why it didn't work was that my original code title="+i18n('IHaveSpacebars')+" was returning
<img src="" title='I'd' like to show you everything>
while code above is returning
<img src="" title='I'd like to show you everything'>
Cheers ;)