Browsing Category

Wordpress functions

Include mobile_detect.php in wordpress child theme?

I am trying to include Mobile_Detect.php file in my wordpress child theme, I have put the file in a folder named includes in my child

Get all posts remove all urls from content and save each post

can someone explain me, how i can do this with functions.php for example: <a href="URL" class="external" rel="nofollow" target="_blank">Name</a> Read more here: Get all posts remove

Display content of page and prevent additional markup

I’ve wrote following function to get the content of a single page: function get_only_content_of_page_by_name( $pagename ){ $page = get_page_by_title($pagename); if($page->post_status == 'publish'){ $content = apply_filters('the_content',

Edit TinyMCE Button Functionality

How can I edit the “Align Right” button functionality on WordPress’ TinyMCE to add a class “alignright” instead of “style=’text-align: right'” for text. TinyMCE already

How to integrate owl carousel into theme without using a plugin?

I’ve been trying to integrate the owl.carousel into my theme but can’t get it to work. The instructions on the page are not for WordPress

need help with ‘… read more’ excerpt in functions.php

I have this to generate the link: <a class="view-article" href="' . get_permalink($post->ID) . '">' . __('View Article', 'html5blank') . '</a>'; But I don’t want it

replacing words to "…"

So, I have this post title that has a certain length (say 15 words). When the browser width is reduced, the overflown words are placed

Function that prevents users from uploading photos more photos

Mjello, I’m struggling with this function that prevents users from uploading more photos than what their membership are entitled to. So they have 10 photos

Call function without having to wait on response

When submitting a form I want to call an additional function that will connect to a webservice. Because of the slow response time of that

Overwriting shared image on Facebook to Yoast image

I am facing issues with facebook images only sharing sometimes with the API. I have done some research and it seems it has to do

Problem in shortcode outputting content

I`m trying to make a shortcode that output the a div containing content from Custom Post type . I’m able to output the content but

Get the Current Screen ID for Media in Admin

I am trying to achieve the current screen id to perform something with pre_get_posts which means for the media files should list only the corresponding

How to convert raw url to hyperlink?

I have a custom field with raw urls and I want to convert them to hyperlinks. So I used this code: <?php $text = get_post_meta(

Adding Item and Coupon Programmically via WooCommerce

Since WooCommerce updated to 2.3, my previous function is not working for adding a coupon and an item, if an item already exists in the

Dequeue script to prevent javascript event conflict on wordpress child theme

I’ve built a child theme of Divi Theme to use with Buddypress. So far so good, except for a script conflict on commenting buttons. The

Randomize Color Scheme Selection in Theme

on my site I’m using cenetric, a child theme of genesis and this theme comes with some predefined color schemes. //* Add support for additional

Back to Top 45558 wordpress questions, 32 Wordpress answers.
Wordpress related, All rights reserved
Powered by Creative Advertising