Categories
Technology

Finding Post Based on Post Meta Value in WP Query

Recently I was working on a Custom Post Type plugin under the banner of RND Experts, where the user will enter the name of the city and the field will get saved in the wp_post_meta table. The client has requested to create a shortcode where we can filter Posts on the basis of Single city or Multiple comma-separated cities.

Here is the code I’ve written to accomplish the requirement.

$atts = shortcode_atts( array( 
'city' => '',
),$atts 
);
$args = array(
'post_type'  => 'wp_property', 
'posts_per_page'  => -1
);
if( $atts['city'] != '' ) {
$cities = explode( ',', $atts['city'] );
$meta_query = array();
if( !empty($cities) ) {
foreach ($cities as $key => $city) {
$meta_query[] = array(
'key'  => 'cptwh_property_city',
'value'  => strtolower(trim($city)),
'compare'  => 'LIKE'
);
}
} 
$args['meta_query']['relation'] = 'OR';
$args['meta_query'] = $meta_query;
} 
$properties = new WP_Query( $args ); 

1. Here are the steps to do this.


2. Extract the attribute values. Like, I’ve used city attribute.


3. Now you have to check if users have assigned any value to the City attribute. If there is no value we will not process the Meta Query.


4. In case we have found any value in the City. Let, ‘s find the number of cities entered by using the explode function.


5. Now parse the exploded string using the for each loop and assign values to a newly created array variable meta_query.


6. Now, after the Array element use a ‘relation’ element for the comparison method. The default value of ‘relation’ is ‘AND’. If in case you do not provide any value it will find the records which fall under the values. I’ve assigned value OR to this so that I can fetch all the Posts that have City 1 and City 2 in its meta table.

Categories
Technology wordpress

How to change the footer in your wordpress admin panel

Learn step-by-step how to customize your WordPress admin panel footer with our expert guide. Enhance your website’s branding effortlessly.

Please copy and paste this code in your theme function.php file –

function remove_footer_admin () {
echo ‘Fueled by <a href=”http://www.wordpress.org” target=”_blank”>WordPress</a> | Designed by <a href=”#” target=”_blank”>XYZ</a> | WordPress Tutorials: <a href=”http://www.wpbeginner.com” target=”_blank”>WPBeginner</a>
‘; }

add_filter(‘admin_footer_text’, ‘remove_footer_admin’);

Enjoy, get info here.
cheers -:)This entry was posted in Uncategorized on February 5, 2015 by Rndexperts.

Categories
Technology

How to Add Arrow Icon in Submenu

How to Add Arrow Icon in Submenu. Learn how to enhance your website’s navigation. Discover the steps to add an arrow icon to your submenu for a more user-friendly experience.

 

How to add arrow icon in submenu

Please copy following code and paste your css file –

.nav-menu .sub-menu li.menu-item-has-children a {background:url(images/nav_bg.png) 97% center no-repeat;}

.nav-menu .sub-menu li.menu-item-has-children .sub-menu li a {

background:none; }

Please change the class name with your class name and image name with your image name.

cheers -:)

Categories
Technology

Disable banner ads from Skype for Windows

Disable banner ads and enjoy an ad-free browsing experience with our technique. Say goodbye to annoying banner ads on skype today!

Before the many updates to Skype post-Microsoft acquisition, simply disabling the promotions options in settings was enough to rid your conversations of unnecessary spam. However, a new banner ad has made its way to the conversation window. This ad wouldn’t be such a bother if it didn’t often cut into the video feed area when going full screen. There is a simple step to disable the ads.

Step 1:

Open Control Panel and double click on Internet Options icon. The following popup window will appear.

Under the Security tab click on Restricted sites  and then Sites button.

Step 2:

Once clicked the Sites button you will see the following popup window.

Add https://aaps.skype.com in the Add this website to the zone: text input and click Add button.

Restart your Skype.

🙂

Hurry! No more banner ads on Skype 

Categories
SEO Technology

Some Amazing Facts About Digital Marketing

Google updated its algorithm which is followed by every digital marketing expert. Some facts about digital marketing or you can say some unbelievable techniques that can rank your business on Google’s top positions.

Content Marketing Facts:

If you are planning for content marketing campaign, but you need help to know how and where you need to start, then the following are some tips or techniques that can help you in content marketing:

Do progressively more Content Remarketing:

This is the 1st and foremost point. If you are developing quality content but you are not doing content marketing then there are high possibilities that you cannot achieve your goals for such content in digital marketing. When you create good content then you should tag the targeted traffic who likes your site and comes frequently. Content Re-marketing basically means that you should provide those customers who currently like your material.

Do keyword research before creating content:

Doing SEO by following Google algorithms can rank any good content. So, we need to do keyword research if we want to target the exact audience.

Don’t duplicate the popular blogs:

