Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
NickDeBaerdemaeker
tagDiv Member

hi,

this is a post in the category album review.
We want to have the album cover artwork to be uploaded in the featured image section.
With the Advanced custom fields, we have added the option to upload an extra image with the field name “camera eye”.

Basically, when the post, which is in the album category, also has the category featured checked, we want to have the second image displayed that was uploaded in the advanced custom fields field called “camera eye”, but only in the block that is used in the featured section.

request

Basically, this can be done on the single post templates, as per photo below.
I’ve opted for the custom field to be displayed on the top right, instead of the featured image for this category.

It would come down to the option for the flex block on the front page, to be able to select between featured image or the custom field. While I know this isn’t an option today and likely won’t be any time soon, I was hoping how this could be achieved for just the flex block in the featured image for the album review category.

template
I hope this makes any sense…

NickDeBaerdemaeker
tagDiv Member

No it is not an issue with the countries, since there’s also local users who are starting to have issues.

Mostly on company machines that have a stricter security policy, so there’s something going on that we’re missing.

NickDeBaerdemaeker
tagDiv Member

I’m sorry, but what would you mean by “zone” ? there’s no security tool installed on the wordpress installation

NickDeBaerdemaeker
tagDiv Member

As I thought.

Any chance this plugin can be added/tested to work with the theme ?

I imagine there are quite a lot of people working with multiple authors and publishpress so support for this would be greatly appreciated by many.

NickDeBaerdemaeker
tagDiv Member

If I work like that, I can add new, the library shows all options.
(though there is no seperate header tab, I’m unsure if there is one so…).

The tagdiv composer then allows me to alter that page, but it shows a header and footer.
Will that pose a problem if I set this page as the header template in the theme panel ?

NickDeBaerdemaeker
tagDiv Member

Hi Calin, it does help but we’re down to two options.

We would like to have the load more option instead of the pagination, or more results on the page, using article display view 6.

We are considering building a custom template using the cloud library, but then we wouldn’t know where to alter the code as you suggested earlier in the example of td module 16.

can the custom template be adjusted like this as well and if so where can we find those files please ?

thank you, nearly there 😉

NickDeBaerdemaeker
tagDiv Member

Hi Calin, that’s great but yet only the half of the solution for me.

I also would like to achieve this similar effect on the search results page.
So not only on the menu bar search, working here:

but also here, the page one gets to see if he/she hits the search button.
I am currently using the “general search template”: theme template and article display view module 2.

http://v2.enola.be/?s=war+on+drugs

NickDeBaerdemaeker
tagDiv Member

