[Solved] Reorder an HTML element based on a condition? [closed]

Use if statements. Use two statements so that you don’t get duplicate banners. <body> <?php if( yourcondition ){ include (“./../included/header.php”); } ?> <div id=”page-wrap”> <div id=”main-wrap”> <div id=”main-header”> <?php if( yourcondition ){ include (“./../included/header.php”); } ?> </div> solved Reorder an HTML element based on a condition? [closed]

[Solved] I need filter content of posts accoring to post title and meta value

you can use post title into wp_query by adding this to functions.php file: add_filter( ‘posts_where’, ‘yourr_title_func’, 10, 2 ); function yourr_title_func( $where, &$the_query ) { global $wpdb; if ( $search_title = $the_query->get( ‘search_title’ ) ) { $where .= ‘ AND ‘ . $wpdb->posts . ‘.post_title LIKE \” . esc_sql( like_escape( $search_title ) ) . ‘%\”; … Read more

[Solved] update_option doesn’t work in single php file

As pointed out in the comments your file is outside wordpress environment, so it doesn’t recognize the update_option function. Even knowing the ajax api was mentioned in the comments, I’m putting here what you should do: Require the activate.php file in the main plugin file if you aren’t doing this yet. Something simple like require_once(‘admin/activate.php’); … Read more

[Solved] how to align the image to the center? [closed]

For a start it’s hard to know what you are talking about – it’s a page full of images after all. I’m assuming you mean the ‘100 Greatest Goals’ image in the middle that’s been blown up to 10 times it’s normal size. If you change wp-content/plugins/nextgen-gallery/css/nggallery.css line 215 to the following then it centers … Read more

[Solved] Sidebar broken on wordpress site

The problem is in your CSS, specifically these 3 attributes: @media (max-width: 991px) .sidebar { top: 0; max-width: 80%; position: fixed; } Position:fixed and top:0 means your sidebar is forced to stick to the top of the page element, where on a mobile-view, you want the sidebar to stack above or below the content. Changing … Read more

[Solved] Getting parse error, unexpected T_ELSE(else), expecting ‘}’ [duplicate]

It’s possibly line 261, the _RAMA line needs to be unindented: <td>$download_link</td> </tr> _RAMA; $count++; When using heredoc syntax, the terminator needs to be the only thing on that line (no trailing spaces) and at the start of the line (no indentation). The _RAMA was indented, so PHP didn’t think the string ended and gobbled … Read more

[Solved] WordPress – different post title on frontend than in url [closed]

If I understand what you want correctly, you can place this code in the functions.php of your theme function set_my_seo_title($title, $id) { global $post; $seo_title=get_post_meta($id, ‘_yoast_wpseo_title’, true); return ((!empty($seo_title)&&$post->post_type==’post’) ? $seo_title : $title); } add_filter(‘the_title’, ‘set_my_seo_title’, 15, 2); This will check if post got SEO title set. If yes, it will be used, if no … Read more

[Solved] WP_Query Multiple Categories

Try this and see if it works. $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => array( ‘vocalist’ ), ), array( ‘relation’ => ‘OR’, array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => array( ‘pop’ ), ), array( ‘taxonomy’ => ‘category’, ‘field’ => … Read more

[Solved] Remove blank space in WordPress theme

I’ve looked a bit over your website. Firstly, you want to remove the 170px right-margin from .content. Than you can edit the width of .sidebar-primary to fit in the space. @media all and (min-width: 1140px) { .site-container .content { margin-right: 10px; } .site-container .sidebar-primary { width: 330px; } } As a sidenote, I noticed your … Read more

[Solved] how do I create android app using wordpress database? [closed]

you can refer to this video https://www.youtube.com/watch?v=uFbwW4ERUN0 or check Prabeesh RK android MySQL playlist in youtube to learn more.. only difference will be instead of creating a new database you will already have one. just ensure whatever tables you create has the table_prefix that matches your $table_prefix in wp-config.php file Hope this helps Take care … Read more

[Solved] Get category name with these post by custom post type

Solved. The answer is: polling-cat is name of taxanomy name of custom post type. $terms = get_terms( ‘polling-cat’ ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){ foreach ( $terms as $term ) { echo $term->name; $args = array( ‘posts_per_page’ => 5, ‘polling-cat’ => $term->slug, ‘post_type’ => ‘polling’, ‘post_status’ => ‘publish’, … Read more

[Solved] How to add text in option using jquery? [closed]

Try this code: HTML: <span id=”text1″>Medium Tail</span> JS: you can use empty and append method to do that: $(document).ready(function(){ $(“#text1”).empty().append(“Medium Tail/Popular”); }); Plz check it out: http://jsfiddle.net/o1f77e1y/ 1 solved How to add text in option using jquery? [closed]