This is an essential factor while performing content marketing. Many people begin copying popular blogs and try to develop huge content. By duplicating someone’s work you cannot get success. There is a high possibility that by performing this you will get penalized by search engines and reduce your brand value.

Examine the Good Results of Your Content:

Once you have released a good post you require to check whether that post is preferred by the guests or not. There are several tools for that. You can use Google Analytics to track the success of your website. So trace the success and change your tactic accordingly. Check this Freeslotscentral free spin bonuses

2. Impact of Structured Data on Google :

What is “structured data”?

“Structured data” as a basic term simply refers to any details that are structured. For example, if you have a collection of dispersed Post-It notes with phone messages about meetings, dates, times, people, etc, and you arrange these into a table with marked rows and columns for each type of data, you’re structuring the data.

How does structured data assist SEO?

Google, Bing, and other search engines motivate webmasters to use structured data, that usage by giving benefits to sites with structured data properly implemented.

Some of these advantages include search result improvements and content-specific characteristics, such as:

Rich search results: Contains styling, images, and other visual improvements.


Rich cards: A difference in rich look for results, similar to rich snippets and created for mobile users.


Enriched search results: Contains active or immersive functions


Knowledge Graph: Details about a company such as a brand
Breadcrumbs: Breadcrumbs in your search.


Carousels: A range of multiple rich successes in a carousel-style


Rich outcomes for AMP: To have your AMP (Accelerated Mobile Pages) show up in carousels and with rich outcomes, you’ll need to involve structured data.

These improved search results can also enhance your CTR and drive extra traffic, because they are more creatively attractive and provide extra information to visitors. And increased CTR can also indirectly boost your rankings, as a user actions signal.

3. Why Mobile-first index is important

Responsive design:

According to Google webmaster responsive design is necessary to mobile-first indexing. Following are some steps that are involved in turning a static website into a responsive website pornskill.com little maja.

  • Fluid website grid with balanced instead of fixed measures
  • Flexible texting and images
  • Utilizing design changes to ensure usability for non-desktop equipment
  • Using CSS media concerns to define breakpoints for design and style changes.
  • Write mobile-friendly content.
  • Mobile-first index is not about
Categories
SEO Technology

Digital Marketing Trends 2018

Discover strategies, tools, and tips to boost your online presence and engage your audience effectively according to Digital Marketing Trends. Enormous things will happen this year, as well, because of new innovation developments that convey new chances and difficulties to the table.

The standard promoting procedures like SEO, web-based social networking, Digital Marketing Trends, and transformation rate improvement will keep on being imperative, obviously. In any case, out of the blue since portable shook the web – the distance in 2007 – advertisers should grapple with an altogether unique scene in 2018.

Here are the promoting procedures that will matter most this year.

1) Artificial Intelligence

Artificial intelligence reasoning assumes a pivotal part in the showcasing procedure today. AI can examine purchaser conduct and hunt designs, using information from online life stages and blog entries to enable organizations to see how clients and clients discover their items and administrations.

Artificial intelligence reasoning likewise offers data and tips to clients by getting into discussions. by 2020, 85% of client connections will be overseen without the requirement for a human. Businesses embracing AI in 2018 will have the capacity to spare expenses and quicken development, getting an edge over their rivals.

2) Personalisation

Personalization is something unique we’ve been discussing for some time currently, yet it’s never extremely taken off. The reason is we haven’t generally had the innovation accessible to influence personalization to work adequately.

This is not true anymore.

All the innovation you have to make completely customized encounters for clients is there. The main issue currently is that we have the General Data Protection Regulation (GDPR) becoming effective on May 25 and this could make it harder to gather the individual data you have to customize the purchaser travel crosswise over various gadgets/sessions.

The catchphrase in that last passage is “could”. We don’t yet know how web clients will respond to GDPR and the progressions they drive organizations to make. What’s more, regardless of whether the most cynical expectations work out as expected, brands will at present need to customize singular client sessions however much as could be expected – as we’re as of now observing with chatbots.

3) Video

Look at these details on video showcasing from Forbes:

As indicated by YouTube, versatile video utilization develops by 100% consistently.

Video is anticipated to guarantee over 80% of all web movement by 2019.

Adding a video to advertising messages can help navigate rates by 200-300%.

90% of clients report that item recordings enable them to settle on buying choices.

64% of clients will probably purchase an item online subsequent to viewing a video about it.

These numbers demonstrate the significance of joining video into your computerized promoting system in 2018.

What’s more, don’t simply think about YouTube. To observe higher commitment to your video promoting, you can influence a video to post or begin a live communication on Facebook. Grow Social’s video commitment is demonstrated as follows:

video-commitment insights

Giving enlightening substance through outwardly rich video enables you to pass on your message adequately to countless. According to Forrester, one moment of video is equivalent to 1.8 million words.

