how can I add filter in specfic field in my website?

I want to replace any saudian phone in specfic field in my theme "my-listings" in description and this my script in functions.php: function cudjex($text){ $text = preg_replace('/(009665|9665|\+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})/', '********', $text); return $text; } add_filter('comment_text', 'cudjex'); it works good in comments ,but I want it works in another field called description in my theme ,how?
Category: Web

How to show the posts listing on dashboard or custom page in admin panel?

I want to show posts listing(almost like the default post listing page) on the dashboard page. And if that is not possible then maybe on a new page in the admin area. This is the post meta that needs to be used for categorising data: get_post_meta($post->ID, 'owner', true); get_post_meta($post->ID, 'assignee', true); The value for these is the user who owns the post and the user who is assigned to work on that post. Basically, I want to create a "My …
Category: Web

How Can I Create A Form In WordPress For Subscribers To Alert Them about new Listing posted?

From this site – https://homekik.aminulhub.info/ Check out the “Be the first to know”. We r using a 27collective Listing theme to test the website. My Client made the form in Contact Form 7. Now he wants this method work – when a subscriber subscribes through this form he/she will be notified about any new Listing posted of his chosen option. Now I am not aware of any WordPress Form plugin which has this kind of feature or any Theme has …
Category: Web

Changing cache update rate

Im using mylisting theme in wordpress. in listing ordering, one option is Random (cached and updated every few hours). How can I adjust the update rate from few hours to few minutes ? or even remove the caching so it randomly updates every time i refresh the page?
Category: Web

Filter for product subcategory listing page load

I need to run a code when the subcategory listing page loads in a woocommerce wordpress site. The subcategory listing page has route as' /product-category/{catgeory}/{sub-category}. I need a filter which I can hook upon when this page loads and run a code. I could also run the code in the template file of the route. But I can't find it. Can anyone help?
Category: Web

Fix permissions for users role

I have 4 users roles on my WordPress platform (role1, role2, role3, role4) Role 1 : administaror (full acces) Role 2 : proposal_editor (can create and publish posts, pages, templates, users...) Role 3 : proposal_author (can create and publish posts, pages, templates and users of the same level or below) Role 4 : proposal_viewer (can only see a specific pages and posts on front-office no access to back-office) Right now the user with Role 3 can create Role2 Role3 and …
Category: Web

how do I add a button in each category to display all posts?

I have Create a page that lists posts by category but only shows 5 posts from each category. how do I add a button in each category to display all posts? Here's my code for a page that lists posts by category: $categories = get_terms( 'category', 'orderby=name&order=ASC'); foreach ( $categories as $category ) { echo '<h2 class="post-title">' . $category->name . '</h2>'; echo '<div class="post-list">'; // WP_Query arguments $args = array( 'cat' => $category->term_id, 'orderby' => 'term_order', ); // The Query …
Category: Web

WordPress for a business catalog site

I am completely noob with WordPress so I apologize in advance if my questions sounds completely stupid. Background I have a small business catalog site that I wrote long ago in plain HTML. Now I want to add some SEO and improve the design therefore I am looking to use a CMS for easy content management. Questions Is WordPress a right choice for my requirements? Is it only for blogging or can be used for any kind of site? (corporate, …
Category: Web

Product slider not showing when clicking on tabs

I'm in need of some specific help with my Wordpress webshop of the Blaszok MPC theme. The website can be found at http://testsite.vansompel.be The problem is situated when scrolling down to the tab 'Promoties' and clicking on the nested tabs 'Motoren', 'Tuinmachines' and 'Fietsen'. Only the first product slider (MPC product slider included in my theme) seems to show up correctly on page load. When clicking on the other tabs, the other product sliders don't seem to load. They do …
Category: Web

Different string for specifed post type on posts listing at homepage

I use below code to list custom post types on homepage beside standard posts <?php $args = array('post_type' => array( 'post', 'gallery_posts' )); ?> <?php $query = new WP_Query( $args ); ?> <?php if ( $query->have_posts() ) : ?> <?php while ( $query->have_posts() ) : $query->the_post(); ?> <?php _e('Read More', ''); ?> <?php endwhile; ?> <?php endif; ?> What i should to do for change 'Read more' text for second type of post while looping?
Category: Web

CountPost WordPress Custom Taxonomy

What's the easiest way to add "count posts" to the category listing as seen as below? <?php if($categories){ foreach($categories as $category) { $output .= '<li><a href="'.get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( esc_html__( 'View all posts in %s','themename' ), $category->name ) ) . '">' . $category->name . '</a></li>' . $separator; } echo trim($output, $separator); }
Category: Web

Taxonomy listing issue - does not display how I would like

What I have is a: Taxonomy: menu_type Term: drink (parent term) Sub term: drink 1, drink 2 (child terms) Term: appetizer (parent term) Sub term: appetizer 1, appetizer 2 (child terms) I want to go to the drink page and have it display like this - all the posts within that taxonomy: Drink Drink 1 Drink 1 post Drink 1 post Drink 2 Drink 2 post Drink 2 post And the same for appetizer. But, right now I get this: …
Category: Web

WordPress product catalog site

I need to create an e-commerce site with WordPress, but not 100% e-commerce. It is just a catalog site without shopping cart. Users can see various products on the site, for example, car showcase website. I am a newbee to WordPress. To build such kind of site: What is a good start point to study? What plugins do I need to install? Do I need to install wp-ecommerce plugin? I appreciate for any help and suggestions.
Category: Web

Category Thumbnail Display - How to display ONLY the main Category

I am using the eList wordpress theme. Now on the main page, there is a thumbnail display of all the categories listed. Now, on the theme you will see that they have no sub-categories under the categories, only listings Now in my theme, I have sub-categories, and the theme does make provision for that. See my site here and the dropdown list next to the search bar in the header to see what I mean about the subcategories Question: How …
Category: Web

Continuous listing from a custom field

I have posts with custom fields called "cb_vote_nb_vote" which holds the vote count for every post, what I want to do is let's say posts under A category will be listed based on vote count, I do that and show numbers with: query_posts('cat=47&meta_key=cb_vote_nb_vote&orderby=meta_value&order=DESC'); if(have_posts()) : while(have_posts()) : the_post() ; echo "<div id='listing'>"; echo $wp_query->current_post +1; echo "</div>"; ?> but the problem here is when you go to the new page it starts from number 1 obviously. How can I achieve …
Category: Web

post ordering question

I have a custom type posts and I need to make it ordering by something different way. not by date, id, names. Is there any way to put ordering numbers and listing by the numbers? Because we have a several new posts should be placed 2nd, 3rd,...etc but I don't it's easy to do. So I was thinking if there is any place to put ordering numbers and order by the numbers would be the best. Is there anyway or …
Category: Web

Listing wordpress users with a search function

I'm having trouble finishing off this code that I adapted from Cosmoslabs excellent tutorial. Everything is working (listing and pagination etc) except the search function whic is returning nothing i.e. no users are listed when I try to filter by a keyword. Can anyone see what the problem might be? Thanks for any pointers. Osu <?php /* Plugin Name: WP Author Listing Plugin URI: # Description: Simple shortcode to list our WordPress users. Author: OSU Version: 1.0 Author URI: # …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.