I’ve been searching for examples of this online and through the WP documentation on filters but I can’t find a suitable hook, so apologies for posting a question without a good example of what I’m trying to do! When you add a link to text or to a button in the editor, you can search for the …
Tag: wordpress
WordPress Ultimate Member Profile pic Scaled Images
We are using the Ultimate Member plugin and on our members directory page we have the profile images. The default profile image is 190×190 and on upload saves a 80×80 version. On the directory pages it is pulling in the 190×190 image rezising it to 80×80. I want to be able to pull in the 8…
how to add a link that its “href” is editable in word press panel?
Is there a way to create a link in theme file that its href value is editable in wp panel? e.g. <a href="”>view some page // wp_editable_link() is …
How to use WooCommerce is_shop conditional tag excluding searchs results
I have a function that uses the conditional tag is_shop. The function is intended to display a widget on the shop page only. However, it also returns the widget when a search is performed. Is there a way to only return it on the shop main page. My code is: I’ve tried using is_page as well with no joy. A…
How to create a filter dropdown on WooCommerce admin orders list?
I am trying to create a shipping state filter dropdown on WooCommerce admin orders list First I have added a custom column for shipping state to admin orders list: And here’s my dropdown filter, for shipping state: And here’s my question: How to process the selected filter on admin orders list whe…
How to get WooCommerce shipping methods cost and settings?
I’m trying to get all shipping methods, with their rates and title. But when i use WC()->shipping->get_shipping_methods() it will only return empty rates array, and empty title string. Here is a dump: I tried to Google the issue, but nothing really helped. Does anyone know what could be the issue?…
Convert number to star rating php shortcode?
I’ve used the following code in order to generate a star rating inside a shortcode on my site. I’m new to PHP and incredibly confused. The issue I have is, how can I make $starNumber a variable number that I can change inside the shortcode? For example, if I wanted to show 3.5 stars with a shortco…
Show posts of active category through jQuery
I have a page with different prizes, divided over 4 categories. When the page loads, the first category gets the ‘active’ class and I need the corresponding prizes to show at that moment. The code …
Add post_id to post_title only to posts with a post_type of “post “
I need to able to insert the id of the post in the post title. The id should be added to the title everywhere the title appears. It should only be added to posts with post type post and not added to pages, custom post types etc. I’ve managed to get this far: Which returns the post title and the
timber/twig how to pass `posts` php-object to JavaScript? Some values are lost
When I’m trying to pass the information contained in {{posts}} I cannot retrieve all of it, at least not the post.link information {% for post in posts %} var t = JSON….