So far I got this, but yet again it’s still not behaving like it should.
Code is correct though, when I alter else { $wp_query_args['order'] = 'DESC'; to ascending it works, however the category if is not picked up…

case 'snort':
if (is_category( 'camera-eye' )) {
$wp_query_args['meta_query'] = array(
'datum_clause' => array('key' => 'datum','compare' => 'EXISTS')
);
$wp_query_args['orderby'] = array('datum_clause' => 'DESC', 'post_date' => 'DESC');
} else { $wp_query_args['order'] = 'DESC';
}
break;

NickDeBaerdemaeker
tagDiv Member

Hi Lucian.

I am trying to sort posts in category “camera-eye” (nr. 306) in the mega menu according to a custom field called “concertdatum”. However I keep failing miserably.

For this to work I have added the sorting option concertdatum like so:
/includes/wp_booster/td_data_source.php

            case 'concertdatum':       
                $wp_query_args['meta_key'] = 'datum';
                $wp_query_args['meta_type'] = 'DATETIME';            
                $wp_query_args['orderby'] = 'meta_value';
                $wp_query_args['order'] = 'DESC';
            break;  

Then I have changed the following to the mega menu file:
/includes/shortcodes/td_block_mega_menu.php
class td_block_mega_menu extends td_block {

    function render($atts, $content = null){
              if (is_category( '306' )){ 
          $atts['sort'] = 'concertdatum'; 
          parent::render($atts);}
	    $buffy_categories = '';

	    extract(shortcode_atts(
		    array(
			    'limit' => 5,
			    'sort' => '',
			    'category_id' => '',
			    'category_ids' => '',
			    'custom_title' => '',
			    'custom_url' => '',
			    'show_child_cat' => '',  //the child category number
			    'sub_cat_ajax' => '' //empty we use ajax
		    ), $atts));

	    if (!empty($show_child_cat) and
	        !empty($category_id)) {

		    // check for subcats existence
		    $td_subcats = get_categories(array(
                'child_of' => $category_id,
                'number' => 1
            ));

		    if (!empty($td_subcats)) {
			    $atts['limit'] = 4; //alter the loop because we don't have space now with the categories
		    }
	    }

	    parent::render($atts); // sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
                                             
	    //get subcategories, it returns false if there are no categories
	    $get_block_sub_cats = $this->get_mega_menu_subcategories($atts);

	     $additional_classes = array();

But sadly nothing happens, can you help me out what I’m doing wrong please ?

NickDeBaerdemaeker
tagDiv Member

Im unsure what you mean by these links.
Do I have to create a category.php file, specific camera eye php file or simply use the code shown on these pages and insert that into the td black mega menu file from the theme ?

NickDeBaerdemaeker
tagDiv Member

I had a few lines of code in the live css editor, so I finally came up with this to make it work.


.td-header-style-1 .td-mega-menu ul { position: absolute; left: 556px !important; }
.td-header-wrap .td-header-style-1 {max-width:1600px}
.td-header-style-1 .td-header-row {max-width:1600px}
.td-header-style-1 .td-header-main-menu {width:100%}
.td-header-style-1 .td-header-sp-recs {float: right;}
.td-header-row {width:100%}
.td-header-style-1 .td-header-row .td-header-sp-logo {margin: 28px 10px 9px 0;}
.td-header-style-1 .td-header-row .td-header-rec-wrap {margin: 0 0 0 180px;}

NickDeBaerdemaeker
tagDiv Member

Hi Paul, am struggling myself with this one. Would it be ok with you to share your solution ?

NickDeBaerdemaeker
tagDiv Member

This would indeed be a super solution for me as well, to be able to set via the theme panel which post template should be used for specific categories.

NickDeBaerdemaeker
tagDiv Member

Ok, closing in to the final solution.

The height is indeed now neatly corrected to everywhere the same, however…
the image is not shown completely, the others are 150 px square so they show in full, but once it’s bigger like 250px the picture is not automatically resized to fit.

Also the rest of the images in the menu are now stretched to fit the content without the width resizing.

what would be the correct css code to accomplish correct resizing ?
it’s a bit tricky finding out since the menu disappears trying to use the firebug extension.

thanks for your patience in this matter

http://v2.enola.be/wp-content/uploads/2018/10/Knipsel.png

and the album art causing the issue looks like this normally
http://v2.enola.be/wp-content/uploads/2018/10/20181009-looy-bent-van-yours-truly.jpg

NickDeBaerdemaeker
tagDiv Member

Since I can’t get the above working I am currently trying yet another route.
Sadly the standard wordpress functions dont seem to work on this one.

“setting orderby and order with query strings is supported automatically, without pre_get_posts. For example, if you want to view Make WordPress Core’s posts in reverse alphabetical order, you can just go to https://make.wordpress.org/core/?order=DESC&orderby=title and it’ll work”

This doesnt happen.

I have placed a bit of code on the page like so, and standard posts should be sortable, however the theme says it cant find any posts at all when I choose anything else.

<div id="sortby"> SORT BY:  
<select class="dropdown-class" name="sort-posts" id="sortbox" onchange="document.location.href=location.href+this.options[this.selectedIndex].value;">
<option disabled>Sort by</option>
<option value="&orderby=date&order=DESC">Newest</option>
<option value="&orderby=date&order=ASC">Oldest</option>
<option value="&orderby=keyword&order=ASC">abc</option>
<option value="&orderby=keyword&order=DESC">ZYX</option>
</select>
</div>

This additional bit of code in functions should tackle the keyword custom field option, but that’s a no go either. Any thoughts ?

function wpse_139657_orderby() {    
    if ( isset( $_GET['orderby'] ) ) {
        if ( in_array( $_GET['orderby'], ['keyword'] ) ) {
            set_query_var( 'orderby', 'meta_value_num' );
            set_query_var( 'meta_key', $_GET['orderby'] );
        }
    }
}
add_filter( 'pre_get_posts', 'wpse_139657_orderby' );

The page I’m currently testing this piece on can be found here:
http://v2.enola.be/albums-met-letter-d/

NickDeBaerdemaeker
tagDiv Member

Am currently trying a different approach.
I have added this bit to functions, to be able to sort on keyowrd a to z and z to a.

    $sortList = array(
       'a-z' => array(
         'meta_key'=>'keyword',
         'orderby'=>'meta_value',
         'order' => 'ASC'
       ),
       'z-a' => array(
         'meta_key'=>'keyword',
         'orderby'=>'meta_value',
         'order' => 'DESC'
       )
    );

I created a page with the tagdiv composer to show all posts that have a keyword starting with the letter D, the posts are ordered by date (which is standard, recent to old)

According to the tutorial that I’m trying to implement these two pieces of code should find their way into the theme

for the loop:

<?php 
gloabl $sortList; //to use the $sortList in your functions.php.
$aryQuery = $sortList[$_REQUEST['orderby']] ? $sortList[$_REQUEST['orderby']] : $sortList['keyword'];
$featuredPosts = new WP_Query( $aryQuery ); 
?>

For the drop down list, which should appear on the page.
Tried adding this via the raw html inserter in tagdiv but that’s not working out.
Should I implement this in a custom page template ?

<ul>
<?php
   gloabl $sortList; //to use the $sortList in your functions.php.
   foreach( $sortList as $orderby => $aryOrderBySettings){
      ?>
      <li> <a>">Order by <?php echo $orderby;?></a></li>
      <?php
   }
 ?>
</ul>

Could you please advise where I should implement the two pieces of code above ?

NickDeBaerdemaeker
tagDiv Member

I noticed a video on youtube that provides a solution with how to add a drop down filter.
https://www.youtube.com/watch?v=RQipaX_YeF8

is this something that I can code in the cloud templates I have created and if so where can I find those templates ?

NickDeBaerdemaeker
tagDiv Member

Hi,

I have removed the image as a thumbnail, uploaded a totally different one from another source on internet and the problem persists, oddly enough… it’s even a tad bit worse than with the first original image.

NickDeBaerdemaeker
tagDiv Member

Hi Calin,

tried that but after 2.6 hours, finished the regeneration, the issue is still there.

NickDeBaerdemaeker
tagDiv Member

For those with the same issue, you can overcome this problem by adding this code to the functions

function custom_posts_per_page($query) {
if (wp_is_mobile()) {
$query->set('posts_per_page', 15);
} //endif
} //function

//this adds the function above to the 'pre_get_posts' action
add_action('pre_get_posts', 'custom_posts_per_page');

NickDeBaerdemaeker
tagDiv Member

to edit it with the tagdiv composer I mean…

NickDeBaerdemaeker
tagDiv Member

Is there a way to edit the mobile theme then so it does look a bit more like the full web site ?

For instance would it be an option to install a second copy of the newspaper theme but adjust it to our specific mobile needs, and make the site use that theme when it detects mobile devices ?

NickDeBaerdemaeker
tagDiv Member

that would be a great improvement indeed. the rest of the options, if possible, would come in handy too if they could be set per device.

we have built for instance an alphabetical index which we would like to show only on the full site, but not on mobile. if these rows and columns, essentially the same page could be built per device that would be awesome for many.

NickDeBaerdemaeker
tagDiv Member
NickDeBaerdemaeker
tagDiv Member

I have found the culprit, the theme keeps looking for this
http://192.168.0.208/wp_011_sound_radar/wp-content/uploads/2017/04/mobile-menu.jpg&#8221;

The site has been developped offline with wamp64 and it looks like a left over from when I was starting to build with the sound radar theme. Any thoughts on where this specific link might be referenced ? I’ve looked but can’t seem to pinpoint it’s location. It takes a whopping 21 seconds to load…

I might uninstall the sound radar demo but I fear it will mess up the design.

Viewing 25 posts - 1 through 25 (of 52 total)