pedjas
Forum Replies Created
-
Sorry, I am not willing to create account to yet another service and provide my personal info to unkown entity. I trust www.ads-software.com.
Forum: Plugins
In reply to: [Download Monitor] Please remove ?tmstv= from download URL’s by defaultCan you post link to Github ticket?
Forum: Everything else WordPress
In reply to: How to customize Category and Tag URL on Post?Forum: Everything else WordPress
In reply to: How to customize Category and Tag URL on Post?Here is an examle how it works with post link
add_filter('the_permalink', 'force_type_permalink_filter');
function force_type_permalink_filter ($url) {
global $current_type_filter;
return force_url ($current_type_filter, $url);
}$current_type_filter is variable where I have current filter definition
force_url() is function that alters provided URL with provided filter definition.
I cannot find analog way to do this with urls for categories, tags ond other taxonimies.
i tried using ‘get_archives_link’ instead of ‘the_permalink’ but that did not work. It seems like ‘get_archives_link’ hook is not trigerred at all.
Forum: Everything else WordPress
In reply to: How to customize Category and Tag URL on Post?Sure I will try to make an example. thanks for taking interest.
Lets say we have WP blog showing jokes.
There are categories like: math jokes, sailor jokes, adult jokes and so…
There are also number of tags.
And there is custom taxonomy that describes each post if it is text joke, video joke, cartoon joke or photo joke (like memes). Idea is: user can choose what kind of jokes he likes to see and set that filter so he sees only them until he resets filter.
So user opens category of math jokes, and all posts displayed are well – math jokes.
But there is option for user to filter by custom taxonomy, so he chooses cartoon jokes. Filter expression is in some way incorporated in URL, for simplicity lets say it is query variable. URL is used as it allows passing filter around and also user can bookmark it.
Now he gets posts from category math jokes but only cartoon jokes.
On web page beside joke itself for each joke it is listed what all categories it belongs to, what tags are attached. This is where I stumbled ona problem. WP renders URLs/ for categories and tags using home url of a site. It does not know and does not include query in web page URL in rendered urls.
I want to intercept it and change urls for categories and tags so when user clicks on any category or tag listed on page which is custom filtered to show only cartoons, he again gets only cartoons. It should work that way, until user removes his custom set filter.
So far I can hook to some event that fires after whole HTML content is rendered and than use brute force to search all links ans replace them. But that is brute force.
I hope there is way that I can intercept url creation for categories and tags so i can fix them there.
For example, if I want to to the same to links of posts I can use hook ‘the_permalink’ and fix it there (i tried it, works fine). But I cannot find similar hook that works for categories, tags or any other taxonomy in general.Forum: Everything else WordPress
In reply to: How to customize Category and Tag URL on Post?I found https://developer.www.ads-software.com/reference/hooks/get_archives_link/ as it seems maybe should allow me to change URL of archive link, but I did not manage to make it work. It seems like filter is not triggered at all.
add_filter("get_archives_link", "test_archives_link_filter"); function test_archives_link_filter($link_html) { $link_html = "CHANGED URL"; return $link_html; };
I just want to send notifications about new posts but in plain text. No HTML bloatware.
Forum: Plugins
In reply to: [Advanced Query Loop] Order by ACF custom date fieldHmmm, I found out that I have to turn off “Inherit query from template” to get “Meta Query section” visible, but I cannot to that as I am customizing sort for specific Category. If I turn it off then I loose Category information.
Forum: Plugins
In reply to: [Advanced Query Loop] Order by ACF custom date fieldHow do you get this Post Meta Query section?
I do not have that in AQL Block configuration. When I change sort to Meta Field I see notification “Meta Value and Meta Value Num require that Meta Key is set in the Meta Query section.”, but there is no Meta Query section.
Forum: Plugins
In reply to: [Advanced Query Loop] Undefined index: queries on query-loop.php on line 23It seems OK so far. Good work. Thanks!
There are few other issues i described in other topics.
And last night I stumbled on another one regarding pagination. I wIll post about it.I decided to abandon idea of using template created in editor. I removed it and creates template in theme folder by copying achive.html template to archive-customtaxonomyname.html (I found out that Gutenberg templates are html not php).
Again, template showed up in Templates editor, but I was unable to load it using include_template filter.
By examining code of locate_template() I realized that it does not load Gutenberg templates. It seems to work only with old style templates.
Is there other way to programmatically change template that is to be loaded for selected web page?
Forum: Plugins
In reply to: [Advanced Query Loop] When ACL is installed, i get robots noindex for usersWell, i did turn off al plugins and found out that only this one causes this behavior. I did not try to switch theme. I am bit scared that may mess my site.
Forum: Plugins
In reply to: [Media Library Assistant] Showing uploaded photos on user profileGreat! It works now! ??
Good job!
Forum: Plugins
In reply to: [Media Library Assistant] Showing uploaded photos on user profileI sent it.
Forum: Plugins
In reply to: [Media Library Assistant] Showing uploaded photos on user profileIn Admin/Users, for each user there is an option View. I click on it end get user page, which is referred as an Author page.
There is Author page template where I placed shortcodes.