Live video is picking up prominence, with countless utilizing it for interviews, item demos, and “off camera” looks of occasions, life in the workplace, how items are made, and so on. Live recordings are an incredible path for organizations to divulge the appearances behind their image, which watchers grasp and love to see, as this ingrains trust in your group of onlookers and adapts your image.

As indicated by Livestream, 80% of individuals would prefer to observe live video from a brand than read a blog, and 82% lean toward live video over social posts.

With internet-based life stages like Facebook and Instagram propelling their own particular live-gushing video highlights, it has turned out to be less difficult for organizations to incorporate live recordings in their computerized promoting technique.

4) Influencer Marketing

Utilizing influencers is an extremely successful showcasing device that attempts to draw in clients. Influencers can be anybody from famous people and Instagram or YouTube stars to understood bloggers and columnists who help spread the news about your business or item through their social channels.

These individuals connect and draw in with their vast system of devotees and shoppers via web-based networking media, discussing a specific brand that they cherish and use to a crowd of people with whom trust has just been set up. Since this isn’t an advertisement or originating from the organization, influencers can develop a brand’s certain picture in the brains of individuals, along these lines pulling in more clients.

Since two out of three individuals say that “they trust buyer sentiments posted on the web,” influencer showcasing conveys 11X ROI over every single other type of advanced media!

A case of influencer advertising the Swedish watch organization Daniel Wellington, which got together with influencers on Instagram to advance its watches with a subtitle that incorporated a rebate code for 15% off.

5) Voice Search

In the present advanced time, it is conceivable to answer all inquiries through web indexes. While individuals can get complete data effortlessly, they don’t generally have the persistence to peruse a few passages to bring data. Voice-seeking assumes an essential part in giving all the pertinent data through sound substance. Computerized reasoning is getting more quick-witted and the quantity of mistakes made by voice colleagues like Alexa, Siri, and Google has diminished, as well.

Numerous brands have included voice seek in their computerized promoting procedures to convey esteem based substance viably to their clients. Domino’s Pizza utilizes voice seek innovation as an approach to build its business, in this way enabling clients to arrange pizzas through Alexa.

The expanding utilization of voice scan has made it essential for organizations to reevaluate their advanced showcasing methodologies in 2018.

half of all hunts will be voice seeks constantly 2020

20% of versatile inquiries on Google are voice looks

25% of all Bing looks are voice seeks

10% of Baidu’s pursuit questions are made utilizing voice

Categories
Technology

WordPress Excerpt

WordPress Excerpt A WordPress Post excerpt is a short summary of your post. The excerpt has two main use. It replaces the full content of post in RSS Feed. It can be used for Search results,

The WordPress Post excerpt is a short summary of your post. The excerpt has two main uses.

  • It replaces the full content of the post in RSS Feed.
  • It can be used for Search results, Monthly archives, Author archives, etc

The most commonly used method for adding Excerpt to a WordPress post is to use a function in the template.

 the_excerpt(); 

Mostly in a WordPress setup, we have noticed [..] as a symbol of Read More which sometimes doesn’t suit the theme or design of the website. Here we are going to show you some interesting methods to play with WordPress Excerpt.

Changing the Read More text

WordPress provides a Filter Hook to alter the Read More text. The filter hook simply returns the desired text and replaces it with the default. The Filter hook name is excerpt_more. Let’s have a look at the example code to alter the text.

 add_filter( 'excerpt_more', 'rnd_read_more'   );
 function rnd_read_more() {  
   return 'Read More »'; 
} 

Please this code inside the function.php of your active theme or inside the main file of your plugin and we are done with altering the Read More text.

Adding link to Read More

I hope you are still with me and still checking the post. We have just altered the Read More text but the text is simply a text, not a link. Which may confuse the users. Now, what if you wanted to redirect the user once they click on Read More >>.

add_filter( 'excerpt_more', 'rnd_read_more'   ); 
function rnd_read_more() { 
return    '<small><a href="'.get_the_permalink(get_the_ID()).'">Read More »</a></small>';
} 

The above code will add a link to the Read More >>.

Changing the size of Excerpt

Now, it’s time to change the size of the excerpt. WordPress provides another Filter Hook to change the size of the excerpt. The hook named excerpt_length. Below is the code to change the size with this hook.

add_filter( 'excerpt_length', 'rnd_excerpt_limit', 999 ); 
function rnd_excerpt_limit() {  
return 20;
} 

 

Categories
Technology

Hack the WordPress Search

Unlock the Power of WordPress Search: Learn How to Hack the WordPress Search Functionality with Expert Tips and Tricks.

Please copy and paste the code in your template or where you want and then print the $allsearch variable.

$allsearch = &new WP_Query(“s=”.$yoursearchkeyword.”&showposts=-1&order=DESC”);

Here you can $yoursearchkeyword replace with your variable or keyword –

If you need more help contact us

cheers : -)