Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,726 through 6,750 (of 32,505 total)
  • Author
    Search Results
  • #172916

    In reply to: Sorting Topic Loop

    Pascal Casier
    Moderator

    Hi,

    Interesting topic, I would be interested in your queries and how you show it 🙂

    For the dropdown, how about something like this:

    function casiepa_template_before_topics_loop() {
    	?>
    	<select name="menu1" id="menu1">
    	<option value="">Order by...</option>
    	<option value="http://www.example.com/?order=date">By date</option>
    	<option value="http://www.example.com/?order=pop">Nbr of Replies</option>
    	</select>
    	<script type="text/javascript">
    	 var urlmenu = document.getElementById( 'menu1' );
    	 urlmenu.onchange = function() {
    	      window.open( this.options[ this.selectedIndex ].value );
    	 };
    	</script>
    	<?php
    }; 
    add_action( 'bbp_template_before_topics_loop', 'casiepa_template_before_topics_loop', 10, 0 );
    #172909
    berkelmudez
    Participant

    I finally found what was causing the problem after going through my functions.php.
    Apparantly it was this function that was causing my bbp_topic functions to not function:

    function SearchFilter($query) {
        if ($query->is_search) {
          $query->set('post_type', 'post');
        }
        return $query;
      }
      add_filter('pre_get_posts','SearchFilter');

    After commenting this out everything seems to work perfectly fine now with all topic functions working and displaying correctly now.
    I still don’t know exactly what it is but I probably am not using the $query stuff properly in here. Anyway the problem got much more clear now at least and can be dealt with much better now.

    #172907
    Pascal Casier
    Moderator

    If you could confirm the above ?
    And then, if you put the below in your functions.php, what do you get ?

    function casiepa_custom_pagination( $args ) {
    	$args['type'] = 'list'; // try also 'plain'
    	$args['after_page_number'] = '&nbsp;';
    
    	return $args;
    }
    add_filter( 'bbp_topic_pagination', 'casiepa_custom_pagination' );
    #172905
    kodacollider
    Participant

    I’m not able to link to the site directly right now, unfortunately, but this is what the source looks like for the pagination area:

    <div class="bbp-pagination-links">
    <p>	<span class="page-numbers current">1</span><br>
    <a class="page-numbers" href="https://www.com/topic/test-1/page/2/">2</a><br>
    <a class="next page-numbers" href="https://www.com/topic/test-1/page/2/">→</a>
    </p></div>
    #172898
    Stephen Edgar
    Keymaster

    @abiliocaetano, thanks for this, I added it to our codex article here.

    #172894
    kodacollider
    Participant

    Thank you. I’m having a little bit of trouble.

    I found the original function I need to edit in bbpress/includes/topics/template.php:

    function bbp_get_topic_reply_link( $args = array() ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'           => 0,
    			'link_before'  => '',
    			'link_after'   => '',
    			'reply_text'   => esc_html__( 'Reply', 'bbpress' ),
    		), 'get_topic_reply_link' );
    
    		// Get the reply to use it's ID and post_parent
    		$topic = bbp_get_topic( bbp_get_topic_id( (int) $r['id'] ) );
    
    		// Bail if no reply or user cannot reply
    		if ( empty( $topic ) || ! bbp_current_user_can_access_create_reply_form() )
    			return;
    
    		$uri = '#new-post';
    
    		// Add $uri to the array, to be passed through the filter
    		$r['uri'] = $uri;
    		$retval   = $r['link_before'] . '<a href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . $r['reply_text'] . '</a>' . $r['link_after'];
    
    		return apply_filters( 'bbp_get_topic_reply_link', $retval, $r, $args );
    	}

    The only line I need to modify is:

    $retval = $r['link_before'] . '<a href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . $r['reply_text'] . '</a>' . $r['link_after'];

    Is there an easier way to phrase my new function to modify just this variable?

    #172891
    tech55541
    Participant

    Hello,
    URL: http://yourtechadvisors.com/forums/topic/testing-safe-to-ignore/
    I am using this plugin to add signatures: https://wordpress.org/plugins/gd-bbpress-tools/

    I would like the Revision information to align under the Signiture. I am currently using this CSS.

    .topic.type-topic.status-publish > .bbp-reply-content,
    .reply.type-reply.status-publish > .bbp-reply-content{
        display: -webkit-box;
        display: -moz-box;
        display: box;
    
        -webkit-box-orient: vertical;
        -moz-box-orient: vertical;
        box-orient: vertical;
    }
    
    .topic.type-topic.status-publish > .bbp-reply-content > .bbp-topic-revision-log,
    .reply.type-reply.status-publish > .bbp-reply-content > .bbp-reply-revision-log{
    	-webkit-box-ordinal-group: 2;
        -moz-box-ordinal-group: 2;
        box-ordinal-group: 2;
    }
    
    .topic.type-topic.status-publish > .bbp-reply-content > .bbp-signature,
    .reply.type-reply.status-publish > .bbp-reply-content > .bbp-signature{
      -webkit-box-ordinal-group: 1;
        -moz-box-ordinal-group: 1;
        box-ordinal-group: 1;
    }

    It is working fine in Firefox, but not in Internet Explorer and Safari on apple devices such as IPhones. Can you please take a look for me?

    Thanks.

    #172888

    In reply to: Updating my import

    blandow
    Participant

    Admin Custom Login
    AdRotate Pro
    amr shortcode any widget
    bbpress
    Duplicate Post (already tried disabling)
    Easy WP SMTP (already tried disabling)
    Envato WordPress toolkit
    EventON
    Fast Secure Contact Form
    Foo Gallery
    FooBox Free Image lightbox
    Meta Box
    Multi Feed Reader
    Page Links To (tried disabling)
    Revolution Slider
    Rotating Tweets – Twitter widget & shortcode
    Shortcoder
    Sidebar Login
    Widget Logic
    WP All Import Pro
    WP User Avatar
    WPBakery Visual Composer

    #172878
    thinkDrew
    Participant

    Afternoon,

    I am looking to create a new template with an entirely new look and feel from what the basic / generic bbpress forums look like. Templates are not my issue but more along the lines of displaying the right content via 3 block rows.

    I am looking for a starting point (at least) to achieve the following index layout – 3 block rows (using bootstrap):

    FORUM NAME
    Topics | Posts | Freshness
    List of Sub Forums
    
    FORUM NAME
    Topics | Posts | Freshness
    List of Sub Forums
    
    FORUM NAME
    Topics | Posts | Freshness
    List of Sub Forums
    

    Note: These will be in a 3-col format, not full width. Any help would be helpful! You can see a visual here: http://postimg.org/image/894k4fp47/

    #172869
    berkelmudez
    Participant

    Yup I have literally copied all the code from ‘loop-topics.php’ in custom theme to the wordpress theme twenty fifteen, where it correctly does return true and topics are shown correctly.
    I must have done something wrong in my custom theme, I just have no idea what the possible causes could be tho.

    It just came to my mind that it might be template php file that bbpress uses, I’ll go check that now.
    I use bbpress in combination with buddypress maybe it can be something with that also.

    #172861
    Pascal Casier
    Moderator

    Hi,
    You will have to check the bbp_topic_admin_links, something like:

    add_filter ('bbp_topic_admin_links', 'change_topic_admin_links' );
    function change_topic_admin_links ($r) {
      // whatever is needed here
      return $r;
    }

    Pascal.

    #172849
    Robin W
    Moderator
    #172838

    In reply to: How to hide a user IP

    Robin W
    Moderator

    Pascal’s method is better as the ip address is never sent to a PC. With the css code, it is entirely possible for anyone to get hold of the ip address, as it is sent to the PC, and viewable using developer tools.

    #172835

    In reply to: How to hide a user IP

    Pascal Casier
    Moderator

    Hi,
    The above CSS would hide it from viewing on screen, but if you want to go a step further, you could add this into your functions.php :
    add_filter( 'bbp_get_author_ip', '__return_empty_string' );
    Pascal.

    #172823
    junglejim620
    Participant

    Hi Robin,

    Correct, both shortcodes I tried it doesn’t show the widget?

    #172822

    In reply to: How to hide a user IP

    tech55541
    Participant

    Hello,
    If it is the IP address you want to hide, instead use this CSS code.

    span.bbp-author-ip {
      display: none;
    }

    Please let us know if we can help you with anything else. 🙂

    #172820
    Pascal Casier
    Moderator

    Bonsoir JF,

    First of all, please try to change your permalink settings (Settings > Permalinks) to plain and save. Then try the events calendar again.

    If that didn’t work, could you please try (if this makes sense to you):
    In Admin > Events > Settings > Community > Access Control, UNcheck the “Block access to WordPress Admin” and have all “Roles to block” UNchecked

    If that didn’t work, could you please try to copy this code into your functions.php and let me know if it fixed your issue ?

    function casiepa_pre_get_posts( $query ) {
        global $wp_the_query;
    
        if ( $query === $wp_the_query && $query->is_main_query() && is_array( $query->query_vars['post_type'] ) && in_array( 'forum', $query->query_vars['post_type'] ) ) {
            $query->query_vars['post_type'] = 'forum';
        }
    
        return $query;
    }
    
    add_filter('pre_get_posts', 'casiepa_pre_get_posts', 11);

    Please get back to us with some news.

    Pascal.

    #172795
    Pascal Casier
    Moderator
    #172778
    Robin W
    Moderator

    I wasn’t worried about what was showing in the body, I was only interested in whether the widget in the footer disappeared.

    Can you confirm that it does with both the codes you tried?

    #172770
    junglejim620
    Participant

    I just found and tried this shortcode as well [bbp-forum-form], no luck on the widget neither?

    #172769
    junglejim620
    Participant

    Hi Robin,

    I tried this [bbp-topic-index], it got worst, the whole forums are now gone using this shortcode? It say no topic (blank page)? What will it cause it not showing nothing?

    https://www.damndramaqueen.com/no-topic.JPG

    Please help, Thanks,

    #172756
    Robin W
    Moderator

    ok, I can now see the issue, and have looked at both a forum page and a non forum page.

    From the web browser tools available to me, I can’t immediately see what the core issue is.

    as an experiment can you try on of the other bbpress shortcodes eg `[bbp-topic-index]
    `

    to see if this is bbpress or just that shortcode

    #172754
    uschesch
    Participant

    Hi,

    Thanks to all of the information I was able to gather on this forum, I created a forum home page in my WP site, and added the [bbp-forum-index] shortcode to display the forums. It worked perfectly, but I would like to eliminate some of the vertical space between the forum names in the list.

    Does anyone know if/how I can change the style to eliminate some of the vertical space between the forum names?

    Thank you.

    #172736
    spadan1963
    Participant

    Exist a plugin that it show the users on-line or shortcode?

    #172731

    In reply to: How to hide a user IP

    ZivotsRS
    Participant

    Hello,
    CSS code I have put, unfortunately visibility IP remained unchanged.

Viewing 25 results - 6,726 through 6,750 (of 32,505 total)
Skip to toolbar